generated-configure.sh revision 2293:2b3e5caafe35
1#!/bin/bash
2#
3# ##########################################################
4# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
5# ##########################################################
6#
7#! /bin/sh
8# Guess values for system-dependent variables and create Makefiles.
9# Generated by GNU Autoconf 2.69 for OpenJDK jdk9.
10#
11# Report bugs to <build-dev@openjdk.java.net>.
12#
13#
14# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
15#
16#
17# This configure script is free software; the Free Software Foundation
18# gives unlimited permission to copy, distribute and modify it.
19## -------------------- ##
20## M4sh Initialization. ##
21## -------------------- ##
22
23# Be more Bourne compatible
24DUALCASE=1; export DUALCASE # for MKS sh
25if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
26  emulate sh
27  NULLCMD=:
28  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
29  # is contrary to our usage.  Disable this feature.
30  alias -g '${1+"$@"}'='"$@"'
31  setopt NO_GLOB_SUBST
32else
33  case `(set -o) 2>/dev/null` in #(
34  *posix*) :
35    set -o posix ;; #(
36  *) :
37     ;;
38esac
39fi
40
41
42as_nl='
43'
44export as_nl
45# Printing a long string crashes Solaris 7 /usr/bin/printf.
46as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
47as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
48as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
49# Prefer a ksh shell builtin over an external printf program on Solaris,
50# but without wasting forks for bash or zsh.
51if test -z "$BASH_VERSION$ZSH_VERSION" \
52    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
53  as_echo='print -r --'
54  as_echo_n='print -rn --'
55elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
56  as_echo='printf %s\n'
57  as_echo_n='printf %s'
58else
59  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
60    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
61    as_echo_n='/usr/ucb/echo -n'
62  else
63    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
64    as_echo_n_body='eval
65      arg=$1;
66      case $arg in #(
67      *"$as_nl"*)
68	expr "X$arg" : "X\\(.*\\)$as_nl";
69	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
70      esac;
71      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
72    '
73    export as_echo_n_body
74    as_echo_n='sh -c $as_echo_n_body as_echo'
75  fi
76  export as_echo_body
77  as_echo='sh -c $as_echo_body as_echo'
78fi
79
80# The user is always right.
81if test "${PATH_SEPARATOR+set}" != set; then
82  PATH_SEPARATOR=:
83  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
84    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
85      PATH_SEPARATOR=';'
86  }
87fi
88
89
90# IFS
91# We need space, tab and new line, in precisely that order.  Quoting is
92# there to prevent editors from complaining about space-tab.
93# (If _AS_PATH_WALK were called with IFS unset, it would disable word
94# splitting by setting IFS to empty value.)
95IFS=" ""	$as_nl"
96
97# Find who we are.  Look in the path if we contain no directory separator.
98as_myself=
99case $0 in #((
100  *[\\/]* ) as_myself=$0 ;;
101  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
102for as_dir in $PATH
103do
104  IFS=$as_save_IFS
105  test -z "$as_dir" && as_dir=.
106    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
107  done
108IFS=$as_save_IFS
109
110     ;;
111esac
112# We did not find ourselves, most probably we were run as `sh COMMAND'
113# in which case we are not to be found in the path.
114if test "x$as_myself" = x; then
115  as_myself=$0
116fi
117if test ! -f "$as_myself"; then
118  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
119  exit 1
120fi
121
122# Unset variables that we do not need and which cause bugs (e.g. in
123# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
124# suppresses any "Segmentation fault" message there.  '((' could
125# trigger a bug in pdksh 5.2.14.
126for as_var in BASH_ENV ENV MAIL MAILPATH
127do eval test x\${$as_var+set} = xset \
128  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
129done
130PS1='$ '
131PS2='> '
132PS4='+ '
133
134# NLS nuisances.
135LC_ALL=C
136export LC_ALL
137LANGUAGE=C
138export LANGUAGE
139
140# CDPATH.
141(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
142
143# Use a proper internal environment variable to ensure we don't fall
144  # into an infinite loop, continuously re-executing ourselves.
145  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
146    _as_can_reexec=no; export _as_can_reexec;
147    # We cannot yet assume a decent shell, so we have to provide a
148# neutralization value for shells without unset; and this also
149# works around shells that cannot unset nonexistent variables.
150# Preserve -v and -x to the replacement shell.
151BASH_ENV=/dev/null
152ENV=/dev/null
153(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
154case $- in # ((((
155  *v*x* | *x*v* ) as_opts=-vx ;;
156  *v* ) as_opts=-v ;;
157  *x* ) as_opts=-x ;;
158  * ) as_opts= ;;
159esac
160exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
161# Admittedly, this is quite paranoid, since all the known shells bail
162# out after a failed `exec'.
163$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
164as_fn_exit 255
165  fi
166  # We don't want this to propagate to other subprocesses.
167          { _as_can_reexec=; unset _as_can_reexec;}
168if test "x$CONFIG_SHELL" = x; then
169  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
170  emulate sh
171  NULLCMD=:
172  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
173  # is contrary to our usage.  Disable this feature.
174  alias -g '\${1+\"\$@\"}'='\"\$@\"'
175  setopt NO_GLOB_SUBST
176else
177  case \`(set -o) 2>/dev/null\` in #(
178  *posix*) :
179    set -o posix ;; #(
180  *) :
181     ;;
182esac
183fi
184"
185  as_required="as_fn_return () { (exit \$1); }
186as_fn_success () { as_fn_return 0; }
187as_fn_failure () { as_fn_return 1; }
188as_fn_ret_success () { return 0; }
189as_fn_ret_failure () { return 1; }
190
191exitcode=0
192as_fn_success || { exitcode=1; echo as_fn_success failed.; }
193as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
194as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
195as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
196if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
197
198else
199  exitcode=1; echo positional parameters were not saved.
200fi
201test x\$exitcode = x0 || exit 1
202test -x / || exit 1"
203  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
204  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
205  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
206  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
207test \$(( 1 + 1 )) = 2 || exit 1"
208  if (eval "$as_required") 2>/dev/null; then :
209  as_have_required=yes
210else
211  as_have_required=no
212fi
213  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
214
215else
216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
217as_found=false
218for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
219do
220  IFS=$as_save_IFS
221  test -z "$as_dir" && as_dir=.
222  as_found=:
223  case $as_dir in #(
224	 /*)
225	   for as_base in sh bash ksh sh5; do
226	     # Try only shells that exist, to save several forks.
227	     as_shell=$as_dir/$as_base
228	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
229		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
230  CONFIG_SHELL=$as_shell as_have_required=yes
231		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
232  break 2
233fi
234fi
235	   done;;
236       esac
237  as_found=false
238done
239$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
240	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
241  CONFIG_SHELL=$SHELL as_have_required=yes
242fi; }
243IFS=$as_save_IFS
244
245
246      if test "x$CONFIG_SHELL" != x; then :
247  export CONFIG_SHELL
248             # We cannot yet assume a decent shell, so we have to provide a
249# neutralization value for shells without unset; and this also
250# works around shells that cannot unset nonexistent variables.
251# Preserve -v and -x to the replacement shell.
252BASH_ENV=/dev/null
253ENV=/dev/null
254(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
255case $- in # ((((
256  *v*x* | *x*v* ) as_opts=-vx ;;
257  *v* ) as_opts=-v ;;
258  *x* ) as_opts=-x ;;
259  * ) as_opts= ;;
260esac
261exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
262# Admittedly, this is quite paranoid, since all the known shells bail
263# out after a failed `exec'.
264$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
265exit 255
266fi
267
268    if test x$as_have_required = xno; then :
269  $as_echo "$0: This script requires a shell more modern than all"
270  $as_echo "$0: the shells that I found on your system."
271  if test x${ZSH_VERSION+set} = xset ; then
272    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
273    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
274  else
275    $as_echo "$0: Please tell bug-autoconf@gnu.org and
276$0: build-dev@openjdk.java.net about your system, including
277$0: any error possibly output before this message. Then
278$0: install a modern shell, or manually run the script
279$0: under such a shell if you do have one."
280  fi
281  exit 1
282fi
283fi
284fi
285SHELL=${CONFIG_SHELL-/bin/sh}
286export SHELL
287# Unset more variables known to interfere with behavior of common tools.
288CLICOLOR_FORCE= GREP_OPTIONS=
289unset CLICOLOR_FORCE GREP_OPTIONS
290
291## --------------------- ##
292## M4sh Shell Functions. ##
293## --------------------- ##
294# as_fn_unset VAR
295# ---------------
296# Portably unset VAR.
297as_fn_unset ()
298{
299  { eval $1=; unset $1;}
300}
301as_unset=as_fn_unset
302
303# as_fn_set_status STATUS
304# -----------------------
305# Set $? to STATUS, without forking.
306as_fn_set_status ()
307{
308  return $1
309} # as_fn_set_status
310
311# as_fn_exit STATUS
312# -----------------
313# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
314as_fn_exit ()
315{
316  set +e
317  as_fn_set_status $1
318  exit $1
319} # as_fn_exit
320
321# as_fn_mkdir_p
322# -------------
323# Create "$as_dir" as a directory, including parents if necessary.
324as_fn_mkdir_p ()
325{
326
327  case $as_dir in #(
328  -*) as_dir=./$as_dir;;
329  esac
330  test -d "$as_dir" || eval $as_mkdir_p || {
331    as_dirs=
332    while :; do
333      case $as_dir in #(
334      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
335      *) as_qdir=$as_dir;;
336      esac
337      as_dirs="'$as_qdir' $as_dirs"
338      as_dir=`$as_dirname -- "$as_dir" ||
339$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
340	 X"$as_dir" : 'X\(//\)[^/]' \| \
341	 X"$as_dir" : 'X\(//\)$' \| \
342	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
343$as_echo X"$as_dir" |
344    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
345	    s//\1/
346	    q
347	  }
348	  /^X\(\/\/\)[^/].*/{
349	    s//\1/
350	    q
351	  }
352	  /^X\(\/\/\)$/{
353	    s//\1/
354	    q
355	  }
356	  /^X\(\/\).*/{
357	    s//\1/
358	    q
359	  }
360	  s/.*/./; q'`
361      test -d "$as_dir" && break
362    done
363    test -z "$as_dirs" || eval "mkdir $as_dirs"
364  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
365
366
367} # as_fn_mkdir_p
368
369# as_fn_executable_p FILE
370# -----------------------
371# Test if FILE is an executable regular file.
372as_fn_executable_p ()
373{
374  test -f "$1" && test -x "$1"
375} # as_fn_executable_p
376# as_fn_append VAR VALUE
377# ----------------------
378# Append the text in VALUE to the end of the definition contained in VAR. Take
379# advantage of any shell optimizations that allow amortized linear growth over
380# repeated appends, instead of the typical quadratic growth present in naive
381# implementations.
382if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
383  eval 'as_fn_append ()
384  {
385    eval $1+=\$2
386  }'
387else
388  as_fn_append ()
389  {
390    eval $1=\$$1\$2
391  }
392fi # as_fn_append
393
394# as_fn_arith ARG...
395# ------------------
396# Perform arithmetic evaluation on the ARGs, and store the result in the
397# global $as_val. Take advantage of shells that can avoid forks. The arguments
398# must be portable across $(()) and expr.
399if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
400  eval 'as_fn_arith ()
401  {
402    as_val=$(( $* ))
403  }'
404else
405  as_fn_arith ()
406  {
407    as_val=`expr "$@" || test $? -eq 1`
408  }
409fi # as_fn_arith
410
411
412# as_fn_error STATUS ERROR [LINENO LOG_FD]
413# ----------------------------------------
414# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
415# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
416# script with STATUS, using 1 if that was 0.
417as_fn_error ()
418{
419  as_status=$1; test $as_status -eq 0 && as_status=1
420  if test "$4"; then
421    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
422    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
423  fi
424  $as_echo "$as_me: error: $2" >&2
425  as_fn_exit $as_status
426} # as_fn_error
427
428if expr a : '\(a\)' >/dev/null 2>&1 &&
429   test "X`expr 00001 : '.*\(...\)'`" = X001; then
430  as_expr=expr
431else
432  as_expr=false
433fi
434
435if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
436  as_basename=basename
437else
438  as_basename=false
439fi
440
441if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
442  as_dirname=dirname
443else
444  as_dirname=false
445fi
446
447as_me=`$as_basename -- "$0" ||
448$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
449	 X"$0" : 'X\(//\)$' \| \
450	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
451$as_echo X/"$0" |
452    sed '/^.*\/\([^/][^/]*\)\/*$/{
453	    s//\1/
454	    q
455	  }
456	  /^X\/\(\/\/\)$/{
457	    s//\1/
458	    q
459	  }
460	  /^X\/\(\/\).*/{
461	    s//\1/
462	    q
463	  }
464	  s/.*/./; q'`
465
466# Avoid depending upon Character Ranges.
467as_cr_letters='abcdefghijklmnopqrstuvwxyz'
468as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
469as_cr_Letters=$as_cr_letters$as_cr_LETTERS
470as_cr_digits='0123456789'
471as_cr_alnum=$as_cr_Letters$as_cr_digits
472
473
474  as_lineno_1=$LINENO as_lineno_1a=$LINENO
475  as_lineno_2=$LINENO as_lineno_2a=$LINENO
476  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
477  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
478  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
479  sed -n '
480    p
481    /[$]LINENO/=
482  ' <$as_myself |
483    sed '
484      s/[$]LINENO.*/&-/
485      t lineno
486      b
487      :lineno
488      N
489      :loop
490      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
491      t loop
492      s/-\n.*//
493    ' >$as_me.lineno &&
494  chmod +x "$as_me.lineno" ||
495    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
496
497  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
498  # already done that, so ensure we don't try to do so again and fall
499  # in an infinite loop.  This has already happened in practice.
500  _as_can_reexec=no; export _as_can_reexec
501  # Don't try to exec as it changes $[0], causing all sort of problems
502  # (the dirname of $[0] is not the place where we might find the
503  # original and so on.  Autoconf is especially sensitive to this).
504  . "./$as_me.lineno"
505  # Exit status is that of the last command.
506  exit
507}
508
509ECHO_C= ECHO_N= ECHO_T=
510case `echo -n x` in #(((((
511-n*)
512  case `echo 'xy\c'` in
513  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
514  xy)  ECHO_C='\c';;
515  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
516       ECHO_T='	';;
517  esac;;
518*)
519  ECHO_N='-n';;
520esac
521
522rm -f conf$$ conf$$.exe conf$$.file
523if test -d conf$$.dir; then
524  rm -f conf$$.dir/conf$$.file
525else
526  rm -f conf$$.dir
527  mkdir conf$$.dir 2>/dev/null
528fi
529if (echo >conf$$.file) 2>/dev/null; then
530  if ln -s conf$$.file conf$$ 2>/dev/null; then
531    as_ln_s='ln -s'
532    # ... but there are two gotchas:
533    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
534    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
535    # In both cases, we have to default to `cp -pR'.
536    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
537      as_ln_s='cp -pR'
538  elif ln conf$$.file conf$$ 2>/dev/null; then
539    as_ln_s=ln
540  else
541    as_ln_s='cp -pR'
542  fi
543else
544  as_ln_s='cp -pR'
545fi
546rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
547rmdir conf$$.dir 2>/dev/null
548
549if mkdir -p . 2>/dev/null; then
550  as_mkdir_p='mkdir -p "$as_dir"'
551else
552  test -d ./-p && rmdir ./-p
553  as_mkdir_p=false
554fi
555
556as_test_x='test -x'
557as_executable_p=as_fn_executable_p
558
559# Sed expression to map a string onto a valid CPP name.
560as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
561
562# Sed expression to map a string onto a valid variable name.
563as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
564
565
566test -n "$DJDIR" || exec 7<&0 </dev/null
567exec 6>&1
568
569# Name of the host.
570# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
571# so uname gets run too.
572ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
573
574#
575# Initializations.
576#
577ac_default_prefix=/usr/local
578ac_clean_files=
579ac_config_libobj_dir=.
580LIBOBJS=
581cross_compiling=no
582subdirs=
583MFLAGS=
584MAKEFLAGS=
585
586# Identity of this package.
587PACKAGE_NAME='OpenJDK'
588PACKAGE_TARNAME='openjdk'
589PACKAGE_VERSION='jdk9'
590PACKAGE_STRING='OpenJDK jdk9'
591PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
592PACKAGE_URL='http://openjdk.java.net'
593
594# Factoring default headers for most tests.
595ac_includes_default="\
596#include <stdio.h>
597#ifdef HAVE_SYS_TYPES_H
598# include <sys/types.h>
599#endif
600#ifdef HAVE_SYS_STAT_H
601# include <sys/stat.h>
602#endif
603#ifdef STDC_HEADERS
604# include <stdlib.h>
605# include <stddef.h>
606#else
607# ifdef HAVE_STDLIB_H
608#  include <stdlib.h>
609# endif
610#endif
611#ifdef HAVE_STRING_H
612# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
613#  include <memory.h>
614# endif
615# include <string.h>
616#endif
617#ifdef HAVE_STRINGS_H
618# include <strings.h>
619#endif
620#ifdef HAVE_INTTYPES_H
621# include <inttypes.h>
622#endif
623#ifdef HAVE_STDINT_H
624# include <stdint.h>
625#endif
626#ifdef HAVE_UNISTD_H
627# include <unistd.h>
628#endif"
629
630ac_subst_vars='LTLIBOBJS
631LIBOBJS
632CFLAGS_CCACHE
633CCACHE
634USE_PRECOMPILED_HEADER
635BUILD_ICECC
636ICECC
637ICECC_WRAPPER
638ICECC_CREATE_ENV
639ICECC_CMD
640ENABLE_JAVAC_SERVER
641ENABLE_SJAVAC
642SJAVAC_SERVER_JAVA_FLAGS
643SJAVAC_SERVER_JAVA
644JAVA_TOOL_FLAGS_SMALL
645JAVA_FLAGS_SMALL
646JAVA_FLAGS_JAVAC
647BOOTCYCLE_JVM_ARGS_BIG
648JAVA_FLAGS_BIG
649JAVA_FLAGS
650TEST_JOBS
651JOBS
652MEMORY_SIZE
653NUM_CORES
654ENABLE_GENERATE_CLASSLIST
655BUILD_FAILURE_HANDLER
656ENABLE_INTREE_EC
657STLPORT_LIB
658LIBZIP_CAN_USE_MMAP
659LIBDL
660LIBM
661USE_EXTERNAL_LCMS
662LCMS_LIBS
663LCMS_CFLAGS
664USE_EXTERNAL_LIBZ
665USE_EXTERNAL_LIBPNG
666PNG_LIBS
667PNG_CFLAGS
668USE_EXTERNAL_LIBGIF
669USE_EXTERNAL_LIBJPEG
670LLVM_LIBS
671LLVM_LDFLAGS
672LLVM_CFLAGS
673LLVM_CONFIG
674LIBFFI_LIBS
675LIBFFI_CFLAGS
676ALSA_LIBS
677ALSA_CFLAGS
678FREETYPE_BUNDLE_LIB_PATH
679FREETYPE_LIBS
680FREETYPE_CFLAGS
681CUPS_CFLAGS
682X_EXTRA_LIBS
683X_LIBS
684X_PRE_LIBS
685X_CFLAGS
686XMKMF
687MSVCP_DLL
688MSVCR_DLL
689LIBCXX
690FIXPATH_DETACH_FLAG
691FIXPATH
692BUILD_GTEST
693VALID_JVM_FEATURES
694JVM_FEATURES_custom
695JVM_FEATURES_zeroshark
696JVM_FEATURES_zero
697JVM_FEATURES_minimal
698JVM_FEATURES_core
699JVM_FEATURES_client
700JVM_FEATURES_server
701INCLUDE_DTRACE
702GCOV_ENABLED
703STRIP_POLICY
704DEBUG_BINARIES
705ZIP_EXTERNAL_DEBUG_SYMBOLS
706COPY_DEBUG_SYMBOLS
707COMPILE_WITH_DEBUG_SYMBOLS
708CFLAGS_WARNINGS_ARE_ERRORS
709BUILD_CC_DISABLE_WARNING_PREFIX
710DISABLE_WARNING_PREFIX
711HOTSPOT_SET_WARNINGS_AS_ERRORS
712WARNINGS_AS_ERRORS
713COMPILER_SUPPORTS_TARGET_BITS_FLAG
714ZERO_ARCHFLAG
715LDFLAGS_TESTEXE
716LDFLAGS_TESTLIB
717CXXFLAGS_TESTEXE
718CXXFLAGS_TESTLIB
719CFLAGS_TESTEXE
720CFLAGS_TESTLIB
721OPENJDK_BUILD_JVM_LIBS
722OPENJDK_BUILD_JVM_ASFLAGS
723OPENJDK_BUILD_JVM_LDFLAGS
724OPENJDK_BUILD_JVM_CFLAGS
725OPENJDK_BUILD_LDFLAGS_HASH_STYLE
726OPENJDK_BUILD_LDFLAGS_CXX_JDK
727OPENJDK_BUILD_JDKEXE_LIBS
728OPENJDK_BUILD_JDKLIB_LIBS
729OPENJDK_BUILD_LDFLAGS_JDKEXE
730OPENJDK_BUILD_LDFLAGS_JDKLIB
731OPENJDK_BUILD_CXXFLAGS_JDKEXE
732OPENJDK_BUILD_CXXFLAGS_JDKLIB
733OPENJDK_BUILD_CFLAGS_JDKEXE
734OPENJDK_BUILD_CFLAGS_JDKLIB
735OPENJDK_BUILD_CXXSTD_CXXFLAG
736JVM_LIBS
737JVM_ASFLAGS
738JVM_LDFLAGS
739JVM_CFLAGS
740LDFLAGS_HASH_STYLE
741LDFLAGS_CXX_JDK
742JDKEXE_LIBS
743JDKLIB_LIBS
744LDFLAGS_JDKEXE
745LDFLAGS_JDKLIB
746CXXFLAGS_JDKEXE
747CXXFLAGS_JDKLIB
748CFLAGS_JDKEXE
749CFLAGS_JDKLIB
750MACOSX_VERSION_MIN
751CXXSTD_CXXFLAG
752CXX_O_FLAG_SIZE
753CXX_O_FLAG_NONE
754CXX_O_FLAG_DEBUG
755CXX_O_FLAG_NORM
756CXX_O_FLAG_HI
757CXX_O_FLAG_HIGHEST
758CXX_O_FLAG_HIGHEST_JVM
759C_O_FLAG_SIZE
760C_O_FLAG_NONE
761C_O_FLAG_DEBUG
762C_O_FLAG_NORM
763C_O_FLAG_HI
764C_O_FLAG_HIGHEST
765C_O_FLAG_HIGHEST_JVM
766JVM_CFLAGS_SYMBOLS
767CXXFLAGS_DEBUG_SYMBOLS
768CFLAGS_DEBUG_SYMBOLS
769CXX_FLAG_DEPS
770C_FLAG_DEPS
771SHARED_LIBRARY_FLAGS
772SET_SHARED_LIBRARY_MAPFILE
773SET_SHARED_LIBRARY_NAME
774SET_SHARED_LIBRARY_ORIGIN
775SET_EXECUTABLE_ORIGIN
776CXX_FLAG_REORDER
777C_FLAG_REORDER
778JVM_RCFLAGS
779RC_FLAGS
780AR_OUT_OPTION
781LD_OUT_OPTION
782EXE_OUT_OPTION
783CC_OUT_OPTION
784STRIPFLAGS
785ARFLAGS
786COMPILER_BINDCMD_FILE_FLAG
787COMPILER_COMMAND_FILE_FLAG
788COMPILER_TARGET_BITS_FLAG
789JT_HOME
790JTREGEXE
791HOTSPOT_TOOLCHAIN_TYPE
792USING_BROKEN_SUSE_LD
793PACKAGE_PATH
794USE_CLANG
795HOTSPOT_LD
796HOTSPOT_CXX
797HOTSPOT_RC
798HOTSPOT_MT
799BUILD_AS
800BUILD_LDCXX
801BUILD_LD
802BUILD_STRIP
803BUILD_OBJCOPY
804BUILD_AR
805BUILD_NM
806BUILD_CXX
807BUILD_CC
808BUILD_SYSROOT_LDFLAGS
809BUILD_SYSROOT_CFLAGS
810ac_ct_OBJDUMP
811OBJDUMP
812ac_ct_OBJCOPY
813OBJCOPY
814ac_ct_NM
815ac_ct_STRIP
816GNM
817NM
818STRIP
819MSBUILD
820DUMPBIN
821RC
822MT
823LIPO
824ac_ct_AR
825AR
826AS
827LDCXX
828LD
829CXXCPP
830CPP
831CXX_VERSION_NUMBER
832CC_VERSION_NUMBER
833ac_ct_CXX
834CXXFLAGS
835CXX
836TOOLCHAIN_PATH_CXX
837POTENTIAL_CXX
838OBJEXT
839EXEEXT
840ac_ct_CC
841CPPFLAGS
842LDFLAGS
843CFLAGS
844CC
845TOOLCHAIN_PATH_CC
846POTENTIAL_CC
847TOOLCHAIN_VERSION
848VS_LIB
849VS_INCLUDE
850VS_PATH
851CYGWIN_LINK
852SYSROOT_LDFLAGS
853SYSROOT_CFLAGS
854EXTRA_LDFLAGS
855EXTRA_CXXFLAGS
856EXTRA_CFLAGS
857LEGACY_EXTRA_LDFLAGS
858LEGACY_EXTRA_CXXFLAGS
859LEGACY_EXTRA_CFLAGS
860EXE_SUFFIX
861OBJ_SUFFIX
862STATIC_LIBRARY
863SHARED_LIBRARY
864STATIC_LIBRARY_SUFFIX
865SHARED_LIBRARY_SUFFIX
866LIBRARY_PREFIX
867TOOLCHAIN_TYPE
868STATIC_BUILD
869IMPORT_MODULES_MAKE
870IMPORT_MODULES_SRC
871IMPORT_MODULES_CONF
872IMPORT_MODULES_LIBS
873IMPORT_MODULES_CMDS
874IMPORT_MODULES_CLASSES
875BUILD_HOTSPOT
876HOTSPOT_DIST
877BUILD_OUTPUT
878JDK_TOPDIR
879NASHORN_TOPDIR
880HOTSPOT_TOPDIR
881JAXWS_TOPDIR
882JAXP_TOPDIR
883CORBA_TOPDIR
884LANGTOOLS_TOPDIR
885EXTERNAL_BUILDJDK
886BUILD_JDK
887CREATE_BUILDJDK
888JLINK
889JMOD
890BOOT_JDK_BITS
891JAVAC_FLAGS
892BOOT_JDK_MODULAR
893BOOT_JDK_SOURCETARGET
894JARSIGNER
895JAR
896JAVAH
897JAVAC
898JAVA
899BOOT_JDK
900JAVA_CHECK
901JAVAC_CHECK
902VERSION_IS_GA
903VERSION_SHORT
904VERSION_STRING
905VERSION_NUMBER_FOUR_POSITIONS
906VERSION_NUMBER
907VERSION_OPT
908VERSION_BUILD
909VERSION_PRE
910VERSION_PATCH
911VERSION_SECURITY
912VERSION_MINOR
913VERSION_MAJOR
914MACOSX_BUNDLE_ID_BASE
915MACOSX_BUNDLE_NAME_BASE
916HOTSPOT_VM_DISTRO
917COMPANY_NAME
918JDK_RC_PLATFORM_NAME
919PRODUCT_SUFFIX
920PRODUCT_NAME
921LAUNCHER_NAME
922JLINK_KEEP_PACKAGED_MODULES
923COPYRIGHT_YEAR
924COMPRESS_JARS
925INCLUDE_SA
926UNLIMITED_CRYPTO
927CACERTS_FILE
928ENABLE_HEADLESS_ONLY
929DEFAULT_MAKE_TARGET
930OS_VERSION_MICRO
931OS_VERSION_MINOR
932OS_VERSION_MAJOR
933PKG_CONFIG
934BASH_ARGS
935SETFILE
936CODESIGN
937XATTR
938DSYMUTIL
939IS_GNU_TIME
940PATCH
941DTRACE
942TIME
943STAT
944HG
945READELF
946OTOOL
947LDD
948ZIP
949UNZIP
950TAR_SUPPORTS_TRANSFORM
951TAR_INCLUDE_PARAM
952TAR_CREATE_EXTRA_PARAM
953TAR_TYPE
954FIND_DELETE
955OUTPUT_SYNC
956OUTPUT_SYNC_SUPPORTED
957CHECK_TOOLSDIR_MAKE
958CHECK_TOOLSDIR_GMAKE
959CHECK_MAKE
960CHECK_GMAKE
961MAKE
962PKGHANDLER
963CONFIGURESUPPORT_OUTPUTDIR
964OUTPUT_ROOT
965CONF_NAME
966SPEC
967SDKROOT
968XCODEBUILD
969VALID_JVM_VARIANTS
970JVM_VARIANTS
971DEBUG_LEVEL
972HOTSPOT_DEBUG_LEVEL
973JDK_VARIANT
974USERNAME
975CANONICAL_TOPDIR
976ORIGINAL_TOPDIR
977TOPDIR
978PATH_SEP
979ZERO_ARCHDEF
980HOTSPOT_BUILD_CPU_DEFINE
981HOTSPOT_BUILD_CPU_ARCH
982HOTSPOT_BUILD_CPU
983HOTSPOT_BUILD_OS_TYPE
984HOTSPOT_BUILD_OS
985OPENJDK_BUILD_BUNDLE_PLATFORM
986OPENJDK_BUILD_CPU_BUNDLE
987OPENJDK_BUILD_OS_BUNDLE
988OPENJDK_BUILD_OS_EXPORT_DIR
989OPENJDK_BUILD_CPU_JLI_CFLAGS
990OPENJDK_BUILD_CPU_OSARCH
991OPENJDK_BUILD_CPU_ISADIR
992OPENJDK_BUILD_CPU_LIBDIR
993OPENJDK_BUILD_CPU_LEGACY_LIB
994OPENJDK_BUILD_CPU_LEGACY
995HOTSPOT_TARGET_CPU_DEFINE
996HOTSPOT_TARGET_CPU_ARCH
997HOTSPOT_TARGET_CPU
998HOTSPOT_TARGET_OS_TYPE
999HOTSPOT_TARGET_OS
1000DEFINE_CROSS_COMPILE_ARCH
1001LP64
1002OPENJDK_TARGET_BUNDLE_PLATFORM
1003OPENJDK_TARGET_CPU_BUNDLE
1004OPENJDK_TARGET_OS_BUNDLE
1005OPENJDK_TARGET_OS_EXPORT_DIR
1006OPENJDK_TARGET_CPU_JLI_CFLAGS
1007OPENJDK_TARGET_CPU_OSARCH
1008OPENJDK_TARGET_CPU_ISADIR
1009OPENJDK_TARGET_CPU_LIBDIR
1010OPENJDK_TARGET_CPU_LEGACY_LIB
1011OPENJDK_TARGET_CPU_LEGACY
1012REQUIRED_OS_VERSION
1013REQUIRED_OS_NAME
1014COMPILE_TYPE
1015OPENJDK_TARGET_CPU_ENDIAN
1016OPENJDK_TARGET_CPU_BITS
1017OPENJDK_TARGET_CPU_ARCH
1018OPENJDK_TARGET_CPU
1019OPENJDK_TARGET_OS_ENV
1020OPENJDK_TARGET_OS_TYPE
1021OPENJDK_TARGET_OS
1022OPENJDK_BUILD_CPU_ENDIAN
1023OPENJDK_BUILD_CPU_BITS
1024OPENJDK_BUILD_CPU_ARCH
1025OPENJDK_BUILD_CPU
1026OPENJDK_BUILD_OS_ENV
1027OPENJDK_BUILD_OS_TYPE
1028OPENJDK_BUILD_OS
1029OPENJDK_BUILD_AUTOCONF_NAME
1030OPENJDK_TARGET_AUTOCONF_NAME
1031target_os
1032target_vendor
1033target_cpu
1034target
1035host_os
1036host_vendor
1037host_cpu
1038host
1039build_os
1040build_vendor
1041build_cpu
1042build
1043NICE
1044CPIO
1045DF
1046READLINK
1047CYGPATH
1048SED
1049FGREP
1050EGREP
1051GREP
1052AWK
1053XARGS
1054WHICH
1055WC
1056UNIQ
1057UNAME
1058TR
1059TOUCH
1060TEE
1061TAR
1062TAIL
1063SORT
1064SH
1065RMDIR
1066RM
1067PRINTF
1068NAWK
1069MV
1070MKTEMP
1071MKDIR
1072LS
1073LN
1074GZIP
1075GUNZIP
1076HEAD
1077FIND
1078FILE
1079EXPR
1080ECHO
1081DIRNAME
1082DIFF
1083DATE
1084CUT
1085CP
1086COMM
1087CMP
1088CHMOD
1089CAT
1090BASH
1091BASENAME
1092DATE_WHEN_CONFIGURED
1093ORIGINAL_PATH
1094CONFIGURE_COMMAND_LINE
1095target_alias
1096host_alias
1097build_alias
1098LIBS
1099ECHO_T
1100ECHO_N
1101ECHO_C
1102DEFS
1103mandir
1104localedir
1105libdir
1106psdir
1107pdfdir
1108dvidir
1109htmldir
1110infodir
1111docdir
1112oldincludedir
1113includedir
1114localstatedir
1115sharedstatedir
1116sysconfdir
1117datadir
1118datarootdir
1119libexecdir
1120sbindir
1121bindir
1122program_transform_name
1123prefix
1124exec_prefix
1125PACKAGE_URL
1126PACKAGE_BUGREPORT
1127PACKAGE_STRING
1128PACKAGE_VERSION
1129PACKAGE_TARNAME
1130PACKAGE_NAME
1131PATH_SEPARATOR
1132SHELL'
1133ac_subst_files=''
1134ac_user_opts='
1135enable_option_checking
1136with_target_bits
1137enable_openjdk_only
1138with_custom_make_dir
1139with_jdk_variant
1140enable_debug
1141with_debug_level
1142with_jvm_variants
1143with_devkit
1144with_sys_root
1145with_sysroot
1146with_tools_dir
1147with_toolchain_path
1148with_extra_path
1149with_sdk_name
1150with_conf_name
1151with_output_sync
1152with_default_make_target
1153enable_headless_only
1154with_cacerts_file
1155enable_unlimited_crypto
1156with_copyright_year
1157enable_keep_packaged_modules
1158with_milestone
1159with_update_version
1160with_user_release_suffix
1161with_build_number
1162with_version_string
1163with_version_pre
1164with_version_opt
1165with_version_build
1166with_version_major
1167with_version_minor
1168with_version_security
1169with_version_patch
1170with_boot_jdk
1171with_build_jdk
1172with_add_source_root
1173with_override_source_root
1174with_adds_and_overrides
1175with_override_langtools
1176with_override_corba
1177with_override_jaxp
1178with_override_jaxws
1179with_override_hotspot
1180with_override_nashorn
1181with_override_jdk
1182with_import_hotspot
1183with_import_modules
1184enable_static_build
1185with_toolchain_type
1186with_extra_cflags
1187with_extra_cxxflags
1188with_extra_ldflags
1189with_toolchain_version
1190with_build_devkit
1191with_jtreg
1192enable_warnings_as_errors
1193with_native_debug_symbols
1194enable_debug_symbols
1195enable_zip_debug_info
1196enable_native_coverage
1197enable_dtrace
1198with_jvm_features
1199with_jvm_interpreter
1200enable_hotspot_gtest
1201with_stdc__lib
1202with_msvcr_dll
1203with_msvcp_dll
1204with_x
1205with_cups
1206with_cups_include
1207with_freetype
1208with_freetype_include
1209with_freetype_lib
1210with_freetype_src
1211enable_freetype_bundling
1212with_alsa
1213with_alsa_include
1214with_alsa_lib
1215with_libffi
1216with_libffi_include
1217with_libffi_lib
1218with_libjpeg
1219with_giflib
1220with_libpng
1221with_zlib
1222with_lcms
1223with_dxsdk
1224with_dxsdk_lib
1225with_dxsdk_include
1226enable_jtreg_failure_handler
1227enable_generate_classlist
1228with_num_cores
1229with_memory_size
1230with_jobs
1231with_test_jobs
1232with_boot_jdk_jvmargs
1233with_sjavac_server_java
1234enable_sjavac
1235enable_javac_server
1236enable_icecc
1237enable_precompiled_headers
1238enable_ccache
1239with_ccache_dir
1240'
1241      ac_precious_vars='build_alias
1242host_alias
1243target_alias
1244BASENAME
1245BASH
1246CAT
1247CHMOD
1248CMP
1249COMM
1250CP
1251CUT
1252DATE
1253DIFF
1254DIRNAME
1255ECHO
1256EXPR
1257FILE
1258FIND
1259HEAD
1260GUNZIP
1261GZIP
1262LN
1263LS
1264MKDIR
1265MKTEMP
1266MV
1267NAWK
1268PRINTF
1269RM
1270RMDIR
1271SH
1272SORT
1273TAIL
1274TAR
1275TEE
1276TOUCH
1277TR
1278UNAME
1279UNIQ
1280WC
1281WHICH
1282XARGS
1283AWK
1284GREP
1285EGREP
1286FGREP
1287SED
1288CYGPATH
1289READLINK
1290DF
1291CPIO
1292NICE
1293MAKE
1294UNZIP
1295ZIP
1296LDD
1297OTOOL
1298READELF
1299HG
1300STAT
1301TIME
1302DTRACE
1303PATCH
1304DSYMUTIL
1305XATTR
1306CODESIGN
1307SETFILE
1308PKG_CONFIG
1309JAVA
1310JAVAC
1311JAVAH
1312JAR
1313JARSIGNER
1314CC
1315CFLAGS
1316LDFLAGS
1317LIBS
1318CPPFLAGS
1319CXX
1320CXXFLAGS
1321CCC
1322CPP
1323CXXCPP
1324AS
1325AR
1326LIPO
1327STRIP
1328NM
1329GNM
1330OBJCOPY
1331OBJDUMP
1332BUILD_CC
1333BUILD_CXX
1334BUILD_NM
1335BUILD_AR
1336BUILD_OBJCOPY
1337BUILD_STRIP
1338JTREGEXE
1339XMKMF
1340FREETYPE_CFLAGS
1341FREETYPE_LIBS
1342ALSA_CFLAGS
1343ALSA_LIBS
1344LIBFFI_CFLAGS
1345LIBFFI_LIBS
1346PNG_CFLAGS
1347PNG_LIBS
1348LCMS_CFLAGS
1349LCMS_LIBS
1350ICECC_CMD
1351ICECC_CREATE_ENV
1352ICECC_WRAPPER
1353CCACHE'
1354
1355
1356# Initialize some variables set by options.
1357ac_init_help=
1358ac_init_version=false
1359ac_unrecognized_opts=
1360ac_unrecognized_sep=
1361# The variables have the same names as the options, with
1362# dashes changed to underlines.
1363cache_file=/dev/null
1364exec_prefix=NONE
1365no_create=
1366no_recursion=
1367prefix=NONE
1368program_prefix=NONE
1369program_suffix=NONE
1370program_transform_name=s,x,x,
1371silent=
1372site=
1373srcdir=
1374verbose=
1375x_includes=NONE
1376x_libraries=NONE
1377
1378# Installation directory options.
1379# These are left unexpanded so users can "make install exec_prefix=/foo"
1380# and all the variables that are supposed to be based on exec_prefix
1381# by default will actually change.
1382# Use braces instead of parens because sh, perl, etc. also accept them.
1383# (The list follows the same order as the GNU Coding Standards.)
1384bindir='${exec_prefix}/bin'
1385sbindir='${exec_prefix}/sbin'
1386libexecdir='${exec_prefix}/libexec'
1387datarootdir='${prefix}/share'
1388datadir='${datarootdir}'
1389sysconfdir='${prefix}/etc'
1390sharedstatedir='${prefix}/com'
1391localstatedir='${prefix}/var'
1392includedir='${prefix}/include'
1393oldincludedir='/usr/include'
1394docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1395infodir='${datarootdir}/info'
1396htmldir='${docdir}'
1397dvidir='${docdir}'
1398pdfdir='${docdir}'
1399psdir='${docdir}'
1400libdir='${exec_prefix}/lib'
1401localedir='${datarootdir}/locale'
1402mandir='${datarootdir}/man'
1403
1404ac_prev=
1405ac_dashdash=
1406for ac_option
1407do
1408  # If the previous option needs an argument, assign it.
1409  if test -n "$ac_prev"; then
1410    eval $ac_prev=\$ac_option
1411    ac_prev=
1412    continue
1413  fi
1414
1415  case $ac_option in
1416  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1417  *=)   ac_optarg= ;;
1418  *)    ac_optarg=yes ;;
1419  esac
1420
1421  # Accept the important Cygnus configure options, so we can diagnose typos.
1422
1423  case $ac_dashdash$ac_option in
1424  --)
1425    ac_dashdash=yes ;;
1426
1427  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1428    ac_prev=bindir ;;
1429  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1430    bindir=$ac_optarg ;;
1431
1432  -build | --build | --buil | --bui | --bu)
1433    ac_prev=build_alias ;;
1434  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1435    build_alias=$ac_optarg ;;
1436
1437  -cache-file | --cache-file | --cache-fil | --cache-fi \
1438  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1439    ac_prev=cache_file ;;
1440  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1441  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1442    cache_file=$ac_optarg ;;
1443
1444  --config-cache | -C)
1445    cache_file=config.cache ;;
1446
1447  -datadir | --datadir | --datadi | --datad)
1448    ac_prev=datadir ;;
1449  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1450    datadir=$ac_optarg ;;
1451
1452  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1453  | --dataroo | --dataro | --datar)
1454    ac_prev=datarootdir ;;
1455  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1456  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1457    datarootdir=$ac_optarg ;;
1458
1459  -disable-* | --disable-*)
1460    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1461    # Reject names that are not valid shell variable names.
1462    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1463      as_fn_error $? "invalid feature name: $ac_useropt"
1464    ac_useropt_orig=$ac_useropt
1465    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1466    case $ac_user_opts in
1467      *"
1468"enable_$ac_useropt"
1469"*) ;;
1470      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1471	 ac_unrecognized_sep=', ';;
1472    esac
1473    eval enable_$ac_useropt=no ;;
1474
1475  -docdir | --docdir | --docdi | --doc | --do)
1476    ac_prev=docdir ;;
1477  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1478    docdir=$ac_optarg ;;
1479
1480  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1481    ac_prev=dvidir ;;
1482  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1483    dvidir=$ac_optarg ;;
1484
1485  -enable-* | --enable-*)
1486    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1487    # Reject names that are not valid shell variable names.
1488    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1489      as_fn_error $? "invalid feature name: $ac_useropt"
1490    ac_useropt_orig=$ac_useropt
1491    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1492    case $ac_user_opts in
1493      *"
1494"enable_$ac_useropt"
1495"*) ;;
1496      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1497	 ac_unrecognized_sep=', ';;
1498    esac
1499    eval enable_$ac_useropt=\$ac_optarg ;;
1500
1501  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1502  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1503  | --exec | --exe | --ex)
1504    ac_prev=exec_prefix ;;
1505  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1506  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1507  | --exec=* | --exe=* | --ex=*)
1508    exec_prefix=$ac_optarg ;;
1509
1510  -gas | --gas | --ga | --g)
1511    # Obsolete; use --with-gas.
1512    with_gas=yes ;;
1513
1514  -help | --help | --hel | --he | -h)
1515    ac_init_help=long ;;
1516  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1517    ac_init_help=recursive ;;
1518  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1519    ac_init_help=short ;;
1520
1521  -host | --host | --hos | --ho)
1522    ac_prev=host_alias ;;
1523  -host=* | --host=* | --hos=* | --ho=*)
1524    host_alias=$ac_optarg ;;
1525
1526  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1527    ac_prev=htmldir ;;
1528  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1529  | --ht=*)
1530    htmldir=$ac_optarg ;;
1531
1532  -includedir | --includedir | --includedi | --included | --include \
1533  | --includ | --inclu | --incl | --inc)
1534    ac_prev=includedir ;;
1535  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1536  | --includ=* | --inclu=* | --incl=* | --inc=*)
1537    includedir=$ac_optarg ;;
1538
1539  -infodir | --infodir | --infodi | --infod | --info | --inf)
1540    ac_prev=infodir ;;
1541  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1542    infodir=$ac_optarg ;;
1543
1544  -libdir | --libdir | --libdi | --libd)
1545    ac_prev=libdir ;;
1546  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1547    libdir=$ac_optarg ;;
1548
1549  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1550  | --libexe | --libex | --libe)
1551    ac_prev=libexecdir ;;
1552  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1553  | --libexe=* | --libex=* | --libe=*)
1554    libexecdir=$ac_optarg ;;
1555
1556  -localedir | --localedir | --localedi | --localed | --locale)
1557    ac_prev=localedir ;;
1558  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1559    localedir=$ac_optarg ;;
1560
1561  -localstatedir | --localstatedir | --localstatedi | --localstated \
1562  | --localstate | --localstat | --localsta | --localst | --locals)
1563    ac_prev=localstatedir ;;
1564  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1565  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1566    localstatedir=$ac_optarg ;;
1567
1568  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1569    ac_prev=mandir ;;
1570  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1571    mandir=$ac_optarg ;;
1572
1573  -nfp | --nfp | --nf)
1574    # Obsolete; use --without-fp.
1575    with_fp=no ;;
1576
1577  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1578  | --no-cr | --no-c | -n)
1579    no_create=yes ;;
1580
1581  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1582  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1583    no_recursion=yes ;;
1584
1585  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1586  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1587  | --oldin | --oldi | --old | --ol | --o)
1588    ac_prev=oldincludedir ;;
1589  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1590  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1591  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1592    oldincludedir=$ac_optarg ;;
1593
1594  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1595    ac_prev=prefix ;;
1596  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1597    prefix=$ac_optarg ;;
1598
1599  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1600  | --program-pre | --program-pr | --program-p)
1601    ac_prev=program_prefix ;;
1602  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1603  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1604    program_prefix=$ac_optarg ;;
1605
1606  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1607  | --program-suf | --program-su | --program-s)
1608    ac_prev=program_suffix ;;
1609  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1610  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1611    program_suffix=$ac_optarg ;;
1612
1613  -program-transform-name | --program-transform-name \
1614  | --program-transform-nam | --program-transform-na \
1615  | --program-transform-n | --program-transform- \
1616  | --program-transform | --program-transfor \
1617  | --program-transfo | --program-transf \
1618  | --program-trans | --program-tran \
1619  | --progr-tra | --program-tr | --program-t)
1620    ac_prev=program_transform_name ;;
1621  -program-transform-name=* | --program-transform-name=* \
1622  | --program-transform-nam=* | --program-transform-na=* \
1623  | --program-transform-n=* | --program-transform-=* \
1624  | --program-transform=* | --program-transfor=* \
1625  | --program-transfo=* | --program-transf=* \
1626  | --program-trans=* | --program-tran=* \
1627  | --progr-tra=* | --program-tr=* | --program-t=*)
1628    program_transform_name=$ac_optarg ;;
1629
1630  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1631    ac_prev=pdfdir ;;
1632  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1633    pdfdir=$ac_optarg ;;
1634
1635  -psdir | --psdir | --psdi | --psd | --ps)
1636    ac_prev=psdir ;;
1637  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1638    psdir=$ac_optarg ;;
1639
1640  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1641  | -silent | --silent | --silen | --sile | --sil)
1642    silent=yes ;;
1643
1644  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1645    ac_prev=sbindir ;;
1646  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1647  | --sbi=* | --sb=*)
1648    sbindir=$ac_optarg ;;
1649
1650  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1651  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1652  | --sharedst | --shareds | --shared | --share | --shar \
1653  | --sha | --sh)
1654    ac_prev=sharedstatedir ;;
1655  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1656  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1657  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1658  | --sha=* | --sh=*)
1659    sharedstatedir=$ac_optarg ;;
1660
1661  -site | --site | --sit)
1662    ac_prev=site ;;
1663  -site=* | --site=* | --sit=*)
1664    site=$ac_optarg ;;
1665
1666  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1667    ac_prev=srcdir ;;
1668  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1669    srcdir=$ac_optarg ;;
1670
1671  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1672  | --syscon | --sysco | --sysc | --sys | --sy)
1673    ac_prev=sysconfdir ;;
1674  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1675  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1676    sysconfdir=$ac_optarg ;;
1677
1678  -target | --target | --targe | --targ | --tar | --ta | --t)
1679    ac_prev=target_alias ;;
1680  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1681    target_alias=$ac_optarg ;;
1682
1683  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1684    verbose=yes ;;
1685
1686  -version | --version | --versio | --versi | --vers | -V)
1687    ac_init_version=: ;;
1688
1689  -with-* | --with-*)
1690    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1691    # Reject names that are not valid shell variable names.
1692    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1693      as_fn_error $? "invalid package name: $ac_useropt"
1694    ac_useropt_orig=$ac_useropt
1695    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1696    case $ac_user_opts in
1697      *"
1698"with_$ac_useropt"
1699"*) ;;
1700      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1701	 ac_unrecognized_sep=', ';;
1702    esac
1703    eval with_$ac_useropt=\$ac_optarg ;;
1704
1705  -without-* | --without-*)
1706    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1707    # Reject names that are not valid shell variable names.
1708    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1709      as_fn_error $? "invalid package name: $ac_useropt"
1710    ac_useropt_orig=$ac_useropt
1711    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1712    case $ac_user_opts in
1713      *"
1714"with_$ac_useropt"
1715"*) ;;
1716      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1717	 ac_unrecognized_sep=', ';;
1718    esac
1719    eval with_$ac_useropt=no ;;
1720
1721  --x)
1722    # Obsolete; use --with-x.
1723    with_x=yes ;;
1724
1725  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1726  | --x-incl | --x-inc | --x-in | --x-i)
1727    ac_prev=x_includes ;;
1728  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1729  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1730    x_includes=$ac_optarg ;;
1731
1732  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1733  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1734    ac_prev=x_libraries ;;
1735  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1736  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1737    x_libraries=$ac_optarg ;;
1738
1739  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1740Try \`$0 --help' for more information"
1741    ;;
1742
1743  *=*)
1744    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1745    # Reject names that are not valid shell variable names.
1746    case $ac_envvar in #(
1747      '' | [0-9]* | *[!_$as_cr_alnum]* )
1748      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1749    esac
1750    eval $ac_envvar=\$ac_optarg
1751    export $ac_envvar ;;
1752
1753  *)
1754    # FIXME: should be removed in autoconf 3.0.
1755    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1756    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1757      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1758    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1759    ;;
1760
1761  esac
1762done
1763
1764if test -n "$ac_prev"; then
1765  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1766  as_fn_error $? "missing argument to $ac_option"
1767fi
1768
1769if test -n "$ac_unrecognized_opts"; then
1770  case $enable_option_checking in
1771    no) ;;
1772    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1773    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1774  esac
1775fi
1776
1777# Check all directory arguments for consistency.
1778for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1779		datadir sysconfdir sharedstatedir localstatedir includedir \
1780		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1781		libdir localedir mandir
1782do
1783  eval ac_val=\$$ac_var
1784  # Remove trailing slashes.
1785  case $ac_val in
1786    */ )
1787      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1788      eval $ac_var=\$ac_val;;
1789  esac
1790  # Be sure to have absolute directory names.
1791  case $ac_val in
1792    [\\/$]* | ?:[\\/]* )  continue;;
1793    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1794  esac
1795  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1796done
1797
1798# There might be people who depend on the old broken behavior: `$host'
1799# used to hold the argument of --host etc.
1800# FIXME: To remove some day.
1801build=$build_alias
1802host=$host_alias
1803target=$target_alias
1804
1805# FIXME: To remove some day.
1806if test "x$host_alias" != x; then
1807  if test "x$build_alias" = x; then
1808    cross_compiling=maybe
1809  elif test "x$build_alias" != "x$host_alias"; then
1810    cross_compiling=yes
1811  fi
1812fi
1813
1814ac_tool_prefix=
1815test -n "$host_alias" && ac_tool_prefix=$host_alias-
1816
1817test "$silent" = yes && exec 6>/dev/null
1818
1819
1820ac_pwd=`pwd` && test -n "$ac_pwd" &&
1821ac_ls_di=`ls -di .` &&
1822ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1823  as_fn_error $? "working directory cannot be determined"
1824test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1825  as_fn_error $? "pwd does not report name of working directory"
1826
1827
1828# Find the source files, if location was not specified.
1829if test -z "$srcdir"; then
1830  ac_srcdir_defaulted=yes
1831  # Try the directory containing this script, then the parent directory.
1832  ac_confdir=`$as_dirname -- "$as_myself" ||
1833$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1834	 X"$as_myself" : 'X\(//\)[^/]' \| \
1835	 X"$as_myself" : 'X\(//\)$' \| \
1836	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1837$as_echo X"$as_myself" |
1838    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1839	    s//\1/
1840	    q
1841	  }
1842	  /^X\(\/\/\)[^/].*/{
1843	    s//\1/
1844	    q
1845	  }
1846	  /^X\(\/\/\)$/{
1847	    s//\1/
1848	    q
1849	  }
1850	  /^X\(\/\).*/{
1851	    s//\1/
1852	    q
1853	  }
1854	  s/.*/./; q'`
1855  srcdir=$ac_confdir
1856  if test ! -r "$srcdir/$ac_unique_file"; then
1857    srcdir=..
1858  fi
1859else
1860  ac_srcdir_defaulted=no
1861fi
1862if test ! -r "$srcdir/$ac_unique_file"; then
1863  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1864  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1865fi
1866ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1867ac_abs_confdir=`(
1868	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1869	pwd)`
1870# When building in place, set srcdir=.
1871if test "$ac_abs_confdir" = "$ac_pwd"; then
1872  srcdir=.
1873fi
1874# Remove unnecessary trailing slashes from srcdir.
1875# Double slashes in file names in object file debugging info
1876# mess up M-x gdb in Emacs.
1877case $srcdir in
1878*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1879esac
1880for ac_var in $ac_precious_vars; do
1881  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1882  eval ac_env_${ac_var}_value=\$${ac_var}
1883  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1884  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1885done
1886
1887#
1888# Report the --help message.
1889#
1890if test "$ac_init_help" = "long"; then
1891  # Omit some internal or obsolete options to make the list less imposing.
1892  # This message is too long to be a string in the A/UX 3.1 sh.
1893  cat <<_ACEOF
1894\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1895
1896Usage: $0 [OPTION]... [VAR=VALUE]...
1897
1898To assign environment variables (e.g., CC, CFLAGS...), specify them as
1899VAR=VALUE.  See below for descriptions of some of the useful variables.
1900
1901Defaults for the options are specified in brackets.
1902
1903Configuration:
1904  -h, --help              display this help and exit
1905      --help=short        display options specific to this package
1906      --help=recursive    display the short help of all the included packages
1907  -V, --version           display version information and exit
1908  -q, --quiet, --silent   do not print \`checking ...' messages
1909      --cache-file=FILE   cache test results in FILE [disabled]
1910  -C, --config-cache      alias for \`--cache-file=config.cache'
1911  -n, --no-create         do not create output files
1912      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1913
1914Installation directories:
1915  --prefix=PREFIX         install architecture-independent files in PREFIX
1916                          [$ac_default_prefix]
1917  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1918                          [PREFIX]
1919
1920By default, \`make install' will install all the files in
1921\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1922an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1923for instance \`--prefix=\$HOME'.
1924
1925For better control, use the options below.
1926
1927Fine tuning of the installation directories:
1928  --bindir=DIR            user executables [EPREFIX/bin]
1929  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1930  --libexecdir=DIR        program executables [EPREFIX/libexec]
1931  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1932  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1933  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1934  --libdir=DIR            object code libraries [EPREFIX/lib]
1935  --includedir=DIR        C header files [PREFIX/include]
1936  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1937  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1938  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1939  --infodir=DIR           info documentation [DATAROOTDIR/info]
1940  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1941  --mandir=DIR            man documentation [DATAROOTDIR/man]
1942  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1943  --htmldir=DIR           html documentation [DOCDIR]
1944  --dvidir=DIR            dvi documentation [DOCDIR]
1945  --pdfdir=DIR            pdf documentation [DOCDIR]
1946  --psdir=DIR             ps documentation [DOCDIR]
1947_ACEOF
1948
1949  cat <<\_ACEOF
1950
1951X features:
1952  --x-includes=DIR    X include files are in DIR
1953  --x-libraries=DIR   X library files are in DIR
1954
1955System types:
1956  --build=BUILD     configure for building on BUILD [guessed]
1957  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1958  --target=TARGET   configure for building compilers for TARGET [HOST]
1959_ACEOF
1960fi
1961
1962if test -n "$ac_init_help"; then
1963  case $ac_init_help in
1964     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1965   esac
1966  cat <<\_ACEOF
1967
1968Optional Features:
1969  --disable-option-checking  ignore unrecognized --enable/--with options
1970  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1971  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1972  --enable-openjdk-only   suppress building custom source even if present
1973                          [disabled]
1974  --enable-debug          set the debug level to fastdebug (shorthand for
1975                          --with-debug-level=fastdebug) [disabled]
1976  --enable-headless-only  only build headless (no GUI) support [disabled]
1977  --enable-unlimited-crypto
1978                          Enable unlimited crypto policy [disabled]
1979  --disable-keep-packaged-modules
1980                          Do not keep packaged modules in jdk image [enable]
1981  --enable-static-build   enable static library build [disabled]
1982  --disable-warnings-as-errors
1983                          do not consider native warnings to be an error
1984                          [enabled]
1985  --enable-debug-symbols  Deprecated. Option is kept for backwards
1986                          compatibility and is ignored
1987  --enable-zip-debug-info Deprecated. Option is kept for backwards
1988                          compatibility and is ignored
1989  --enable-native-coverage
1990                          enable native compilation with code coverage
1991                          data[disabled]
1992  --enable-dtrace[=yes/no/auto]
1993                          enable dtrace. Default is auto, where dtrace is
1994                          enabled if all dependencies are present.
1995  --disable-hotspot-gtest Disables building of the Hotspot unit tests
1996  --disable-freetype-bundling
1997                          disable bundling of the freetype library with the
1998                          build result [enabled on Windows or when using
1999                          --with-freetype, disabled otherwise]
2000  --enable-jtreg-failure-handler
2001                          forces build of the jtreg failure handler to be
2002                          enabled, missing dependencies become fatal errors.
2003                          Default is auto, where the failure handler is built
2004                          if all dependencies are present and otherwise just
2005                          disabled.
2006  --disable-generate-classlist
2007                          forces enabling or disabling of the generation of a
2008                          CDS classlist at build time. Default is to generate
2009                          it when either the server or client JVMs are built.
2010  --enable-sjavac         use sjavac to do fast incremental compiles
2011                          [disabled]
2012  --disable-javac-server  disable javac server [enabled]
2013  --enable-icecc          enable distribted compilation of native code using
2014                          icecc/icecream [disabled]
2015  --disable-precompiled-headers
2016                          disable using precompiled headers when compiling C++
2017                          [enabled]
2018  --enable-ccache         enable using ccache to speed up recompilations
2019                          [disabled]
2020
2021Optional Packages:
2022  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2023  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2024  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
2025                          support it), e.g. --with-target-bits=32 [guessed]
2026  --with-custom-make-dir  Deprecated. Option is kept for backwards
2027                          compatibility and is ignored
2028  --with-jdk-variant      JDK variant to build (normal) [normal]
2029  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
2030                          optimized) [release]
2031  --with-jvm-variants     JVM variants (separated by commas) to build
2032                          (server,client,minimal,core,zero,zeroshark,custom)
2033                          [server]
2034  --with-devkit           use this devkit for compilers, tools and resources
2035  --with-sys-root         alias for --with-sysroot for backwards compatability
2036  --with-sysroot          use this directory as sysroot
2037  --with-tools-dir        alias for --with-toolchain-path for backwards
2038                          compatibility
2039  --with-toolchain-path   prepend these directories when searching for
2040                          toolchain binaries (compilers etc)
2041  --with-extra-path       prepend these directories to the default path
2042  --with-sdk-name         use the platform SDK of the given name. [macosx]
2043  --with-conf-name        use this as the name of the configuration [generated
2044                          from important configuration options]
2045  --with-output-sync      set make output sync type if supported by make.
2046                          [recurse]
2047  --with-default-make-target
2048                          set the default make target [exploded-image]
2049  --with-cacerts-file     specify alternative cacerts file
2050  --with-copyright-year   Set copyright year value for build [current year]
2051  --with-milestone        Deprecated. Option is kept for backwards
2052                          compatibility and is ignored
2053  --with-update-version   Deprecated. Option is kept for backwards
2054                          compatibility and is ignored
2055  --with-user-release-suffix
2056                          Deprecated. Option is kept for backwards
2057                          compatibility and is ignored
2058  --with-build-number     Deprecated. Option is kept for backwards
2059                          compatibility and is ignored
2060  --with-version-string   Set version string [calculated]
2061  --with-version-pre      Set the base part of the version 'PRE' field
2062                          (pre-release identifier) ['internal']
2063  --with-version-opt      Set version 'OPT' field (build metadata)
2064                          [<timestamp>.<user>.<dirname>]
2065  --with-version-build    Set version 'BUILD' field (build number) [not
2066                          specified]
2067  --with-version-major    Set version 'MAJOR' field (first number) [current
2068                          source value]
2069  --with-version-minor    Set version 'MINOR' field (second number) [current
2070                          source value]
2071  --with-version-security Set version 'SECURITY' field (third number) [current
2072                          source value]
2073  --with-version-patch    Set version 'PATCH' field (fourth number) [not
2074                          specified]
2075  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2076  --with-build-jdk        path to JDK of same version as is being built[the
2077                          newly built JDK]
2078  --with-add-source-root  Deprecated. Option is kept for backwards
2079                          compatibility and is ignored
2080  --with-override-source-root
2081                          Deprecated. Option is kept for backwards
2082                          compatibility and is ignored
2083  --with-adds-and-overrides
2084                          Deprecated. Option is kept for backwards
2085                          compatibility and is ignored
2086  --with-override-langtools
2087                          Deprecated. Option is kept for backwards
2088                          compatibility and is ignored
2089  --with-override-corba   Deprecated. Option is kept for backwards
2090                          compatibility and is ignored
2091  --with-override-jaxp    Deprecated. Option is kept for backwards
2092                          compatibility and is ignored
2093  --with-override-jaxws   Deprecated. Option is kept for backwards
2094                          compatibility and is ignored
2095  --with-override-hotspot Deprecated. Option is kept for backwards
2096                          compatibility and is ignored
2097  --with-override-nashorn Deprecated. Option is kept for backwards
2098                          compatibility and is ignored
2099  --with-override-jdk     Deprecated. Option is kept for backwards
2100                          compatibility and is ignored
2101  --with-import-hotspot   import hotspot binaries from this jdk image or
2102                          hotspot build dist dir instead of building from
2103                          source
2104  --with-import-modules   import a set of prebuilt modules either as a zip
2105                          file or an exploded directory
2106  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2107                          to show possible values [platform dependent]
2108  --with-extra-cflags     extra flags to be used when compiling jdk c-files
2109  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2110  --with-extra-ldflags    extra flags to be used when linking jdk
2111  --with-toolchain-version
2112                          the version of the toolchain to look for, use
2113                          '--help' to show possible values [platform
2114                          dependent]
2115  --with-build-devkit     Devkit to use for the build platform toolchain
2116  --with-jtreg            Regression Test Harness [probed]
2117  --with-native-debug-symbols
2118                          set the native debug symbol configuration (none,
2119                          internal, external, zipped) [varying]
2120  --with-jvm-features     additional JVM features to enable (separated by
2121                          comma), use '--help' to show possible values [none]
2122  --with-jvm-interpreter  Deprecated. Option is kept for backwards
2123                          compatibility and is ignored
2124  --with-stdc++lib=<static>,<dynamic>,<default>
2125                          force linking of the C++ runtime on Linux to either
2126                          static or dynamic, default is static with dynamic as
2127                          fallback
2128  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2129                          (Windows only) [probed]
2130  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2131                          (Windows only) [probed]
2132  --with-x                use the X Window System
2133  --with-cups             specify prefix directory for the cups package
2134                          (expecting the headers under PATH/include)
2135  --with-cups-include     specify directory for the cups include files
2136  --with-freetype         specify prefix directory for the freetype package
2137                          (expecting the libraries under PATH/lib and the
2138                          headers under PATH/include)
2139  --with-freetype-include specify directory for the freetype include files
2140  --with-freetype-lib     specify directory for the freetype library
2141  --with-freetype-src     specify directory with freetype sources to
2142                          automatically build the library (experimental,
2143                          Windows-only)
2144  --with-alsa             specify prefix directory for the alsa package
2145                          (expecting the libraries under PATH/lib and the
2146                          headers under PATH/include)
2147  --with-alsa-include     specify directory for the alsa include files
2148  --with-alsa-lib         specify directory for the alsa library
2149  --with-libffi           specify prefix directory for the libffi package
2150                          (expecting the libraries under PATH/lib and the
2151                          headers under PATH/include)
2152  --with-libffi-include   specify directory for the libffi include files
2153  --with-libffi-lib       specify directory for the libffi library
2154  --with-libjpeg          use libjpeg from build system or OpenJDK source
2155                          (system, bundled) [bundled]
2156  --with-giflib           use giflib from build system or OpenJDK source
2157                          (system, bundled) [bundled]
2158  --with-libpng           use libpng from build system or OpenJDK source
2159                          (system, bundled) [bundled]
2160  --with-zlib             use zlib from build system or OpenJDK source
2161                          (system, bundled) [bundled]
2162  --with-lcms             use lcms2 from build system or OpenJDK source
2163                          (system, bundled) [bundled]
2164  --with-dxsdk            Deprecated. Option is kept for backwards
2165                          compatibility and is ignored
2166  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2167                          compatibility and is ignored
2168  --with-dxsdk-include    Deprecated. Option is kept for backwards
2169                          compatibility and is ignored
2170  --with-num-cores        number of cores in the build system, e.g.
2171                          --with-num-cores=8 [probed]
2172  --with-memory-size      memory (in MB) available in the build system, e.g.
2173                          --with-memory-size=1024 [probed]
2174  --with-jobs             number of parallel jobs to let make run [calculated
2175                          based on cores and memory]
2176  --with-test-jobs        number of parallel tests jobs to run [based on build
2177                          jobs]
2178  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2179                          invocations of boot JDK, overriding the default
2180                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2181                          -enableassertions"
2182  --with-sjavac-server-java
2183                          use this java binary for running the sjavac
2184                          background server [Boot JDK java]
2185  --with-ccache-dir       where to store ccache files [~/.ccache]
2186
2187Some influential environment variables:
2188  BASENAME    Override default value for BASENAME
2189  BASH        Override default value for BASH
2190  CAT         Override default value for CAT
2191  CHMOD       Override default value for CHMOD
2192  CMP         Override default value for CMP
2193  COMM        Override default value for COMM
2194  CP          Override default value for CP
2195  CUT         Override default value for CUT
2196  DATE        Override default value for DATE
2197  DIFF        Override default value for DIFF
2198  DIRNAME     Override default value for DIRNAME
2199  ECHO        Override default value for ECHO
2200  EXPR        Override default value for EXPR
2201  FILE        Override default value for FILE
2202  FIND        Override default value for FIND
2203  HEAD        Override default value for HEAD
2204  GUNZIP      Override default value for GUNZIP
2205  GZIP        Override default value for GZIP
2206  LN          Override default value for LN
2207  LS          Override default value for LS
2208  MKDIR       Override default value for MKDIR
2209  MKTEMP      Override default value for MKTEMP
2210  MV          Override default value for MV
2211  NAWK        Override default value for NAWK
2212  PRINTF      Override default value for PRINTF
2213  RM          Override default value for RM
2214  RMDIR       Override default value for RMDIR
2215  SH          Override default value for SH
2216  SORT        Override default value for SORT
2217  TAIL        Override default value for TAIL
2218  TAR         Override default value for TAR
2219  TEE         Override default value for TEE
2220  TOUCH       Override default value for TOUCH
2221  TR          Override default value for TR
2222  UNAME       Override default value for UNAME
2223  UNIQ        Override default value for UNIQ
2224  WC          Override default value for WC
2225  WHICH       Override default value for WHICH
2226  XARGS       Override default value for XARGS
2227  AWK         Override default value for AWK
2228  GREP        Override default value for GREP
2229  EGREP       Override default value for EGREP
2230  FGREP       Override default value for FGREP
2231  SED         Override default value for SED
2232  CYGPATH     Override default value for CYGPATH
2233  READLINK    Override default value for READLINK
2234  DF          Override default value for DF
2235  CPIO        Override default value for CPIO
2236  NICE        Override default value for NICE
2237  MAKE        Override default value for MAKE
2238  UNZIP       Override default value for UNZIP
2239  ZIP         Override default value for ZIP
2240  LDD         Override default value for LDD
2241  OTOOL       Override default value for OTOOL
2242  READELF     Override default value for READELF
2243  HG          Override default value for HG
2244  STAT        Override default value for STAT
2245  TIME        Override default value for TIME
2246  DTRACE      Override default value for DTRACE
2247  PATCH       Override default value for PATCH
2248  DSYMUTIL    Override default value for DSYMUTIL
2249  XATTR       Override default value for XATTR
2250  CODESIGN    Override default value for CODESIGN
2251  SETFILE     Override default value for SETFILE
2252  PKG_CONFIG  path to pkg-config utility
2253  JAVA        Override default value for JAVA
2254  JAVAC       Override default value for JAVAC
2255  JAVAH       Override default value for JAVAH
2256  JAR         Override default value for JAR
2257  JARSIGNER   Override default value for JARSIGNER
2258  CC          C compiler command
2259  CFLAGS      C compiler flags
2260  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2261              nonstandard directory <lib dir>
2262  LIBS        libraries to pass to the linker, e.g. -l<library>
2263  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2264              you have headers in a nonstandard directory <include dir>
2265  CXX         C++ compiler command
2266  CXXFLAGS    C++ compiler flags
2267  CPP         C preprocessor
2268  CXXCPP      C++ preprocessor
2269  AS          Override default value for AS
2270  AR          Override default value for AR
2271  LIPO        Override default value for LIPO
2272  STRIP       Override default value for STRIP
2273  NM          Override default value for NM
2274  GNM         Override default value for GNM
2275  OBJCOPY     Override default value for OBJCOPY
2276  OBJDUMP     Override default value for OBJDUMP
2277  BUILD_CC    Override default value for BUILD_CC
2278  BUILD_CXX   Override default value for BUILD_CXX
2279  BUILD_NM    Override default value for BUILD_NM
2280  BUILD_AR    Override default value for BUILD_AR
2281  BUILD_OBJCOPY
2282              Override default value for BUILD_OBJCOPY
2283  BUILD_STRIP Override default value for BUILD_STRIP
2284  JTREGEXE    Override default value for JTREGEXE
2285  XMKMF       Path to xmkmf, Makefile generator for X Window System
2286  FREETYPE_CFLAGS
2287              C compiler flags for FREETYPE, overriding pkg-config
2288  FREETYPE_LIBS
2289              linker flags for FREETYPE, overriding pkg-config
2290  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2291  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2292  LIBFFI_CFLAGS
2293              C compiler flags for LIBFFI, overriding pkg-config
2294  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2295  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2296  PNG_LIBS    linker flags for PNG, overriding pkg-config
2297  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2298  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2299  ICECC_CMD   Override default value for ICECC_CMD
2300  ICECC_CREATE_ENV
2301              Override default value for ICECC_CREATE_ENV
2302  ICECC_WRAPPER
2303              Override default value for ICECC_WRAPPER
2304  CCACHE      Override default value for CCACHE
2305
2306Use these variables to override the choices made by `configure' or to help
2307it to find libraries and programs with nonstandard names/locations.
2308
2309Report bugs to <build-dev@openjdk.java.net>.
2310OpenJDK home page: <http://openjdk.java.net>.
2311_ACEOF
2312ac_status=$?
2313fi
2314
2315if test "$ac_init_help" = "recursive"; then
2316  # If there are subdirs, report their specific --help.
2317  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2318    test -d "$ac_dir" ||
2319      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2320      continue
2321    ac_builddir=.
2322
2323case "$ac_dir" in
2324.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2325*)
2326  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2327  # A ".." for each directory in $ac_dir_suffix.
2328  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2329  case $ac_top_builddir_sub in
2330  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2331  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2332  esac ;;
2333esac
2334ac_abs_top_builddir=$ac_pwd
2335ac_abs_builddir=$ac_pwd$ac_dir_suffix
2336# for backward compatibility:
2337ac_top_builddir=$ac_top_build_prefix
2338
2339case $srcdir in
2340  .)  # We are building in place.
2341    ac_srcdir=.
2342    ac_top_srcdir=$ac_top_builddir_sub
2343    ac_abs_top_srcdir=$ac_pwd ;;
2344  [\\/]* | ?:[\\/]* )  # Absolute name.
2345    ac_srcdir=$srcdir$ac_dir_suffix;
2346    ac_top_srcdir=$srcdir
2347    ac_abs_top_srcdir=$srcdir ;;
2348  *) # Relative name.
2349    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2350    ac_top_srcdir=$ac_top_build_prefix$srcdir
2351    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2352esac
2353ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2354
2355    cd "$ac_dir" || { ac_status=$?; continue; }
2356    # Check for guested configure.
2357    if test -f "$ac_srcdir/configure.gnu"; then
2358      echo &&
2359      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2360    elif test -f "$ac_srcdir/configure"; then
2361      echo &&
2362      $SHELL "$ac_srcdir/configure" --help=recursive
2363    else
2364      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2365    fi || ac_status=$?
2366    cd "$ac_pwd" || { ac_status=$?; break; }
2367  done
2368fi
2369
2370test -n "$ac_init_help" && exit $ac_status
2371if $ac_init_version; then
2372  cat <<\_ACEOF
2373OpenJDK configure jdk9
2374generated by GNU Autoconf 2.69
2375
2376Copyright (C) 2012 Free Software Foundation, Inc.
2377This configure script is free software; the Free Software Foundation
2378gives unlimited permission to copy, distribute and modify it.
2379_ACEOF
2380  exit
2381fi
2382
2383## ------------------------ ##
2384## Autoconf initialization. ##
2385## ------------------------ ##
2386
2387# ac_fn_c_try_compile LINENO
2388# --------------------------
2389# Try to compile conftest.$ac_ext, and return whether this succeeded.
2390ac_fn_c_try_compile ()
2391{
2392  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2393  rm -f conftest.$ac_objext
2394  if { { ac_try="$ac_compile"
2395case "(($ac_try" in
2396  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2397  *) ac_try_echo=$ac_try;;
2398esac
2399eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2400$as_echo "$ac_try_echo"; } >&5
2401  (eval "$ac_compile") 2>conftest.err
2402  ac_status=$?
2403  if test -s conftest.err; then
2404    grep -v '^ *+' conftest.err >conftest.er1
2405    cat conftest.er1 >&5
2406    mv -f conftest.er1 conftest.err
2407  fi
2408  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2409  test $ac_status = 0; } && {
2410	 test -z "$ac_c_werror_flag" ||
2411	 test ! -s conftest.err
2412       } && test -s conftest.$ac_objext; then :
2413  ac_retval=0
2414else
2415  $as_echo "$as_me: failed program was:" >&5
2416sed 's/^/| /' conftest.$ac_ext >&5
2417
2418	ac_retval=1
2419fi
2420  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2421  as_fn_set_status $ac_retval
2422
2423} # ac_fn_c_try_compile
2424
2425# ac_fn_cxx_try_compile LINENO
2426# ----------------------------
2427# Try to compile conftest.$ac_ext, and return whether this succeeded.
2428ac_fn_cxx_try_compile ()
2429{
2430  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2431  rm -f conftest.$ac_objext
2432  if { { ac_try="$ac_compile"
2433case "(($ac_try" in
2434  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2435  *) ac_try_echo=$ac_try;;
2436esac
2437eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2438$as_echo "$ac_try_echo"; } >&5
2439  (eval "$ac_compile") 2>conftest.err
2440  ac_status=$?
2441  if test -s conftest.err; then
2442    grep -v '^ *+' conftest.err >conftest.er1
2443    cat conftest.er1 >&5
2444    mv -f conftest.er1 conftest.err
2445  fi
2446  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2447  test $ac_status = 0; } && {
2448	 test -z "$ac_cxx_werror_flag" ||
2449	 test ! -s conftest.err
2450       } && test -s conftest.$ac_objext; then :
2451  ac_retval=0
2452else
2453  $as_echo "$as_me: failed program was:" >&5
2454sed 's/^/| /' conftest.$ac_ext >&5
2455
2456	ac_retval=1
2457fi
2458  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2459  as_fn_set_status $ac_retval
2460
2461} # ac_fn_cxx_try_compile
2462
2463# ac_fn_c_try_cpp LINENO
2464# ----------------------
2465# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2466ac_fn_c_try_cpp ()
2467{
2468  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2469  if { { ac_try="$ac_cpp conftest.$ac_ext"
2470case "(($ac_try" in
2471  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2472  *) ac_try_echo=$ac_try;;
2473esac
2474eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2475$as_echo "$ac_try_echo"; } >&5
2476  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2477  ac_status=$?
2478  if test -s conftest.err; then
2479    grep -v '^ *+' conftest.err >conftest.er1
2480    cat conftest.er1 >&5
2481    mv -f conftest.er1 conftest.err
2482  fi
2483  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2484  test $ac_status = 0; } > conftest.i && {
2485	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2486	 test ! -s conftest.err
2487       }; then :
2488  ac_retval=0
2489else
2490  $as_echo "$as_me: failed program was:" >&5
2491sed 's/^/| /' conftest.$ac_ext >&5
2492
2493    ac_retval=1
2494fi
2495  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2496  as_fn_set_status $ac_retval
2497
2498} # ac_fn_c_try_cpp
2499
2500# ac_fn_cxx_try_cpp LINENO
2501# ------------------------
2502# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2503ac_fn_cxx_try_cpp ()
2504{
2505  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2506  if { { ac_try="$ac_cpp conftest.$ac_ext"
2507case "(($ac_try" in
2508  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2509  *) ac_try_echo=$ac_try;;
2510esac
2511eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2512$as_echo "$ac_try_echo"; } >&5
2513  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2514  ac_status=$?
2515  if test -s conftest.err; then
2516    grep -v '^ *+' conftest.err >conftest.er1
2517    cat conftest.er1 >&5
2518    mv -f conftest.er1 conftest.err
2519  fi
2520  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2521  test $ac_status = 0; } > conftest.i && {
2522	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2523	 test ! -s conftest.err
2524       }; then :
2525  ac_retval=0
2526else
2527  $as_echo "$as_me: failed program was:" >&5
2528sed 's/^/| /' conftest.$ac_ext >&5
2529
2530    ac_retval=1
2531fi
2532  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2533  as_fn_set_status $ac_retval
2534
2535} # ac_fn_cxx_try_cpp
2536
2537# ac_fn_c_try_link LINENO
2538# -----------------------
2539# Try to link conftest.$ac_ext, and return whether this succeeded.
2540ac_fn_c_try_link ()
2541{
2542  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2543  rm -f conftest.$ac_objext conftest$ac_exeext
2544  if { { ac_try="$ac_link"
2545case "(($ac_try" in
2546  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2547  *) ac_try_echo=$ac_try;;
2548esac
2549eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2550$as_echo "$ac_try_echo"; } >&5
2551  (eval "$ac_link") 2>conftest.err
2552  ac_status=$?
2553  if test -s conftest.err; then
2554    grep -v '^ *+' conftest.err >conftest.er1
2555    cat conftest.er1 >&5
2556    mv -f conftest.er1 conftest.err
2557  fi
2558  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2559  test $ac_status = 0; } && {
2560	 test -z "$ac_c_werror_flag" ||
2561	 test ! -s conftest.err
2562       } && test -s conftest$ac_exeext && {
2563	 test "$cross_compiling" = yes ||
2564	 test -x conftest$ac_exeext
2565       }; then :
2566  ac_retval=0
2567else
2568  $as_echo "$as_me: failed program was:" >&5
2569sed 's/^/| /' conftest.$ac_ext >&5
2570
2571	ac_retval=1
2572fi
2573  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2574  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2575  # interfere with the next link command; also delete a directory that is
2576  # left behind by Apple's compiler.  We do this before executing the actions.
2577  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2578  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2579  as_fn_set_status $ac_retval
2580
2581} # ac_fn_c_try_link
2582
2583# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2584# ---------------------------------------------------------
2585# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2586# the include files in INCLUDES and setting the cache variable VAR
2587# accordingly.
2588ac_fn_cxx_check_header_mongrel ()
2589{
2590  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2591  if eval \${$3+:} false; then :
2592  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2593$as_echo_n "checking for $2... " >&6; }
2594if eval \${$3+:} false; then :
2595  $as_echo_n "(cached) " >&6
2596fi
2597eval ac_res=\$$3
2598	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2599$as_echo "$ac_res" >&6; }
2600else
2601  # Is the header compilable?
2602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2603$as_echo_n "checking $2 usability... " >&6; }
2604cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2605/* end confdefs.h.  */
2606$4
2607#include <$2>
2608_ACEOF
2609if ac_fn_cxx_try_compile "$LINENO"; then :
2610  ac_header_compiler=yes
2611else
2612  ac_header_compiler=no
2613fi
2614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2616$as_echo "$ac_header_compiler" >&6; }
2617
2618# Is the header present?
2619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2620$as_echo_n "checking $2 presence... " >&6; }
2621cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2622/* end confdefs.h.  */
2623#include <$2>
2624_ACEOF
2625if ac_fn_cxx_try_cpp "$LINENO"; then :
2626  ac_header_preproc=yes
2627else
2628  ac_header_preproc=no
2629fi
2630rm -f conftest.err conftest.i conftest.$ac_ext
2631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2632$as_echo "$ac_header_preproc" >&6; }
2633
2634# So?  What about this header?
2635case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2636  yes:no: )
2637    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2638$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2639    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2640$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2641    ;;
2642  no:yes:* )
2643    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2644$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2645    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2646$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2647    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2648$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2649    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2650$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2651    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2652$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2653( $as_echo "## ----------------------------------------- ##
2654## Report this to build-dev@openjdk.java.net ##
2655## ----------------------------------------- ##"
2656     ) | sed "s/^/$as_me: WARNING:     /" >&2
2657    ;;
2658esac
2659  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2660$as_echo_n "checking for $2... " >&6; }
2661if eval \${$3+:} false; then :
2662  $as_echo_n "(cached) " >&6
2663else
2664  eval "$3=\$ac_header_compiler"
2665fi
2666eval ac_res=\$$3
2667	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2668$as_echo "$ac_res" >&6; }
2669fi
2670  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2671
2672} # ac_fn_cxx_check_header_mongrel
2673
2674# ac_fn_cxx_try_run LINENO
2675# ------------------------
2676# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2677# that executables *can* be run.
2678ac_fn_cxx_try_run ()
2679{
2680  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2681  if { { ac_try="$ac_link"
2682case "(($ac_try" in
2683  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2684  *) ac_try_echo=$ac_try;;
2685esac
2686eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2687$as_echo "$ac_try_echo"; } >&5
2688  (eval "$ac_link") 2>&5
2689  ac_status=$?
2690  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2691  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2692  { { case "(($ac_try" in
2693  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2694  *) ac_try_echo=$ac_try;;
2695esac
2696eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2697$as_echo "$ac_try_echo"; } >&5
2698  (eval "$ac_try") 2>&5
2699  ac_status=$?
2700  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2701  test $ac_status = 0; }; }; then :
2702  ac_retval=0
2703else
2704  $as_echo "$as_me: program exited with status $ac_status" >&5
2705       $as_echo "$as_me: failed program was:" >&5
2706sed 's/^/| /' conftest.$ac_ext >&5
2707
2708       ac_retval=$ac_status
2709fi
2710  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2711  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2712  as_fn_set_status $ac_retval
2713
2714} # ac_fn_cxx_try_run
2715
2716# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2717# ---------------------------------------------------------
2718# Tests whether HEADER exists and can be compiled using the include files in
2719# INCLUDES, setting the cache variable VAR accordingly.
2720ac_fn_cxx_check_header_compile ()
2721{
2722  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2723  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2724$as_echo_n "checking for $2... " >&6; }
2725if eval \${$3+:} false; then :
2726  $as_echo_n "(cached) " >&6
2727else
2728  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2729/* end confdefs.h.  */
2730$4
2731#include <$2>
2732_ACEOF
2733if ac_fn_cxx_try_compile "$LINENO"; then :
2734  eval "$3=yes"
2735else
2736  eval "$3=no"
2737fi
2738rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2739fi
2740eval ac_res=\$$3
2741	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2742$as_echo "$ac_res" >&6; }
2743  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2744
2745} # ac_fn_cxx_check_header_compile
2746
2747# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2748# ----------------------------------------------
2749# Tries to find the compile-time value of EXPR in a program that includes
2750# INCLUDES, setting VAR accordingly. Returns whether the value could be
2751# computed
2752ac_fn_cxx_compute_int ()
2753{
2754  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2755  if test "$cross_compiling" = yes; then
2756    # Depending upon the size, compute the lo and hi bounds.
2757cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2758/* end confdefs.h.  */
2759$4
2760int
2761main ()
2762{
2763static int test_array [1 - 2 * !(($2) >= 0)];
2764test_array [0] = 0;
2765return test_array [0];
2766
2767  ;
2768  return 0;
2769}
2770_ACEOF
2771if ac_fn_cxx_try_compile "$LINENO"; then :
2772  ac_lo=0 ac_mid=0
2773  while :; do
2774    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2775/* end confdefs.h.  */
2776$4
2777int
2778main ()
2779{
2780static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2781test_array [0] = 0;
2782return test_array [0];
2783
2784  ;
2785  return 0;
2786}
2787_ACEOF
2788if ac_fn_cxx_try_compile "$LINENO"; then :
2789  ac_hi=$ac_mid; break
2790else
2791  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2792			if test $ac_lo -le $ac_mid; then
2793			  ac_lo= ac_hi=
2794			  break
2795			fi
2796			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2797fi
2798rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2799  done
2800else
2801  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2802/* end confdefs.h.  */
2803$4
2804int
2805main ()
2806{
2807static int test_array [1 - 2 * !(($2) < 0)];
2808test_array [0] = 0;
2809return test_array [0];
2810
2811  ;
2812  return 0;
2813}
2814_ACEOF
2815if ac_fn_cxx_try_compile "$LINENO"; then :
2816  ac_hi=-1 ac_mid=-1
2817  while :; do
2818    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2819/* end confdefs.h.  */
2820$4
2821int
2822main ()
2823{
2824static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2825test_array [0] = 0;
2826return test_array [0];
2827
2828  ;
2829  return 0;
2830}
2831_ACEOF
2832if ac_fn_cxx_try_compile "$LINENO"; then :
2833  ac_lo=$ac_mid; break
2834else
2835  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2836			if test $ac_mid -le $ac_hi; then
2837			  ac_lo= ac_hi=
2838			  break
2839			fi
2840			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2841fi
2842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2843  done
2844else
2845  ac_lo= ac_hi=
2846fi
2847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2848fi
2849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2850# Binary search between lo and hi bounds.
2851while test "x$ac_lo" != "x$ac_hi"; do
2852  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2853  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2854/* end confdefs.h.  */
2855$4
2856int
2857main ()
2858{
2859static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2860test_array [0] = 0;
2861return test_array [0];
2862
2863  ;
2864  return 0;
2865}
2866_ACEOF
2867if ac_fn_cxx_try_compile "$LINENO"; then :
2868  ac_hi=$ac_mid
2869else
2870  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2871fi
2872rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2873done
2874case $ac_lo in #((
2875?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2876'') ac_retval=1 ;;
2877esac
2878  else
2879    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2880/* end confdefs.h.  */
2881$4
2882static long int longval () { return $2; }
2883static unsigned long int ulongval () { return $2; }
2884#include <stdio.h>
2885#include <stdlib.h>
2886int
2887main ()
2888{
2889
2890  FILE *f = fopen ("conftest.val", "w");
2891  if (! f)
2892    return 1;
2893  if (($2) < 0)
2894    {
2895      long int i = longval ();
2896      if (i != ($2))
2897	return 1;
2898      fprintf (f, "%ld", i);
2899    }
2900  else
2901    {
2902      unsigned long int i = ulongval ();
2903      if (i != ($2))
2904	return 1;
2905      fprintf (f, "%lu", i);
2906    }
2907  /* Do not output a trailing newline, as this causes \r\n confusion
2908     on some platforms.  */
2909  return ferror (f) || fclose (f) != 0;
2910
2911  ;
2912  return 0;
2913}
2914_ACEOF
2915if ac_fn_cxx_try_run "$LINENO"; then :
2916  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2917else
2918  ac_retval=1
2919fi
2920rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2921  conftest.$ac_objext conftest.beam conftest.$ac_ext
2922rm -f conftest.val
2923
2924  fi
2925  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2926  as_fn_set_status $ac_retval
2927
2928} # ac_fn_cxx_compute_int
2929
2930# ac_fn_cxx_try_link LINENO
2931# -------------------------
2932# Try to link conftest.$ac_ext, and return whether this succeeded.
2933ac_fn_cxx_try_link ()
2934{
2935  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2936  rm -f conftest.$ac_objext conftest$ac_exeext
2937  if { { ac_try="$ac_link"
2938case "(($ac_try" in
2939  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2940  *) ac_try_echo=$ac_try;;
2941esac
2942eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2943$as_echo "$ac_try_echo"; } >&5
2944  (eval "$ac_link") 2>conftest.err
2945  ac_status=$?
2946  if test -s conftest.err; then
2947    grep -v '^ *+' conftest.err >conftest.er1
2948    cat conftest.er1 >&5
2949    mv -f conftest.er1 conftest.err
2950  fi
2951  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2952  test $ac_status = 0; } && {
2953	 test -z "$ac_cxx_werror_flag" ||
2954	 test ! -s conftest.err
2955       } && test -s conftest$ac_exeext && {
2956	 test "$cross_compiling" = yes ||
2957	 test -x conftest$ac_exeext
2958       }; then :
2959  ac_retval=0
2960else
2961  $as_echo "$as_me: failed program was:" >&5
2962sed 's/^/| /' conftest.$ac_ext >&5
2963
2964	ac_retval=1
2965fi
2966  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2967  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2968  # interfere with the next link command; also delete a directory that is
2969  # left behind by Apple's compiler.  We do this before executing the actions.
2970  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2971  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2972  as_fn_set_status $ac_retval
2973
2974} # ac_fn_cxx_try_link
2975
2976# ac_fn_cxx_check_func LINENO FUNC VAR
2977# ------------------------------------
2978# Tests whether FUNC exists, setting the cache variable VAR accordingly
2979ac_fn_cxx_check_func ()
2980{
2981  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2982  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2983$as_echo_n "checking for $2... " >&6; }
2984if eval \${$3+:} false; then :
2985  $as_echo_n "(cached) " >&6
2986else
2987  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2988/* end confdefs.h.  */
2989/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2990   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2991#define $2 innocuous_$2
2992
2993/* System header to define __stub macros and hopefully few prototypes,
2994    which can conflict with char $2 (); below.
2995    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2996    <limits.h> exists even on freestanding compilers.  */
2997
2998#ifdef __STDC__
2999# include <limits.h>
3000#else
3001# include <assert.h>
3002#endif
3003
3004#undef $2
3005
3006/* Override any GCC internal prototype to avoid an error.
3007   Use char because int might match the return type of a GCC
3008   builtin and then its argument prototype would still apply.  */
3009#ifdef __cplusplus
3010extern "C"
3011#endif
3012char $2 ();
3013/* The GNU C library defines this for functions which it implements
3014    to always fail with ENOSYS.  Some functions are actually named
3015    something starting with __ and the normal name is an alias.  */
3016#if defined __stub_$2 || defined __stub___$2
3017choke me
3018#endif
3019
3020int
3021main ()
3022{
3023return $2 ();
3024  ;
3025  return 0;
3026}
3027_ACEOF
3028if ac_fn_cxx_try_link "$LINENO"; then :
3029  eval "$3=yes"
3030else
3031  eval "$3=no"
3032fi
3033rm -f core conftest.err conftest.$ac_objext \
3034    conftest$ac_exeext conftest.$ac_ext
3035fi
3036eval ac_res=\$$3
3037	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3038$as_echo "$ac_res" >&6; }
3039  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3040
3041} # ac_fn_cxx_check_func
3042
3043# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3044# -------------------------------------------------------
3045# Tests whether HEADER exists and can be compiled using the include files in
3046# INCLUDES, setting the cache variable VAR accordingly.
3047ac_fn_c_check_header_compile ()
3048{
3049  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3050  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3051$as_echo_n "checking for $2... " >&6; }
3052if eval \${$3+:} false; then :
3053  $as_echo_n "(cached) " >&6
3054else
3055  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3056/* end confdefs.h.  */
3057$4
3058#include <$2>
3059_ACEOF
3060if ac_fn_c_try_compile "$LINENO"; then :
3061  eval "$3=yes"
3062else
3063  eval "$3=no"
3064fi
3065rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3066fi
3067eval ac_res=\$$3
3068	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3069$as_echo "$ac_res" >&6; }
3070  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3071
3072} # ac_fn_c_check_header_compile
3073cat >config.log <<_ACEOF
3074This file contains any messages produced by compilers while
3075running configure, to aid debugging if configure makes a mistake.
3076
3077It was created by OpenJDK $as_me jdk9, which was
3078generated by GNU Autoconf 2.69.  Invocation command line was
3079
3080  $ $0 $@
3081
3082_ACEOF
3083exec 5>>config.log
3084{
3085cat <<_ASUNAME
3086## --------- ##
3087## Platform. ##
3088## --------- ##
3089
3090hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3091uname -m = `(uname -m) 2>/dev/null || echo unknown`
3092uname -r = `(uname -r) 2>/dev/null || echo unknown`
3093uname -s = `(uname -s) 2>/dev/null || echo unknown`
3094uname -v = `(uname -v) 2>/dev/null || echo unknown`
3095
3096/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3097/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3098
3099/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3100/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3101/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3102/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3103/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3104/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3105/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3106
3107_ASUNAME
3108
3109as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3110for as_dir in $PATH
3111do
3112  IFS=$as_save_IFS
3113  test -z "$as_dir" && as_dir=.
3114    $as_echo "PATH: $as_dir"
3115  done
3116IFS=$as_save_IFS
3117
3118} >&5
3119
3120cat >&5 <<_ACEOF
3121
3122
3123## ----------- ##
3124## Core tests. ##
3125## ----------- ##
3126
3127_ACEOF
3128
3129
3130# Keep a trace of the command line.
3131# Strip out --no-create and --no-recursion so they do not pile up.
3132# Strip out --silent because we don't want to record it for future runs.
3133# Also quote any args containing shell meta-characters.
3134# Make two passes to allow for proper duplicate-argument suppression.
3135ac_configure_args=
3136ac_configure_args0=
3137ac_configure_args1=
3138ac_must_keep_next=false
3139for ac_pass in 1 2
3140do
3141  for ac_arg
3142  do
3143    case $ac_arg in
3144    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3145    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3146    | -silent | --silent | --silen | --sile | --sil)
3147      continue ;;
3148    *\'*)
3149      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3150    esac
3151    case $ac_pass in
3152    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3153    2)
3154      as_fn_append ac_configure_args1 " '$ac_arg'"
3155      if test $ac_must_keep_next = true; then
3156	ac_must_keep_next=false # Got value, back to normal.
3157      else
3158	case $ac_arg in
3159	  *=* | --config-cache | -C | -disable-* | --disable-* \
3160	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3161	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3162	  | -with-* | --with-* | -without-* | --without-* | --x)
3163	    case "$ac_configure_args0 " in
3164	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3165	    esac
3166	    ;;
3167	  -* ) ac_must_keep_next=true ;;
3168	esac
3169      fi
3170      as_fn_append ac_configure_args " '$ac_arg'"
3171      ;;
3172    esac
3173  done
3174done
3175{ ac_configure_args0=; unset ac_configure_args0;}
3176{ ac_configure_args1=; unset ac_configure_args1;}
3177
3178# When interrupted or exit'd, cleanup temporary files, and complete
3179# config.log.  We remove comments because anyway the quotes in there
3180# would cause problems or look ugly.
3181# WARNING: Use '\'' to represent an apostrophe within the trap.
3182# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3183trap 'exit_status=$?
3184  # Save into config.log some information that might help in debugging.
3185  {
3186    echo
3187
3188    $as_echo "## ---------------- ##
3189## Cache variables. ##
3190## ---------------- ##"
3191    echo
3192    # The following way of writing the cache mishandles newlines in values,
3193(
3194  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3195    eval ac_val=\$$ac_var
3196    case $ac_val in #(
3197    *${as_nl}*)
3198      case $ac_var in #(
3199      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3200$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3201      esac
3202      case $ac_var in #(
3203      _ | IFS | as_nl) ;; #(
3204      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3205      *) { eval $ac_var=; unset $ac_var;} ;;
3206      esac ;;
3207    esac
3208  done
3209  (set) 2>&1 |
3210    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3211    *${as_nl}ac_space=\ *)
3212      sed -n \
3213	"s/'\''/'\''\\\\'\'''\''/g;
3214	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3215      ;; #(
3216    *)
3217      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3218      ;;
3219    esac |
3220    sort
3221)
3222    echo
3223
3224    $as_echo "## ----------------- ##
3225## Output variables. ##
3226## ----------------- ##"
3227    echo
3228    for ac_var in $ac_subst_vars
3229    do
3230      eval ac_val=\$$ac_var
3231      case $ac_val in
3232      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3233      esac
3234      $as_echo "$ac_var='\''$ac_val'\''"
3235    done | sort
3236    echo
3237
3238    if test -n "$ac_subst_files"; then
3239      $as_echo "## ------------------- ##
3240## File substitutions. ##
3241## ------------------- ##"
3242      echo
3243      for ac_var in $ac_subst_files
3244      do
3245	eval ac_val=\$$ac_var
3246	case $ac_val in
3247	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3248	esac
3249	$as_echo "$ac_var='\''$ac_val'\''"
3250      done | sort
3251      echo
3252    fi
3253
3254    if test -s confdefs.h; then
3255      $as_echo "## ----------- ##
3256## confdefs.h. ##
3257## ----------- ##"
3258      echo
3259      cat confdefs.h
3260      echo
3261    fi
3262    test "$ac_signal" != 0 &&
3263      $as_echo "$as_me: caught signal $ac_signal"
3264    $as_echo "$as_me: exit $exit_status"
3265  } >&5
3266  rm -f core *.core core.conftest.* &&
3267    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3268    exit $exit_status
3269' 0
3270for ac_signal in 1 2 13 15; do
3271  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3272done
3273ac_signal=0
3274
3275# confdefs.h avoids OS command line length limits that DEFS can exceed.
3276rm -f -r conftest* confdefs.h
3277
3278$as_echo "/* confdefs.h */" > confdefs.h
3279
3280# Predefined preprocessor variables.
3281
3282cat >>confdefs.h <<_ACEOF
3283#define PACKAGE_NAME "$PACKAGE_NAME"
3284_ACEOF
3285
3286cat >>confdefs.h <<_ACEOF
3287#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3288_ACEOF
3289
3290cat >>confdefs.h <<_ACEOF
3291#define PACKAGE_VERSION "$PACKAGE_VERSION"
3292_ACEOF
3293
3294cat >>confdefs.h <<_ACEOF
3295#define PACKAGE_STRING "$PACKAGE_STRING"
3296_ACEOF
3297
3298cat >>confdefs.h <<_ACEOF
3299#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3300_ACEOF
3301
3302cat >>confdefs.h <<_ACEOF
3303#define PACKAGE_URL "$PACKAGE_URL"
3304_ACEOF
3305
3306
3307# Let the site file select an alternate cache file if it wants to.
3308# Prefer an explicitly selected file to automatically selected ones.
3309ac_site_file1=NONE
3310ac_site_file2=NONE
3311if test -n "$CONFIG_SITE"; then
3312  # We do not want a PATH search for config.site.
3313  case $CONFIG_SITE in #((
3314    -*)  ac_site_file1=./$CONFIG_SITE;;
3315    */*) ac_site_file1=$CONFIG_SITE;;
3316    *)   ac_site_file1=./$CONFIG_SITE;;
3317  esac
3318elif test "x$prefix" != xNONE; then
3319  ac_site_file1=$prefix/share/config.site
3320  ac_site_file2=$prefix/etc/config.site
3321else
3322  ac_site_file1=$ac_default_prefix/share/config.site
3323  ac_site_file2=$ac_default_prefix/etc/config.site
3324fi
3325for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3326do
3327  test "x$ac_site_file" = xNONE && continue
3328  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3329    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3330$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3331    sed 's/^/| /' "$ac_site_file" >&5
3332    . "$ac_site_file" \
3333      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3334$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3335as_fn_error $? "failed to load site script $ac_site_file
3336See \`config.log' for more details" "$LINENO" 5; }
3337  fi
3338done
3339
3340if test -r "$cache_file"; then
3341  # Some versions of bash will fail to source /dev/null (special files
3342  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3343  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3344    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3345$as_echo "$as_me: loading cache $cache_file" >&6;}
3346    case $cache_file in
3347      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3348      *)                      . "./$cache_file";;
3349    esac
3350  fi
3351else
3352  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3353$as_echo "$as_me: creating cache $cache_file" >&6;}
3354  >$cache_file
3355fi
3356
3357# Check that the precious variables saved in the cache have kept the same
3358# value.
3359ac_cache_corrupted=false
3360for ac_var in $ac_precious_vars; do
3361  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3362  eval ac_new_set=\$ac_env_${ac_var}_set
3363  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3364  eval ac_new_val=\$ac_env_${ac_var}_value
3365  case $ac_old_set,$ac_new_set in
3366    set,)
3367      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3368$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3369      ac_cache_corrupted=: ;;
3370    ,set)
3371      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3372$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3373      ac_cache_corrupted=: ;;
3374    ,);;
3375    *)
3376      if test "x$ac_old_val" != "x$ac_new_val"; then
3377	# differences in whitespace do not lead to failure.
3378	ac_old_val_w=`echo x $ac_old_val`
3379	ac_new_val_w=`echo x $ac_new_val`
3380	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3381	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3382$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3383	  ac_cache_corrupted=:
3384	else
3385	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3386$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3387	  eval $ac_var=\$ac_old_val
3388	fi
3389	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3390$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3391	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3392$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3393      fi;;
3394  esac
3395  # Pass precious variables to config.status.
3396  if test "$ac_new_set" = set; then
3397    case $ac_new_val in
3398    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3399    *) ac_arg=$ac_var=$ac_new_val ;;
3400    esac
3401    case " $ac_configure_args " in
3402      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3403      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3404    esac
3405  fi
3406done
3407if $ac_cache_corrupted; then
3408  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3409$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3410  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3411$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3412  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3413fi
3414## -------------------- ##
3415## Main body of script. ##
3416## -------------------- ##
3417
3418ac_ext=c
3419ac_cpp='$CPP $CPPFLAGS'
3420ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3421ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3422ac_compiler_gnu=$ac_cv_c_compiler_gnu
3423
3424
3425
3426ac_aux_dir=
3427for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3428  if test -f "$ac_dir/install-sh"; then
3429    ac_aux_dir=$ac_dir
3430    ac_install_sh="$ac_aux_dir/install-sh -c"
3431    break
3432  elif test -f "$ac_dir/install.sh"; then
3433    ac_aux_dir=$ac_dir
3434    ac_install_sh="$ac_aux_dir/install.sh -c"
3435    break
3436  elif test -f "$ac_dir/shtool"; then
3437    ac_aux_dir=$ac_dir
3438    ac_install_sh="$ac_aux_dir/shtool install -c"
3439    break
3440  fi
3441done
3442if test -z "$ac_aux_dir"; then
3443  as_fn_error $? "cannot find install-sh, install.sh, or shtool in $TOPDIR/common/autoconf/build-aux \"$srcdir\"/$TOPDIR/common/autoconf/build-aux" "$LINENO" 5
3444fi
3445
3446# These three variables are undocumented and unsupported,
3447# and are intended to be withdrawn in a future Autoconf release.
3448# They can cause serious problems if a builder's source tree is in a directory
3449# whose full name contains unusual characters.
3450ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3451ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3452ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3453
3454
3455# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3456
3457#
3458# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3459# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3460#
3461# This code is free software; you can redistribute it and/or modify it
3462# under the terms of the GNU General Public License version 2 only, as
3463# published by the Free Software Foundation.  Oracle designates this
3464# particular file as subject to the "Classpath" exception as provided
3465# by Oracle in the LICENSE file that accompanied this code.
3466#
3467# This code is distributed in the hope that it will be useful, but WITHOUT
3468# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3469# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3470# version 2 for more details (a copy is included in the LICENSE file that
3471# accompanied this code).
3472#
3473# You should have received a copy of the GNU General Public License version
3474# 2 along with this work; if not, write to the Free Software Foundation,
3475# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3476#
3477# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3478# or visit www.oracle.com if you need additional information or have any
3479# questions.
3480#
3481
3482#
3483# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3484#
3485# This program is free software; you can redistribute it and/or modify
3486# it under the terms of the GNU General Public License as published by
3487# the Free Software Foundation; either version 2 of the License, or
3488# (at your option) any later version.
3489#
3490# This program is distributed in the hope that it will be useful, but
3491# WITHOUT ANY WARRANTY; without even the implied warranty of
3492# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3493# General Public License for more details.
3494#
3495# You should have received a copy of the GNU General Public License
3496# along with this program; if not, write to the Free Software
3497# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3498#
3499# As a special exception to the GNU General Public License, if you
3500# distribute this file as part of a program that contains a
3501# configuration script generated by Autoconf, you may include it under
3502# the same distribution terms that you use for the rest of that program.
3503
3504# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3505# ----------------------------------
3506# PKG_PROG_PKG_CONFIG
3507
3508# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3509#
3510# Check to see whether a particular set of modules exists.  Similar
3511# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3512#
3513#
3514# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3515# this or PKG_CHECK_MODULES is called, or make sure to call
3516# PKG_CHECK_EXISTS manually
3517# --------------------------------------------------------------
3518
3519
3520
3521# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3522# ---------------------------------------------
3523# _PKG_CONFIG
3524
3525# _PKG_SHORT_ERRORS_SUPPORTED
3526# -----------------------------
3527# _PKG_SHORT_ERRORS_SUPPORTED
3528
3529
3530# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3531# [ACTION-IF-NOT-FOUND])
3532#
3533#
3534# Note that if there is a possibility the first call to
3535# PKG_CHECK_MODULES might not happen, you should be sure to include an
3536# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3537#
3538#
3539# --------------------------------------------------------------
3540# PKG_CHECK_MODULES
3541
3542
3543# Include these first...
3544#
3545# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3546# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3547#
3548# This code is free software; you can redistribute it and/or modify it
3549# under the terms of the GNU General Public License version 2 only, as
3550# published by the Free Software Foundation.  Oracle designates this
3551# particular file as subject to the "Classpath" exception as provided
3552# by Oracle in the LICENSE file that accompanied this code.
3553#
3554# This code is distributed in the hope that it will be useful, but WITHOUT
3555# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3556# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3557# version 2 for more details (a copy is included in the LICENSE file that
3558# accompanied this code).
3559#
3560# You should have received a copy of the GNU General Public License version
3561# 2 along with this work; if not, write to the Free Software Foundation,
3562# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3563#
3564# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3565# or visit www.oracle.com if you need additional information or have any
3566# questions.
3567#
3568
3569# Create a function/macro that takes a series of named arguments. The call is
3570# similar to AC_DEFUN, but the setup of the function looks like this:
3571# BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3572# ... do something
3573#   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3574# ])
3575# A star (*) in front of a named argument means that it is required and it's
3576# presence will be verified. To pass e.g. the first value as a normal indexed
3577# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3578# arguments are referenced in the function by their name prefixed by ARG_, e.g.
3579# "ARG_FOO".
3580#
3581# The generated function can be called like this:
3582# MYFUNC(FOO: [foo-val],
3583#     BAR: [
3584#         $ECHO hello world
3585#     ])
3586# Note that the argument value must start on the same line as the argument name.
3587#
3588# Argument 1: Name of the function to define
3589# Argument 2: List of legal named arguments, with a * prefix for required arguments
3590# Argument 3: Argument array to treat as named, typically $@
3591# Argument 4: The main function body
3592
3593
3594# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3595# If so, then append $1 to $2 \
3596# Also set JVM_ARG_OK to true/false depending on outcome.
3597
3598
3599# Appends a string to a path variable, only adding the : when needed.
3600
3601
3602# Prepends a string to a path variable, only adding the : when needed.
3603
3604
3605# This will make sure the given variable points to a full and proper
3606# path. This means:
3607# 1) There will be no spaces in the path. On unix platforms,
3608#    spaces in the path will result in an error. On Windows,
3609#    the path will be rewritten using short-style to be space-free.
3610# 2) The path will be absolute, and it will be in unix-style (on
3611#     cygwin).
3612# $1: The name of the variable to fix
3613
3614
3615# This will make sure the given variable points to a executable
3616# with a full and proper path. This means:
3617# 1) There will be no spaces in the path. On unix platforms,
3618#    spaces in the path will result in an error. On Windows,
3619#    the path will be rewritten using short-style to be space-free.
3620# 2) The path will be absolute, and it will be in unix-style (on
3621#     cygwin).
3622# Any arguments given to the executable is preserved.
3623# If the input variable does not have a directory specification, then
3624# it need to be in the PATH.
3625# $1: The name of the variable to fix
3626
3627
3628
3629
3630# Register a --with argument but mark it as deprecated
3631# $1: The name of the with argument to deprecate, not including --with-
3632
3633
3634# Register a --enable argument but mark it as deprecated
3635# $1: The name of the with argument to deprecate, not including --enable-
3636# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3637# $3: Messages to user.
3638
3639
3640
3641
3642# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3643# $1: variable to check
3644
3645
3646# Check that there are no unprocessed overridden variables left.
3647# If so, they are an incorrect argument and we will exit with an error.
3648
3649
3650# Setup a tool for the given variable. If correctly specified by the user,
3651# use that value, otherwise search for the tool using the supplied code snippet.
3652# $1: variable to set
3653# $2: code snippet to call to look for the tool
3654# $3: code snippet to call if variable was used to find tool
3655
3656
3657# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3658# $1: variable to set
3659# $2: executable name (or list of names) to look for
3660# $3: [path]
3661
3662
3663# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3664# $1: variable to set
3665# $2: executable name (or list of names) to look for
3666
3667
3668# Like BASIC_PATH_PROGS but fails if no tool was found.
3669# $1: variable to set
3670# $2: executable name (or list of names) to look for
3671# $3: [path]
3672
3673
3674# Like BASIC_SETUP_TOOL but fails if no tool was found.
3675# $1: variable to set
3676# $2: autoconf macro to call to look for the special tool
3677
3678
3679# Setup the most fundamental tools that relies on not much else to set up,
3680# but is used by much of the early bootstrap code.
3681
3682
3683# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3684
3685
3686# Evaluates platform specific overrides for devkit variables.
3687# $1: Name of variable
3688
3689
3690
3691
3692
3693
3694#%%% Simple tools %%%
3695
3696# Check if we have found a usable version of make
3697# $1: the path to a potential make binary (or empty)
3698# $2: the description on how we found this
3699
3700
3701
3702
3703# Goes looking for a usable version of GNU make.
3704
3705
3706
3707
3708
3709
3710
3711
3712# Check if build directory is on local disk. If not possible to determine,
3713# we prefer to claim it's local.
3714# Argument 1: directory to test
3715# Argument 2: what to do if it is on local disk
3716# Argument 3: what to do otherwise (remote disk or failure)
3717
3718
3719# Check that source files have basic read permissions set. This might
3720# not be the case in cygwin in certain conditions.
3721
3722
3723
3724
3725# Check for support for specific options in bash
3726
3727
3728################################################################################
3729#
3730# Default make target
3731#
3732
3733
3734# Code to run after AC_OUTPUT
3735
3736
3737#
3738# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3739# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3740#
3741# This code is free software; you can redistribute it and/or modify it
3742# under the terms of the GNU General Public License version 2 only, as
3743# published by the Free Software Foundation.  Oracle designates this
3744# particular file as subject to the "Classpath" exception as provided
3745# by Oracle in the LICENSE file that accompanied this code.
3746#
3747# This code is distributed in the hope that it will be useful, but WITHOUT
3748# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3749# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3750# version 2 for more details (a copy is included in the LICENSE file that
3751# accompanied this code).
3752#
3753# You should have received a copy of the GNU General Public License version
3754# 2 along with this work; if not, write to the Free Software Foundation,
3755# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3756#
3757# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3758# or visit www.oracle.com if you need additional information or have any
3759# questions.
3760#
3761
3762
3763
3764
3765
3766# Helper function which possibly converts a path using DOS-style short mode.
3767# If so, the updated path is stored in $new_path.
3768# $1: The path to check
3769
3770
3771# Helper function which possibly converts a path using DOS-style short mode.
3772# If so, the updated path is stored in $new_path.
3773# $1: The path to check
3774
3775
3776# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3777# and could probably be heavily simplified. However, all changes in this
3778# area tend to need lot of testing in different scenarios, and in lack of
3779# proper unit testing, cleaning this up has not been deemed worth the effort
3780# at the moment.
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3791
3792
3793
3794
3795# ... then the rest
3796#
3797# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3798# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3799#
3800# This code is free software; you can redistribute it and/or modify it
3801# under the terms of the GNU General Public License version 2 only, as
3802# published by the Free Software Foundation.  Oracle designates this
3803# particular file as subject to the "Classpath" exception as provided
3804# by Oracle in the LICENSE file that accompanied this code.
3805#
3806# This code is distributed in the hope that it will be useful, but WITHOUT
3807# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3808# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3809# version 2 for more details (a copy is included in the LICENSE file that
3810# accompanied this code).
3811#
3812# You should have received a copy of the GNU General Public License version
3813# 2 along with this work; if not, write to the Free Software Foundation,
3814# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3815#
3816# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3817# or visit www.oracle.com if you need additional information or have any
3818# questions.
3819#
3820
3821########################################################################
3822# This file handles detection of the Boot JDK. The Boot JDK detection
3823# process has been developed as a response to solve a complex real-world
3824# problem. Initially, it was simple, but it has grown as platform after
3825# platform, idiosyncracy after idiosyncracy has been supported.
3826#
3827# The basic idea is this:
3828# 1) You need an acceptable *) JDK to use as a Boot JDK
3829# 2) There are several ways to locate a JDK, that are mostly platform
3830#    dependent **)
3831# 3) You can have multiple JDKs installed
3832# 4) If possible, configure should try to dig out an acceptable JDK
3833#    automatically, without having to resort to command-line options
3834#
3835# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3836#     javac) and not a JRE, etc.
3837#
3838# **) On Windows we typically use a well-known path.
3839#     On MacOSX we typically use the tool java_home.
3840#     On Linux we typically find javac in the $PATH, and then follow a
3841#     chain of symlinks that often ends up in a real JDK.
3842#
3843# This leads to the code where we check in different ways to locate a
3844# JDK, and if one is found, check if it is acceptable. If not, we print
3845# our reasons for rejecting it (useful when debugging non-working
3846# configure situations) and continue checking the next one.
3847########################################################################
3848
3849# Execute the check given as argument, and verify the result
3850# If the Boot JDK was previously found, do nothing
3851# $1 A command line (typically autoconf macro) to execute
3852
3853
3854# Test: Is bootjdk explicitely set by command line arguments?
3855
3856
3857# Test: Is $JAVA_HOME set?
3858
3859
3860# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3861
3862
3863# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3864# $1: Argument to the java_home binary (optional)
3865
3866
3867# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3868
3869
3870# Look for a jdk in the given path. If there are multiple, try to select the newest.
3871# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3872# $1 = Path to directory containing jdk installations.
3873# $2 = String to append to the found JDK directory to get the proper JDK home
3874
3875
3876# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3877# environmental variable as base for where to look.
3878# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3879
3880
3881# Test: Is there a JDK installed in default, well-known locations?
3882
3883
3884# Check that a command-line tool in the Boot JDK is correct
3885# $1 = name of variable to assign
3886# $2 = name of binary
3887
3888
3889###############################################################################
3890#
3891# We need a Boot JDK to bootstrap the build.
3892#
3893
3894
3895
3896
3897
3898# BUILD_JDK: the location of the latest JDK that can run
3899#   on the host system and supports the target class file version
3900#   generated in this JDK build.  This variable should only be
3901#   used after the launchers are built.
3902#
3903
3904# Execute the check given as argument, and verify the result.
3905# If the JDK was previously found, do nothing.
3906# $1 A command line (typically autoconf macro) to execute
3907
3908
3909# By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3910# is different than the host system doing the build (e.g. cross-compilation),
3911# a special BUILD_JDK is built as part of the build process.  An external
3912# prebuilt BUILD_JDK can also be supplied.
3913
3914
3915#
3916# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3917# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3918#
3919# This code is free software; you can redistribute it and/or modify it
3920# under the terms of the GNU General Public License version 2 only, as
3921# published by the Free Software Foundation.  Oracle designates this
3922# particular file as subject to the "Classpath" exception as provided
3923# by Oracle in the LICENSE file that accompanied this code.
3924#
3925# This code is distributed in the hope that it will be useful, but WITHOUT
3926# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3927# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3928# version 2 for more details (a copy is included in the LICENSE file that
3929# accompanied this code).
3930#
3931# You should have received a copy of the GNU General Public License version
3932# 2 along with this work; if not, write to the Free Software Foundation,
3933# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3934#
3935# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3936# or visit www.oracle.com if you need additional information or have any
3937# questions.
3938#
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956################################################################################
3957#
3958# Runs icecc-create-env once and prints the error if it fails
3959#
3960# $1: arguments to icecc-create-env
3961# $2: log file
3962#
3963
3964
3965################################################################################
3966#
3967# Optionally enable distributed compilation of native code using icecc/icecream
3968#
3969
3970
3971
3972
3973
3974
3975
3976#
3977# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3978# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3979#
3980# This code is free software; you can redistribute it and/or modify it
3981# under the terms of the GNU General Public License version 2 only, as
3982# published by the Free Software Foundation.  Oracle designates this
3983# particular file as subject to the "Classpath" exception as provided
3984# by Oracle in the LICENSE file that accompanied this code.
3985#
3986# This code is distributed in the hope that it will be useful, but WITHOUT
3987# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3988# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3989# version 2 for more details (a copy is included in the LICENSE file that
3990# accompanied this code).
3991#
3992# You should have received a copy of the GNU General Public License version
3993# 2 along with this work; if not, write to the Free Software Foundation,
3994# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3995#
3996# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3997# or visit www.oracle.com if you need additional information or have any
3998# questions.
3999#
4000
4001# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
4002# corresponding configure arguments instead
4003
4004
4005# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
4006# that configure can use them while detecting compilers.
4007# TOOLCHAIN_TYPE is available here.
4008# Param 1 - Optional prefix to all variables. (e.g BUILD_)
4009
4010
4011
4012
4013
4014
4015# Documentation on common flags used for solstudio in HIGHEST.
4016#
4017# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
4018#          done with care, there are some assumptions below that need to
4019#          be understood about the use of pointers, and IEEE behavior.
4020#
4021# -fns: Use non-standard floating point mode (not IEEE 754)
4022# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4023# -fsingle: Use single precision floating point with 'float'
4024# -xalias_level=basic: Assume memory references via basic pointer types do not alias
4025#   (Source with excessing pointer casting and data access with mixed
4026#    pointer types are not recommended)
4027# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4028#   (If you expect perfect errno behavior, do not use this)
4029# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4030# -xrestrict: Pointer parameters to functions do not overlap
4031#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4032#    If you pass in multiple pointers to the same data, do not use this)
4033# -xlibmil: Inline some library routines
4034#   (If you expect perfect errno behavior, do not use this)
4035# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4036#   (If you expect perfect errno behavior, do not use this)
4037#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4038
4039    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4040    # Bug?
4041    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4042    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4043    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4044    #fi
4045
4046
4047
4048
4049
4050
4051################################################################################
4052# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4053#      conditionals against.
4054# $2 - Optional prefix for each variable defined.
4055
4056
4057# FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4058#                                  IF_FALSE: [RUN-IF-FALSE])
4059# ------------------------------------------------------------
4060# Check that the C compiler supports an argument
4061
4062
4063
4064
4065# FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4066#                                    IF_FALSE: [RUN-IF-FALSE])
4067# ------------------------------------------------------------
4068# Check that the C++ compiler supports an argument
4069
4070
4071
4072
4073# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4074#                                IF_FALSE: [RUN-IF-FALSE])
4075# ------------------------------------------------------------
4076# Check that the C and C++ compilers support an argument
4077
4078
4079
4080
4081# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4082#                                   IF_FALSE: [RUN-IF-FALSE])
4083# ------------------------------------------------------------
4084# Check that the linker support an argument
4085
4086
4087
4088
4089
4090
4091# FLAGS_SETUP_GCC6_COMPILER_FLAGS([PREFIX])
4092# Arguments:
4093# $1 - Optional prefix for each variable defined.
4094
4095
4096#
4097# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4098# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4099#
4100# This code is free software; you can redistribute it and/or modify it
4101# under the terms of the GNU General Public License version 2 only, as
4102# published by the Free Software Foundation.  Oracle designates this
4103# particular file as subject to the "Classpath" exception as provided
4104# by Oracle in the LICENSE file that accompanied this code.
4105#
4106# This code is distributed in the hope that it will be useful, but WITHOUT
4107# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4108# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4109# version 2 for more details (a copy is included in the LICENSE file that
4110# accompanied this code).
4111#
4112# You should have received a copy of the GNU General Public License version
4113# 2 along with this work; if not, write to the Free Software Foundation,
4114# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4115#
4116# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4117# or visit www.oracle.com if you need additional information or have any
4118# questions.
4119#
4120
4121
4122
4123
4124
4125cygwin_help() {
4126  case $1 in
4127    unzip)
4128      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4129      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4130      ;;
4131    zip)
4132      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4133      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4134      ;;
4135    make)
4136      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4137      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4138      ;;
4139    freetype)
4140      HELP_MSG="
4141The freetype library can now be build during the configure process.
4142Download the freetype sources and unpack them into an arbitrary directory:
4143
4144wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4145tar -xzf freetype-2.5.3.tar.gz
4146
4147Then run configure with '--with-freetype-src=<freetype_src>'. This will
4148automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4149builds or into '<freetype_src>/lib32' for 32-bit builds.
4150Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4151and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4152
4153Alternatively you can unpack the sources like this to use the default directory:
4154
4155tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4156      ;;
4157  esac
4158}
4159
4160msys_help() {
4161  PKGHANDLER_COMMAND=""
4162}
4163
4164apt_help() {
4165  case $1 in
4166    reduced)
4167      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4168    devkit)
4169      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4170    openjdk)
4171      PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4172    alsa)
4173      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4174    cups)
4175      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4176    freetype)
4177      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4178    ffi)
4179      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4180    x11)
4181      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4182    ccache)
4183      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4184    dtrace)
4185      PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4186  esac
4187}
4188
4189yum_help() {
4190  case $1 in
4191    devkit)
4192      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4193    openjdk)
4194      PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4195    alsa)
4196      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4197    cups)
4198      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4199    freetype)
4200      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4201    x11)
4202      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4203    ccache)
4204      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4205  esac
4206}
4207
4208port_help() {
4209  PKGHANDLER_COMMAND=""
4210}
4211
4212pkgutil_help() {
4213  PKGHANDLER_COMMAND=""
4214}
4215
4216pkgadd_help() {
4217  PKGHANDLER_COMMAND=""
4218}
4219
4220# This function will check if we're called from the "configure" wrapper while
4221# printing --help. If so, we will print out additional information that can
4222# only be extracted within the autoconf script, and then exit. This must be
4223# called at the very beginning in configure.ac.
4224
4225
4226
4227
4228
4229
4230#
4231# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4232# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4233#
4234# This code is free software; you can redistribute it and/or modify it
4235# under the terms of the GNU General Public License version 2 only, as
4236# published by the Free Software Foundation.  Oracle designates this
4237# particular file as subject to the "Classpath" exception as provided
4238# by Oracle in the LICENSE file that accompanied this code.
4239#
4240# This code is distributed in the hope that it will be useful, but WITHOUT
4241# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4242# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4243# version 2 for more details (a copy is included in the LICENSE file that
4244# accompanied this code).
4245#
4246# You should have received a copy of the GNU General Public License version
4247# 2 along with this work; if not, write to the Free Software Foundation,
4248# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4249#
4250# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4251# or visit www.oracle.com if you need additional information or have any
4252# questions.
4253#
4254
4255# All valid JVM features, regardless of platform
4256VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4257    fprof vm-structs jni-check services management all-gcs nmt cds static-build"
4258
4259# All valid JVM variants
4260VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4261
4262###############################################################################
4263# Check if the specified JVM variant should be built. To be used in shell if
4264# constructs, like this:
4265# if HOTSPOT_CHECK_JVM_VARIANT(server); then
4266#
4267# Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4268
4269# Definition kept in one line to allow inlining in if statements.
4270# Additional [] needed to keep m4 from mangling shell constructs.
4271
4272
4273###############################################################################
4274# Check if the specified JVM features are explicitly enabled. To be used in
4275# shell if constructs, like this:
4276# if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4277#
4278# Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4279
4280# Definition kept in one line to allow inlining in if statements.
4281# Additional [] needed to keep m4 from mangling shell constructs.
4282
4283
4284###############################################################################
4285# Check which variants of the JVM that we want to build. Available variants are:
4286#   server: normal interpreter, and a tiered C1/C2 compiler
4287#   client: normal interpreter, and C1 (no C2 compiler)
4288#   minimal: reduced form of client with optional features stripped out
4289#   core: normal interpreter only, no compiler
4290#   zero: C++ based interpreter only, no compiler
4291#   zeroshark: C++ based interpreter, and a llvm-based compiler
4292#   custom: baseline JVM with no default features
4293#
4294
4295
4296###############################################################################
4297# Check if dtrace should be enabled and has all prerequisites present.
4298#
4299
4300
4301###############################################################################
4302# Set up all JVM features for each JVM variant.
4303#
4304
4305
4306###############################################################################
4307# Validate JVM features once all setup is complete, including custom setup.
4308#
4309
4310
4311################################################################################
4312# Check if gtest should be built
4313#
4314
4315
4316#
4317# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4318# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4319#
4320# This code is free software; you can redistribute it and/or modify it
4321# under the terms of the GNU General Public License version 2 only, as
4322# published by the Free Software Foundation.  Oracle designates this
4323# particular file as subject to the "Classpath" exception as provided
4324# by Oracle in the LICENSE file that accompanied this code.
4325#
4326# This code is distributed in the hope that it will be useful, but WITHOUT
4327# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4328# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4329# version 2 for more details (a copy is included in the LICENSE file that
4330# accompanied this code).
4331#
4332# You should have received a copy of the GNU General Public License version
4333# 2 along with this work; if not, write to the Free Software Foundation,
4334# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4335#
4336# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4337# or visit www.oracle.com if you need additional information or have any
4338# questions.
4339#
4340
4341###############################################################################
4342# Check which variant of the JDK that we want to build.
4343# Currently we have:
4344#    normal:   standard edition
4345# but the custom make system may add other variants
4346#
4347# Effectively the JDK variant gives a name to a specific set of
4348# modules to compile into the JDK.
4349
4350
4351###############################################################################
4352# Set the debug level
4353#    release: no debug information, all optimizations, no asserts.
4354#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4355#    fastdebug: debug information (-g), all optimizations, all asserts
4356#    slowdebug: debug information (-g), no optimizations, all asserts
4357
4358
4359###############################################################################
4360#
4361# Should we build only OpenJDK even if closed sources are present?
4362#
4363
4364
4365
4366
4367###############################################################################
4368#
4369# Enable or disable the elliptic curve crypto implementation
4370#
4371
4372
4373
4374
4375################################################################################
4376#
4377# Gcov coverage data for hotspot
4378#
4379
4380
4381################################################################################
4382#
4383# Static build support.  When enabled will generate static
4384# libraries instead of shared libraries for all JDK libs.
4385#
4386
4387
4388################################################################################
4389#
4390# jlink options.
4391# We always keep packaged modules in JDK image.
4392#
4393
4394
4395################################################################################
4396#
4397# Check if building of the jtreg failure handler should be enabled.
4398#
4399
4400
4401################################################################################
4402#
4403# Enable or disable generation of the classlist at build time
4404#
4405
4406
4407#
4408# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
4409# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4410#
4411# This code is free software; you can redistribute it and/or modify it
4412# under the terms of the GNU General Public License version 2 only, as
4413# published by the Free Software Foundation.  Oracle designates this
4414# particular file as subject to the "Classpath" exception as provided
4415# by Oracle in the LICENSE file that accompanied this code.
4416#
4417# This code is distributed in the hope that it will be useful, but WITHOUT
4418# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4419# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4420# version 2 for more details (a copy is included in the LICENSE file that
4421# accompanied this code).
4422#
4423# You should have received a copy of the GNU General Public License version
4424# 2 along with this work; if not, write to the Free Software Foundation,
4425# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4426#
4427# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4428# or visit www.oracle.com if you need additional information or have any
4429# questions.
4430#
4431
4432###############################################################################
4433#
4434# Setup version numbers
4435#
4436
4437# Verify that a given string represents a valid version number, and assign it
4438# to a variable.
4439
4440# Argument 1: the variable to assign to
4441# Argument 2: the value given by the user
4442
4443
4444
4445
4446#
4447# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4448# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4449#
4450# This code is free software; you can redistribute it and/or modify it
4451# under the terms of the GNU General Public License version 2 only, as
4452# published by the Free Software Foundation.  Oracle designates this
4453# particular file as subject to the "Classpath" exception as provided
4454# by Oracle in the LICENSE file that accompanied this code.
4455#
4456# This code is distributed in the hope that it will be useful, but WITHOUT
4457# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4458# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4459# version 2 for more details (a copy is included in the LICENSE file that
4460# accompanied this code).
4461#
4462# You should have received a copy of the GNU General Public License version
4463# 2 along with this work; if not, write to the Free Software Foundation,
4464# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4465#
4466# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4467# or visit www.oracle.com if you need additional information or have any
4468# questions.
4469#
4470
4471# Major library component reside in separate files.
4472#
4473# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4474# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4475#
4476# This code is free software; you can redistribute it and/or modify it
4477# under the terms of the GNU General Public License version 2 only, as
4478# published by the Free Software Foundation.  Oracle designates this
4479# particular file as subject to the "Classpath" exception as provided
4480# by Oracle in the LICENSE file that accompanied this code.
4481#
4482# This code is distributed in the hope that it will be useful, but WITHOUT
4483# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4484# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4485# version 2 for more details (a copy is included in the LICENSE file that
4486# accompanied this code).
4487#
4488# You should have received a copy of the GNU General Public License version
4489# 2 along with this work; if not, write to the Free Software Foundation,
4490# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4491#
4492# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4493# or visit www.oracle.com if you need additional information or have any
4494# questions.
4495#
4496
4497################################################################################
4498# Setup alsa (Advanced Linux Sound Architecture)
4499################################################################################
4500
4501
4502#
4503# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4504# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4505#
4506# This code is free software; you can redistribute it and/or modify it
4507# under the terms of the GNU General Public License version 2 only, as
4508# published by the Free Software Foundation.  Oracle designates this
4509# particular file as subject to the "Classpath" exception as provided
4510# by Oracle in the LICENSE file that accompanied this code.
4511#
4512# This code is distributed in the hope that it will be useful, but WITHOUT
4513# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4514# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4515# version 2 for more details (a copy is included in the LICENSE file that
4516# accompanied this code).
4517#
4518# You should have received a copy of the GNU General Public License version
4519# 2 along with this work; if not, write to the Free Software Foundation,
4520# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4521#
4522# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4523# or visit www.oracle.com if you need additional information or have any
4524# questions.
4525#
4526
4527################################################################################
4528# Setup bundled libraries.
4529#
4530# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4531# OpenJDK repository. Default is to use these libraries as bundled, but they
4532# might be replaced by en external version by the user.
4533################################################################################
4534
4535
4536################################################################################
4537# Setup libjpeg
4538################################################################################
4539
4540
4541################################################################################
4542# Setup giflib
4543################################################################################
4544
4545
4546################################################################################
4547# Setup libpng
4548################################################################################
4549
4550
4551################################################################################
4552# Setup zlib
4553################################################################################
4554
4555
4556################################################################################
4557# Setup lcms (Little CMS)
4558################################################################################
4559
4560
4561#
4562# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4563# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4564#
4565# This code is free software; you can redistribute it and/or modify it
4566# under the terms of the GNU General Public License version 2 only, as
4567# published by the Free Software Foundation.  Oracle designates this
4568# particular file as subject to the "Classpath" exception as provided
4569# by Oracle in the LICENSE file that accompanied this code.
4570#
4571# This code is distributed in the hope that it will be useful, but WITHOUT
4572# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4573# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4574# version 2 for more details (a copy is included in the LICENSE file that
4575# accompanied this code).
4576#
4577# You should have received a copy of the GNU General Public License version
4578# 2 along with this work; if not, write to the Free Software Foundation,
4579# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4580#
4581# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4582# or visit www.oracle.com if you need additional information or have any
4583# questions.
4584#
4585
4586################################################################################
4587# Setup cups (Common Unix Printing System)
4588################################################################################
4589
4590
4591#
4592# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4593# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4594#
4595# This code is free software; you can redistribute it and/or modify it
4596# under the terms of the GNU General Public License version 2 only, as
4597# published by the Free Software Foundation.  Oracle designates this
4598# particular file as subject to the "Classpath" exception as provided
4599# by Oracle in the LICENSE file that accompanied this code.
4600#
4601# This code is distributed in the hope that it will be useful, but WITHOUT
4602# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4603# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4604# version 2 for more details (a copy is included in the LICENSE file that
4605# accompanied this code).
4606#
4607# You should have received a copy of the GNU General Public License version
4608# 2 along with this work; if not, write to the Free Software Foundation,
4609# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4610#
4611# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4612# or visit www.oracle.com if you need additional information or have any
4613# questions.
4614#
4615
4616################################################################################
4617# Setup libffi (Foreign Function Interface)
4618################################################################################
4619
4620
4621#
4622# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4623# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4624#
4625# This code is free software; you can redistribute it and/or modify it
4626# under the terms of the GNU General Public License version 2 only, as
4627# published by the Free Software Foundation.  Oracle designates this
4628# particular file as subject to the "Classpath" exception as provided
4629# by Oracle in the LICENSE file that accompanied this code.
4630#
4631# This code is distributed in the hope that it will be useful, but WITHOUT
4632# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4633# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4634# version 2 for more details (a copy is included in the LICENSE file that
4635# accompanied this code).
4636#
4637# You should have received a copy of the GNU General Public License version
4638# 2 along with this work; if not, write to the Free Software Foundation,
4639# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4640#
4641# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4642# or visit www.oracle.com if you need additional information or have any
4643# questions.
4644#
4645
4646################################################################################
4647# Build the freetype lib from source
4648################################################################################
4649
4650
4651################################################################################
4652# Check if a potential freeype library match is correct and usable
4653################################################################################
4654
4655
4656################################################################################
4657# Setup freetype (The FreeType2 font rendering library)
4658################################################################################
4659
4660
4661#
4662# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4663# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4664#
4665# This code is free software; you can redistribute it and/or modify it
4666# under the terms of the GNU General Public License version 2 only, as
4667# published by the Free Software Foundation.  Oracle designates this
4668# particular file as subject to the "Classpath" exception as provided
4669# by Oracle in the LICENSE file that accompanied this code.
4670#
4671# This code is distributed in the hope that it will be useful, but WITHOUT
4672# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4673# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4674# version 2 for more details (a copy is included in the LICENSE file that
4675# accompanied this code).
4676#
4677# You should have received a copy of the GNU General Public License version
4678# 2 along with this work; if not, write to the Free Software Foundation,
4679# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4680#
4681# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4682# or visit www.oracle.com if you need additional information or have any
4683# questions.
4684#
4685
4686################################################################################
4687# Setup the standard C/C++ runtime libraries.
4688#
4689# Most importantly, determine if stdc++ should be linked statically or
4690# dynamically.
4691################################################################################
4692
4693
4694#
4695# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4696# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4697#
4698# This code is free software; you can redistribute it and/or modify it
4699# under the terms of the GNU General Public License version 2 only, as
4700# published by the Free Software Foundation.  Oracle designates this
4701# particular file as subject to the "Classpath" exception as provided
4702# by Oracle in the LICENSE file that accompanied this code.
4703#
4704# This code is distributed in the hope that it will be useful, but WITHOUT
4705# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4706# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4707# version 2 for more details (a copy is included in the LICENSE file that
4708# accompanied this code).
4709#
4710# You should have received a copy of the GNU General Public License version
4711# 2 along with this work; if not, write to the Free Software Foundation,
4712# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4713#
4714# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4715# or visit www.oracle.com if you need additional information or have any
4716# questions.
4717#
4718
4719################################################################################
4720# Setup X11 Windows system
4721################################################################################
4722
4723
4724
4725################################################################################
4726# Determine which libraries are needed for this configuration
4727################################################################################
4728
4729
4730################################################################################
4731# Parse library options, and setup needed libraries
4732################################################################################
4733
4734
4735################################################################################
4736# Setup llvm (Low-Level VM)
4737################################################################################
4738
4739
4740################################################################################
4741# Setup various libraries, typically small system libraries
4742################################################################################
4743
4744
4745################################################################################
4746# libstlport.so.1 is needed for running gtest on Solaris. Find it to
4747# redistribute it in the test image.
4748################################################################################
4749
4750
4751
4752#
4753# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4754# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4755#
4756# This code is free software; you can redistribute it and/or modify it
4757# under the terms of the GNU General Public License version 2 only, as
4758# published by the Free Software Foundation.  Oracle designates this
4759# particular file as subject to the "Classpath" exception as provided
4760# by Oracle in the LICENSE file that accompanied this code.
4761#
4762# This code is distributed in the hope that it will be useful, but WITHOUT
4763# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4764# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4765# version 2 for more details (a copy is included in the LICENSE file that
4766# accompanied this code).
4767#
4768# You should have received a copy of the GNU General Public License version
4769# 2 along with this work; if not, write to the Free Software Foundation,
4770# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4771#
4772# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4773# or visit www.oracle.com if you need additional information or have any
4774# questions.
4775#
4776
4777# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4778# Converts autoconf style CPU name to OpenJDK style, into
4779# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4780
4781
4782# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4783# Converts autoconf style OS name to OpenJDK style, into
4784# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4785
4786
4787# Expects $host_os $host_cpu $build_os and $build_cpu
4788# and $with_target_bits to have been setup!
4789#
4790# Translate the standard triplet(quadruplet) definition
4791# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4792# OPENJDK_BUILD_OS, etc.
4793
4794
4795# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4796# accordingly. Must be done after setting up build and target system, but before
4797# doing anything else with these values.
4798
4799
4800# Setup the legacy variables, for controlling the old makefiles.
4801#
4802
4803
4804# $1 - Either TARGET or BUILD to setup the variables for.
4805
4806
4807
4808
4809#%%% Build and target systems %%%
4810
4811
4812
4813
4814# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4815# Add -mX to various FLAGS variables.
4816
4817
4818
4819
4820
4821
4822#
4823# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4824# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4825#
4826# This code is free software; you can redistribute it and/or modify it
4827# under the terms of the GNU General Public License version 2 only, as
4828# published by the Free Software Foundation.  Oracle designates this
4829# particular file as subject to the "Classpath" exception as provided
4830# by Oracle in the LICENSE file that accompanied this code.
4831#
4832# This code is distributed in the hope that it will be useful, but WITHOUT
4833# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4834# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4835# version 2 for more details (a copy is included in the LICENSE file that
4836# accompanied this code).
4837#
4838# You should have received a copy of the GNU General Public License version
4839# 2 along with this work; if not, write to the Free Software Foundation,
4840# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4841#
4842# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4843# or visit www.oracle.com if you need additional information or have any
4844# questions.
4845#
4846
4847
4848
4849
4850
4851
4852
4853################################################################################
4854# Define a mechanism for importing extra prebuilt modules
4855#
4856
4857
4858
4859#
4860# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4861# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4862#
4863# This code is free software; you can redistribute it and/or modify it
4864# under the terms of the GNU General Public License version 2 only, as
4865# published by the Free Software Foundation.  Oracle designates this
4866# particular file as subject to the "Classpath" exception as provided
4867# by Oracle in the LICENSE file that accompanied this code.
4868#
4869# This code is distributed in the hope that it will be useful, but WITHOUT
4870# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4871# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4872# version 2 for more details (a copy is included in the LICENSE file that
4873# accompanied this code).
4874#
4875# You should have received a copy of the GNU General Public License version
4876# 2 along with this work; if not, write to the Free Software Foundation,
4877# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4878#
4879# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4880# or visit www.oracle.com if you need additional information or have any
4881# questions.
4882#
4883
4884########################################################################
4885# This file is responsible for detecting, verifying and setting up the
4886# toolchain, i.e. the compiler, linker and related utilities. It will setup
4887# proper paths to the binaries, but it will not setup any flags.
4888#
4889# The binaries used is determined by the toolchain type, which is the family of
4890# compilers and related tools that are used.
4891########################################################################
4892
4893
4894# All valid toolchains, regardless of platform (used by help.m4)
4895VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4896
4897# These toolchains are valid on different platforms
4898VALID_TOOLCHAINS_linux="gcc clang"
4899VALID_TOOLCHAINS_solaris="solstudio"
4900VALID_TOOLCHAINS_macosx="gcc clang"
4901VALID_TOOLCHAINS_aix="xlc"
4902VALID_TOOLCHAINS_windows="microsoft"
4903
4904# Toolchain descriptions
4905TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4906TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4907TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4908TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4909TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4910
4911# Minimum supported versions, empty means unspecified
4912TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
4913TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
4914TOOLCHAIN_MINIMUM_VERSION_microsoft=""
4915TOOLCHAIN_MINIMUM_VERSION_solstudio="5.13"
4916TOOLCHAIN_MINIMUM_VERSION_xlc=""
4917
4918# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
4919# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
4920# $1 - optional variable prefix for compiler and version variables (BUILD_)
4921# $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
4922
4923
4924# Check if the configured compiler (C and C++) is of a specific version or
4925# newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
4926#
4927# Arguments:
4928#   VERSION:   The version string to check against the found version
4929#   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
4930#   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
4931#   PREFIX:   Optional variable prefix for compiler to compare version for (OPENJDK_BUILD_)
4932
4933
4934
4935
4936# Setup a number of variables describing how native output files are
4937# named on this platform/toolchain.
4938
4939
4940# Determine which toolchain type to use, and make sure it is valid for this
4941# platform. Setup various information about the selected toolchain.
4942
4943
4944# Before we start detecting the toolchain executables, we might need some
4945# special setup, e.g. additional paths etc.
4946
4947
4948# Restore path, etc
4949
4950
4951# Check if a compiler is of the toolchain type we expect, and save the version
4952# information from it. If the compiler does not match the expected type,
4953# this function will abort using AC_MSG_ERROR. If it matches, the version will
4954# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4955# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4956#
4957# $1 = compiler to test (CC or CXX)
4958# $2 = human readable name of compiler (C or C++)
4959
4960
4961# Try to locate the given C or C++ compiler in the path, or otherwise.
4962#
4963# $1 = compiler to test (CC or CXX)
4964# $2 = human readable name of compiler (C or C++)
4965# $3 = list of compiler names to search for
4966
4967
4968# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4969# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4970# archiver (AR). Verify that the compilers are correct according to the
4971# toolchain type.
4972
4973
4974# Setup additional tools that is considered a part of the toolchain, but not the
4975# core part. Many of these are highly platform-specific and do not exist,
4976# and/or are not needed on all platforms.
4977
4978
4979# Setup the build tools (i.e, the compiler and linker used to build programs
4980# that should be run on the build platform, not the target platform, as a build
4981# helper). Since the non-cross-compile case uses the normal, target compilers
4982# for this, we can only do this after these have been setup.
4983
4984
4985# Setup legacy variables that are still needed as alternative ways to refer to
4986# parts of the toolchain.
4987
4988
4989# Do some additional checks on the detected tools.
4990
4991
4992# Setup the JTReg Regression Test Harness.
4993
4994
4995#
4996# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4997# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4998#
4999# This code is free software; you can redistribute it and/or modify it
5000# under the terms of the GNU General Public License version 2 only, as
5001# published by the Free Software Foundation.  Oracle designates this
5002# particular file as subject to the "Classpath" exception as provided
5003# by Oracle in the LICENSE file that accompanied this code.
5004#
5005# This code is distributed in the hope that it will be useful, but WITHOUT
5006# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5007# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
5008# version 2 for more details (a copy is included in the LICENSE file that
5009# accompanied this code).
5010#
5011# You should have received a copy of the GNU General Public License version
5012# 2 along with this work; if not, write to the Free Software Foundation,
5013# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5014#
5015# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5016# or visit www.oracle.com if you need additional information or have any
5017# questions.
5018#
5019
5020################################################################################
5021# The order of these defines the priority by which we try to find them.
5022VALID_VS_VERSIONS="2013 2012 2010"
5023
5024VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
5025VS_VERSION_INTERNAL_2010=100
5026VS_MSVCR_2010=msvcr100.dll
5027# We don't use msvcp on Visual Studio 2010
5028#VS_MSVCP_2010=msvcp100.dll
5029VS_ENVVAR_2010="VS100COMNTOOLS"
5030VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
5031VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
5032VS_VS_PLATFORM_NAME_2010="v100"
5033VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
5034
5035VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
5036VS_VERSION_INTERNAL_2012=110
5037VS_MSVCR_2012=msvcr110.dll
5038VS_MSVCP_2012=msvcp110.dll
5039VS_ENVVAR_2012="VS110COMNTOOLS"
5040VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5041VS_SDK_INSTALLDIR_2012=
5042VS_VS_PLATFORM_NAME_2012="v110"
5043VS_SDK_PLATFORM_NAME_2012=
5044
5045VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5046VS_VERSION_INTERNAL_2013=120
5047VS_MSVCR_2013=msvcr120.dll
5048VS_MSVCP_2013=msvcp120.dll
5049VS_ENVVAR_2013="VS120COMNTOOLS"
5050VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5051VS_SDK_INSTALLDIR_2013=
5052VS_VS_PLATFORM_NAME_2013="v120"
5053VS_SDK_PLATFORM_NAME_2013=
5054
5055################################################################################
5056
5057
5058
5059################################################################################
5060
5061
5062
5063################################################################################
5064# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5065# build environment and assigns it to VS_ENV_CMD
5066
5067
5068################################################################################
5069
5070
5071
5072################################################################################
5073# Check if the VS env variables were setup prior to running configure.
5074# If not, then find vcvarsall.bat and run it automatically, and integrate
5075# the set env variables into the spec file.
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090# This line needs to be here, verbatim, after all includes and the dummy hook
5091# definitions. It is replaced with custom functionality when building
5092# custom sources.
5093#CUSTOM_AUTOCONF_INCLUDE
5094
5095# Do not change or remove the following line, it is needed for consistency checks:
5096DATE_WHEN_GENERATED=1477108079
5097
5098###############################################################################
5099#
5100# Initialization / Boot-strapping
5101#
5102# The bootstrapping process needs to solve the "chicken or the egg" problem,
5103# thus it jumps back and forth, each time gaining something needed later on.
5104#
5105###############################################################################
5106
5107# If we are requested to print additional help, do that and then exit.
5108# This must be the very first call.
5109
5110  if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5111
5112    # Print available toolchains
5113    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5114    $PRINTF "Which are valid to use depends on the build platform.\n"
5115    for toolchain in $VALID_TOOLCHAINS_all; do
5116      # Use indirect variable referencing
5117      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5118      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5119      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5120    done
5121    $PRINTF "\n"
5122
5123    # Print available jvm features
5124    $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5125    $PRINTF "Which are valid to use depends on the target platform.\n  "
5126    $PRINTF "%s " $VALID_JVM_FEATURES
5127    $PRINTF "\n"
5128
5129    # And now exit directly
5130    exit 0
5131  fi
5132
5133
5134# Basic initialization that must happen first of all in the normal process.
5135
5136  # Save the original command line. This is passed to us by the wrapper configure script.
5137
5138  # Save the path variable before it gets changed
5139  ORIGINAL_PATH="$PATH"
5140
5141  DATE_WHEN_CONFIGURED=`LANG=C date`
5142
5143  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5144$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5145  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5146$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5147
5148
5149  # Start with tools that do not need have cross compilation support
5150  # and can be expected to be found in the default PATH. These tools are
5151  # used by configure.
5152
5153  # First are all the simple required tools.
5154
5155
5156
5157  # Publish this variable in the help.
5158
5159
5160  if [ -z "${BASENAME+x}" ]; then
5161    # The variable is not set by user, try to locate tool using the code snippet
5162    for ac_prog in basename
5163do
5164  # Extract the first word of "$ac_prog", so it can be a program name with args.
5165set dummy $ac_prog; ac_word=$2
5166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5167$as_echo_n "checking for $ac_word... " >&6; }
5168if ${ac_cv_path_BASENAME+:} false; then :
5169  $as_echo_n "(cached) " >&6
5170else
5171  case $BASENAME in
5172  [\\/]* | ?:[\\/]*)
5173  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5174  ;;
5175  *)
5176  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5177for as_dir in $PATH
5178do
5179  IFS=$as_save_IFS
5180  test -z "$as_dir" && as_dir=.
5181    for ac_exec_ext in '' $ac_executable_extensions; do
5182  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5183    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5184    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5185    break 2
5186  fi
5187done
5188  done
5189IFS=$as_save_IFS
5190
5191  ;;
5192esac
5193fi
5194BASENAME=$ac_cv_path_BASENAME
5195if test -n "$BASENAME"; then
5196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5197$as_echo "$BASENAME" >&6; }
5198else
5199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5200$as_echo "no" >&6; }
5201fi
5202
5203
5204  test -n "$BASENAME" && break
5205done
5206
5207  else
5208    # The variable is set, but is it from the command line or the environment?
5209
5210    # Try to remove the string !BASENAME! from our list.
5211    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5212    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5213      # If it failed, the variable was not from the command line. Ignore it,
5214      # but warn the user (except for BASH, which is always set by the calling BASH).
5215      if test "xBASENAME" != xBASH; then
5216        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5217$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5218      fi
5219      # Try to locate tool using the code snippet
5220      for ac_prog in basename
5221do
5222  # Extract the first word of "$ac_prog", so it can be a program name with args.
5223set dummy $ac_prog; ac_word=$2
5224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5225$as_echo_n "checking for $ac_word... " >&6; }
5226if ${ac_cv_path_BASENAME+:} false; then :
5227  $as_echo_n "(cached) " >&6
5228else
5229  case $BASENAME in
5230  [\\/]* | ?:[\\/]*)
5231  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5232  ;;
5233  *)
5234  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5235for as_dir in $PATH
5236do
5237  IFS=$as_save_IFS
5238  test -z "$as_dir" && as_dir=.
5239    for ac_exec_ext in '' $ac_executable_extensions; do
5240  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5241    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5242    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5243    break 2
5244  fi
5245done
5246  done
5247IFS=$as_save_IFS
5248
5249  ;;
5250esac
5251fi
5252BASENAME=$ac_cv_path_BASENAME
5253if test -n "$BASENAME"; then
5254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5255$as_echo "$BASENAME" >&6; }
5256else
5257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5258$as_echo "no" >&6; }
5259fi
5260
5261
5262  test -n "$BASENAME" && break
5263done
5264
5265    else
5266      # If it succeeded, then it was overridden by the user. We will use it
5267      # for the tool.
5268
5269      # First remove it from the list of overridden variables, so we can test
5270      # for unknown variables in the end.
5271      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5272
5273      # Check if we try to supply an empty value
5274      if test "x$BASENAME" = x; then
5275        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5276$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5277        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5278$as_echo_n "checking for BASENAME... " >&6; }
5279        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5280$as_echo "disabled" >&6; }
5281      else
5282        # Check if the provided tool contains a complete path.
5283        tool_specified="$BASENAME"
5284        tool_basename="${tool_specified##*/}"
5285        if test "x$tool_basename" = "x$tool_specified"; then
5286          # A command without a complete path is provided, search $PATH.
5287          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5288$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5289          # Extract the first word of "$tool_basename", so it can be a program name with args.
5290set dummy $tool_basename; ac_word=$2
5291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5292$as_echo_n "checking for $ac_word... " >&6; }
5293if ${ac_cv_path_BASENAME+:} false; then :
5294  $as_echo_n "(cached) " >&6
5295else
5296  case $BASENAME in
5297  [\\/]* | ?:[\\/]*)
5298  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5299  ;;
5300  *)
5301  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5302for as_dir in $PATH
5303do
5304  IFS=$as_save_IFS
5305  test -z "$as_dir" && as_dir=.
5306    for ac_exec_ext in '' $ac_executable_extensions; do
5307  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5308    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5309    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5310    break 2
5311  fi
5312done
5313  done
5314IFS=$as_save_IFS
5315
5316  ;;
5317esac
5318fi
5319BASENAME=$ac_cv_path_BASENAME
5320if test -n "$BASENAME"; then
5321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5322$as_echo "$BASENAME" >&6; }
5323else
5324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5325$as_echo "no" >&6; }
5326fi
5327
5328
5329          if test "x$BASENAME" = x; then
5330            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5331          fi
5332        else
5333          # Otherwise we believe it is a complete path. Use it as it is.
5334          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5335$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5336          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5337$as_echo_n "checking for BASENAME... " >&6; }
5338          if test ! -x "$tool_specified"; then
5339            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5340$as_echo "not found" >&6; }
5341            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5342          fi
5343          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5344$as_echo "$tool_specified" >&6; }
5345        fi
5346      fi
5347    fi
5348
5349  fi
5350
5351
5352
5353  if test "x$BASENAME" = x; then
5354    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5355  fi
5356
5357
5358
5359
5360
5361  # Publish this variable in the help.
5362
5363
5364  if [ -z "${BASH+x}" ]; then
5365    # The variable is not set by user, try to locate tool using the code snippet
5366    for ac_prog in bash
5367do
5368  # Extract the first word of "$ac_prog", so it can be a program name with args.
5369set dummy $ac_prog; ac_word=$2
5370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5371$as_echo_n "checking for $ac_word... " >&6; }
5372if ${ac_cv_path_BASH+:} false; then :
5373  $as_echo_n "(cached) " >&6
5374else
5375  case $BASH in
5376  [\\/]* | ?:[\\/]*)
5377  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5378  ;;
5379  *)
5380  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5381for as_dir in $PATH
5382do
5383  IFS=$as_save_IFS
5384  test -z "$as_dir" && as_dir=.
5385    for ac_exec_ext in '' $ac_executable_extensions; do
5386  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5387    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5388    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5389    break 2
5390  fi
5391done
5392  done
5393IFS=$as_save_IFS
5394
5395  ;;
5396esac
5397fi
5398BASH=$ac_cv_path_BASH
5399if test -n "$BASH"; then
5400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5401$as_echo "$BASH" >&6; }
5402else
5403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5404$as_echo "no" >&6; }
5405fi
5406
5407
5408  test -n "$BASH" && break
5409done
5410
5411  else
5412    # The variable is set, but is it from the command line or the environment?
5413
5414    # Try to remove the string !BASH! from our list.
5415    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5416    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5417      # If it failed, the variable was not from the command line. Ignore it,
5418      # but warn the user (except for BASH, which is always set by the calling BASH).
5419      if test "xBASH" != xBASH; then
5420        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5421$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5422      fi
5423      # Try to locate tool using the code snippet
5424      for ac_prog in bash
5425do
5426  # Extract the first word of "$ac_prog", so it can be a program name with args.
5427set dummy $ac_prog; ac_word=$2
5428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5429$as_echo_n "checking for $ac_word... " >&6; }
5430if ${ac_cv_path_BASH+:} false; then :
5431  $as_echo_n "(cached) " >&6
5432else
5433  case $BASH in
5434  [\\/]* | ?:[\\/]*)
5435  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5436  ;;
5437  *)
5438  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5439for as_dir in $PATH
5440do
5441  IFS=$as_save_IFS
5442  test -z "$as_dir" && as_dir=.
5443    for ac_exec_ext in '' $ac_executable_extensions; do
5444  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5445    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5446    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5447    break 2
5448  fi
5449done
5450  done
5451IFS=$as_save_IFS
5452
5453  ;;
5454esac
5455fi
5456BASH=$ac_cv_path_BASH
5457if test -n "$BASH"; then
5458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5459$as_echo "$BASH" >&6; }
5460else
5461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5462$as_echo "no" >&6; }
5463fi
5464
5465
5466  test -n "$BASH" && break
5467done
5468
5469    else
5470      # If it succeeded, then it was overridden by the user. We will use it
5471      # for the tool.
5472
5473      # First remove it from the list of overridden variables, so we can test
5474      # for unknown variables in the end.
5475      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5476
5477      # Check if we try to supply an empty value
5478      if test "x$BASH" = x; then
5479        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5480$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5481        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5482$as_echo_n "checking for BASH... " >&6; }
5483        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5484$as_echo "disabled" >&6; }
5485      else
5486        # Check if the provided tool contains a complete path.
5487        tool_specified="$BASH"
5488        tool_basename="${tool_specified##*/}"
5489        if test "x$tool_basename" = "x$tool_specified"; then
5490          # A command without a complete path is provided, search $PATH.
5491          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5492$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5493          # Extract the first word of "$tool_basename", so it can be a program name with args.
5494set dummy $tool_basename; ac_word=$2
5495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5496$as_echo_n "checking for $ac_word... " >&6; }
5497if ${ac_cv_path_BASH+:} false; then :
5498  $as_echo_n "(cached) " >&6
5499else
5500  case $BASH in
5501  [\\/]* | ?:[\\/]*)
5502  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5503  ;;
5504  *)
5505  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5506for as_dir in $PATH
5507do
5508  IFS=$as_save_IFS
5509  test -z "$as_dir" && as_dir=.
5510    for ac_exec_ext in '' $ac_executable_extensions; do
5511  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5512    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5513    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5514    break 2
5515  fi
5516done
5517  done
5518IFS=$as_save_IFS
5519
5520  ;;
5521esac
5522fi
5523BASH=$ac_cv_path_BASH
5524if test -n "$BASH"; then
5525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5526$as_echo "$BASH" >&6; }
5527else
5528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5529$as_echo "no" >&6; }
5530fi
5531
5532
5533          if test "x$BASH" = x; then
5534            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5535          fi
5536        else
5537          # Otherwise we believe it is a complete path. Use it as it is.
5538          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5539$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5540          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5541$as_echo_n "checking for BASH... " >&6; }
5542          if test ! -x "$tool_specified"; then
5543            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5544$as_echo "not found" >&6; }
5545            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5546          fi
5547          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5548$as_echo "$tool_specified" >&6; }
5549        fi
5550      fi
5551    fi
5552
5553  fi
5554
5555
5556
5557  if test "x$BASH" = x; then
5558    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5559  fi
5560
5561
5562
5563
5564
5565  # Publish this variable in the help.
5566
5567
5568  if [ -z "${CAT+x}" ]; then
5569    # The variable is not set by user, try to locate tool using the code snippet
5570    for ac_prog in cat
5571do
5572  # Extract the first word of "$ac_prog", so it can be a program name with args.
5573set dummy $ac_prog; ac_word=$2
5574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5575$as_echo_n "checking for $ac_word... " >&6; }
5576if ${ac_cv_path_CAT+:} false; then :
5577  $as_echo_n "(cached) " >&6
5578else
5579  case $CAT in
5580  [\\/]* | ?:[\\/]*)
5581  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5582  ;;
5583  *)
5584  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5585for as_dir in $PATH
5586do
5587  IFS=$as_save_IFS
5588  test -z "$as_dir" && as_dir=.
5589    for ac_exec_ext in '' $ac_executable_extensions; do
5590  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5591    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5592    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5593    break 2
5594  fi
5595done
5596  done
5597IFS=$as_save_IFS
5598
5599  ;;
5600esac
5601fi
5602CAT=$ac_cv_path_CAT
5603if test -n "$CAT"; then
5604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5605$as_echo "$CAT" >&6; }
5606else
5607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5608$as_echo "no" >&6; }
5609fi
5610
5611
5612  test -n "$CAT" && break
5613done
5614
5615  else
5616    # The variable is set, but is it from the command line or the environment?
5617
5618    # Try to remove the string !CAT! from our list.
5619    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5620    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5621      # If it failed, the variable was not from the command line. Ignore it,
5622      # but warn the user (except for BASH, which is always set by the calling BASH).
5623      if test "xCAT" != xBASH; then
5624        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5625$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5626      fi
5627      # Try to locate tool using the code snippet
5628      for ac_prog in cat
5629do
5630  # Extract the first word of "$ac_prog", so it can be a program name with args.
5631set dummy $ac_prog; ac_word=$2
5632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5633$as_echo_n "checking for $ac_word... " >&6; }
5634if ${ac_cv_path_CAT+:} false; then :
5635  $as_echo_n "(cached) " >&6
5636else
5637  case $CAT in
5638  [\\/]* | ?:[\\/]*)
5639  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5640  ;;
5641  *)
5642  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5643for as_dir in $PATH
5644do
5645  IFS=$as_save_IFS
5646  test -z "$as_dir" && as_dir=.
5647    for ac_exec_ext in '' $ac_executable_extensions; do
5648  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5649    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5650    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5651    break 2
5652  fi
5653done
5654  done
5655IFS=$as_save_IFS
5656
5657  ;;
5658esac
5659fi
5660CAT=$ac_cv_path_CAT
5661if test -n "$CAT"; then
5662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5663$as_echo "$CAT" >&6; }
5664else
5665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5666$as_echo "no" >&6; }
5667fi
5668
5669
5670  test -n "$CAT" && break
5671done
5672
5673    else
5674      # If it succeeded, then it was overridden by the user. We will use it
5675      # for the tool.
5676
5677      # First remove it from the list of overridden variables, so we can test
5678      # for unknown variables in the end.
5679      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5680
5681      # Check if we try to supply an empty value
5682      if test "x$CAT" = x; then
5683        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5684$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5685        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5686$as_echo_n "checking for CAT... " >&6; }
5687        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5688$as_echo "disabled" >&6; }
5689      else
5690        # Check if the provided tool contains a complete path.
5691        tool_specified="$CAT"
5692        tool_basename="${tool_specified##*/}"
5693        if test "x$tool_basename" = "x$tool_specified"; then
5694          # A command without a complete path is provided, search $PATH.
5695          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5696$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5697          # Extract the first word of "$tool_basename", so it can be a program name with args.
5698set dummy $tool_basename; ac_word=$2
5699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5700$as_echo_n "checking for $ac_word... " >&6; }
5701if ${ac_cv_path_CAT+:} false; then :
5702  $as_echo_n "(cached) " >&6
5703else
5704  case $CAT in
5705  [\\/]* | ?:[\\/]*)
5706  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5707  ;;
5708  *)
5709  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5710for as_dir in $PATH
5711do
5712  IFS=$as_save_IFS
5713  test -z "$as_dir" && as_dir=.
5714    for ac_exec_ext in '' $ac_executable_extensions; do
5715  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5716    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5717    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5718    break 2
5719  fi
5720done
5721  done
5722IFS=$as_save_IFS
5723
5724  ;;
5725esac
5726fi
5727CAT=$ac_cv_path_CAT
5728if test -n "$CAT"; then
5729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5730$as_echo "$CAT" >&6; }
5731else
5732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5733$as_echo "no" >&6; }
5734fi
5735
5736
5737          if test "x$CAT" = x; then
5738            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5739          fi
5740        else
5741          # Otherwise we believe it is a complete path. Use it as it is.
5742          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5743$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5744          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5745$as_echo_n "checking for CAT... " >&6; }
5746          if test ! -x "$tool_specified"; then
5747            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5748$as_echo "not found" >&6; }
5749            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5750          fi
5751          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5752$as_echo "$tool_specified" >&6; }
5753        fi
5754      fi
5755    fi
5756
5757  fi
5758
5759
5760
5761  if test "x$CAT" = x; then
5762    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5763  fi
5764
5765
5766
5767
5768
5769  # Publish this variable in the help.
5770
5771
5772  if [ -z "${CHMOD+x}" ]; then
5773    # The variable is not set by user, try to locate tool using the code snippet
5774    for ac_prog in chmod
5775do
5776  # Extract the first word of "$ac_prog", so it can be a program name with args.
5777set dummy $ac_prog; ac_word=$2
5778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5779$as_echo_n "checking for $ac_word... " >&6; }
5780if ${ac_cv_path_CHMOD+:} false; then :
5781  $as_echo_n "(cached) " >&6
5782else
5783  case $CHMOD in
5784  [\\/]* | ?:[\\/]*)
5785  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5786  ;;
5787  *)
5788  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5789for as_dir in $PATH
5790do
5791  IFS=$as_save_IFS
5792  test -z "$as_dir" && as_dir=.
5793    for ac_exec_ext in '' $ac_executable_extensions; do
5794  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5795    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5796    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5797    break 2
5798  fi
5799done
5800  done
5801IFS=$as_save_IFS
5802
5803  ;;
5804esac
5805fi
5806CHMOD=$ac_cv_path_CHMOD
5807if test -n "$CHMOD"; then
5808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5809$as_echo "$CHMOD" >&6; }
5810else
5811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5812$as_echo "no" >&6; }
5813fi
5814
5815
5816  test -n "$CHMOD" && break
5817done
5818
5819  else
5820    # The variable is set, but is it from the command line or the environment?
5821
5822    # Try to remove the string !CHMOD! from our list.
5823    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5824    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5825      # If it failed, the variable was not from the command line. Ignore it,
5826      # but warn the user (except for BASH, which is always set by the calling BASH).
5827      if test "xCHMOD" != xBASH; then
5828        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5829$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5830      fi
5831      # Try to locate tool using the code snippet
5832      for ac_prog in chmod
5833do
5834  # Extract the first word of "$ac_prog", so it can be a program name with args.
5835set dummy $ac_prog; ac_word=$2
5836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5837$as_echo_n "checking for $ac_word... " >&6; }
5838if ${ac_cv_path_CHMOD+:} false; then :
5839  $as_echo_n "(cached) " >&6
5840else
5841  case $CHMOD in
5842  [\\/]* | ?:[\\/]*)
5843  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5844  ;;
5845  *)
5846  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5847for as_dir in $PATH
5848do
5849  IFS=$as_save_IFS
5850  test -z "$as_dir" && as_dir=.
5851    for ac_exec_ext in '' $ac_executable_extensions; do
5852  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5853    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5854    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5855    break 2
5856  fi
5857done
5858  done
5859IFS=$as_save_IFS
5860
5861  ;;
5862esac
5863fi
5864CHMOD=$ac_cv_path_CHMOD
5865if test -n "$CHMOD"; then
5866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5867$as_echo "$CHMOD" >&6; }
5868else
5869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5870$as_echo "no" >&6; }
5871fi
5872
5873
5874  test -n "$CHMOD" && break
5875done
5876
5877    else
5878      # If it succeeded, then it was overridden by the user. We will use it
5879      # for the tool.
5880
5881      # First remove it from the list of overridden variables, so we can test
5882      # for unknown variables in the end.
5883      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5884
5885      # Check if we try to supply an empty value
5886      if test "x$CHMOD" = x; then
5887        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5888$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5889        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5890$as_echo_n "checking for CHMOD... " >&6; }
5891        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5892$as_echo "disabled" >&6; }
5893      else
5894        # Check if the provided tool contains a complete path.
5895        tool_specified="$CHMOD"
5896        tool_basename="${tool_specified##*/}"
5897        if test "x$tool_basename" = "x$tool_specified"; then
5898          # A command without a complete path is provided, search $PATH.
5899          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5900$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5901          # Extract the first word of "$tool_basename", so it can be a program name with args.
5902set dummy $tool_basename; ac_word=$2
5903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5904$as_echo_n "checking for $ac_word... " >&6; }
5905if ${ac_cv_path_CHMOD+:} false; then :
5906  $as_echo_n "(cached) " >&6
5907else
5908  case $CHMOD in
5909  [\\/]* | ?:[\\/]*)
5910  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5911  ;;
5912  *)
5913  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5914for as_dir in $PATH
5915do
5916  IFS=$as_save_IFS
5917  test -z "$as_dir" && as_dir=.
5918    for ac_exec_ext in '' $ac_executable_extensions; do
5919  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5920    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5921    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5922    break 2
5923  fi
5924done
5925  done
5926IFS=$as_save_IFS
5927
5928  ;;
5929esac
5930fi
5931CHMOD=$ac_cv_path_CHMOD
5932if test -n "$CHMOD"; then
5933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5934$as_echo "$CHMOD" >&6; }
5935else
5936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5937$as_echo "no" >&6; }
5938fi
5939
5940
5941          if test "x$CHMOD" = x; then
5942            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5943          fi
5944        else
5945          # Otherwise we believe it is a complete path. Use it as it is.
5946          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5947$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5948          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5949$as_echo_n "checking for CHMOD... " >&6; }
5950          if test ! -x "$tool_specified"; then
5951            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5952$as_echo "not found" >&6; }
5953            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5954          fi
5955          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5956$as_echo "$tool_specified" >&6; }
5957        fi
5958      fi
5959    fi
5960
5961  fi
5962
5963
5964
5965  if test "x$CHMOD" = x; then
5966    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5967  fi
5968
5969
5970
5971
5972
5973  # Publish this variable in the help.
5974
5975
5976  if [ -z "${CMP+x}" ]; then
5977    # The variable is not set by user, try to locate tool using the code snippet
5978    for ac_prog in cmp
5979do
5980  # Extract the first word of "$ac_prog", so it can be a program name with args.
5981set dummy $ac_prog; ac_word=$2
5982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5983$as_echo_n "checking for $ac_word... " >&6; }
5984if ${ac_cv_path_CMP+:} false; then :
5985  $as_echo_n "(cached) " >&6
5986else
5987  case $CMP in
5988  [\\/]* | ?:[\\/]*)
5989  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5990  ;;
5991  *)
5992  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5993for as_dir in $PATH
5994do
5995  IFS=$as_save_IFS
5996  test -z "$as_dir" && as_dir=.
5997    for ac_exec_ext in '' $ac_executable_extensions; do
5998  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5999    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6000    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6001    break 2
6002  fi
6003done
6004  done
6005IFS=$as_save_IFS
6006
6007  ;;
6008esac
6009fi
6010CMP=$ac_cv_path_CMP
6011if test -n "$CMP"; then
6012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6013$as_echo "$CMP" >&6; }
6014else
6015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6016$as_echo "no" >&6; }
6017fi
6018
6019
6020  test -n "$CMP" && break
6021done
6022
6023  else
6024    # The variable is set, but is it from the command line or the environment?
6025
6026    # Try to remove the string !CMP! from our list.
6027    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
6028    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6029      # If it failed, the variable was not from the command line. Ignore it,
6030      # but warn the user (except for BASH, which is always set by the calling BASH).
6031      if test "xCMP" != xBASH; then
6032        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
6033$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
6034      fi
6035      # Try to locate tool using the code snippet
6036      for ac_prog in cmp
6037do
6038  # Extract the first word of "$ac_prog", so it can be a program name with args.
6039set dummy $ac_prog; ac_word=$2
6040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6041$as_echo_n "checking for $ac_word... " >&6; }
6042if ${ac_cv_path_CMP+:} false; then :
6043  $as_echo_n "(cached) " >&6
6044else
6045  case $CMP in
6046  [\\/]* | ?:[\\/]*)
6047  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6048  ;;
6049  *)
6050  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6051for as_dir in $PATH
6052do
6053  IFS=$as_save_IFS
6054  test -z "$as_dir" && as_dir=.
6055    for ac_exec_ext in '' $ac_executable_extensions; do
6056  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6057    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6058    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6059    break 2
6060  fi
6061done
6062  done
6063IFS=$as_save_IFS
6064
6065  ;;
6066esac
6067fi
6068CMP=$ac_cv_path_CMP
6069if test -n "$CMP"; then
6070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6071$as_echo "$CMP" >&6; }
6072else
6073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6074$as_echo "no" >&6; }
6075fi
6076
6077
6078  test -n "$CMP" && break
6079done
6080
6081    else
6082      # If it succeeded, then it was overridden by the user. We will use it
6083      # for the tool.
6084
6085      # First remove it from the list of overridden variables, so we can test
6086      # for unknown variables in the end.
6087      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6088
6089      # Check if we try to supply an empty value
6090      if test "x$CMP" = x; then
6091        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6092$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6093        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6094$as_echo_n "checking for CMP... " >&6; }
6095        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6096$as_echo "disabled" >&6; }
6097      else
6098        # Check if the provided tool contains a complete path.
6099        tool_specified="$CMP"
6100        tool_basename="${tool_specified##*/}"
6101        if test "x$tool_basename" = "x$tool_specified"; then
6102          # A command without a complete path is provided, search $PATH.
6103          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6104$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6105          # Extract the first word of "$tool_basename", so it can be a program name with args.
6106set dummy $tool_basename; ac_word=$2
6107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6108$as_echo_n "checking for $ac_word... " >&6; }
6109if ${ac_cv_path_CMP+:} false; then :
6110  $as_echo_n "(cached) " >&6
6111else
6112  case $CMP in
6113  [\\/]* | ?:[\\/]*)
6114  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6115  ;;
6116  *)
6117  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6118for as_dir in $PATH
6119do
6120  IFS=$as_save_IFS
6121  test -z "$as_dir" && as_dir=.
6122    for ac_exec_ext in '' $ac_executable_extensions; do
6123  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6124    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6125    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6126    break 2
6127  fi
6128done
6129  done
6130IFS=$as_save_IFS
6131
6132  ;;
6133esac
6134fi
6135CMP=$ac_cv_path_CMP
6136if test -n "$CMP"; then
6137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6138$as_echo "$CMP" >&6; }
6139else
6140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6141$as_echo "no" >&6; }
6142fi
6143
6144
6145          if test "x$CMP" = x; then
6146            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6147          fi
6148        else
6149          # Otherwise we believe it is a complete path. Use it as it is.
6150          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6151$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6152          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6153$as_echo_n "checking for CMP... " >&6; }
6154          if test ! -x "$tool_specified"; then
6155            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6156$as_echo "not found" >&6; }
6157            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6158          fi
6159          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6160$as_echo "$tool_specified" >&6; }
6161        fi
6162      fi
6163    fi
6164
6165  fi
6166
6167
6168
6169  if test "x$CMP" = x; then
6170    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6171  fi
6172
6173
6174
6175
6176
6177  # Publish this variable in the help.
6178
6179
6180  if [ -z "${COMM+x}" ]; then
6181    # The variable is not set by user, try to locate tool using the code snippet
6182    for ac_prog in comm
6183do
6184  # Extract the first word of "$ac_prog", so it can be a program name with args.
6185set dummy $ac_prog; ac_word=$2
6186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6187$as_echo_n "checking for $ac_word... " >&6; }
6188if ${ac_cv_path_COMM+:} false; then :
6189  $as_echo_n "(cached) " >&6
6190else
6191  case $COMM in
6192  [\\/]* | ?:[\\/]*)
6193  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6194  ;;
6195  *)
6196  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6197for as_dir in $PATH
6198do
6199  IFS=$as_save_IFS
6200  test -z "$as_dir" && as_dir=.
6201    for ac_exec_ext in '' $ac_executable_extensions; do
6202  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6203    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6204    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6205    break 2
6206  fi
6207done
6208  done
6209IFS=$as_save_IFS
6210
6211  ;;
6212esac
6213fi
6214COMM=$ac_cv_path_COMM
6215if test -n "$COMM"; then
6216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6217$as_echo "$COMM" >&6; }
6218else
6219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6220$as_echo "no" >&6; }
6221fi
6222
6223
6224  test -n "$COMM" && break
6225done
6226
6227  else
6228    # The variable is set, but is it from the command line or the environment?
6229
6230    # Try to remove the string !COMM! from our list.
6231    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6232    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6233      # If it failed, the variable was not from the command line. Ignore it,
6234      # but warn the user (except for BASH, which is always set by the calling BASH).
6235      if test "xCOMM" != xBASH; then
6236        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6237$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6238      fi
6239      # Try to locate tool using the code snippet
6240      for ac_prog in comm
6241do
6242  # Extract the first word of "$ac_prog", so it can be a program name with args.
6243set dummy $ac_prog; ac_word=$2
6244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6245$as_echo_n "checking for $ac_word... " >&6; }
6246if ${ac_cv_path_COMM+:} false; then :
6247  $as_echo_n "(cached) " >&6
6248else
6249  case $COMM in
6250  [\\/]* | ?:[\\/]*)
6251  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6252  ;;
6253  *)
6254  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6255for as_dir in $PATH
6256do
6257  IFS=$as_save_IFS
6258  test -z "$as_dir" && as_dir=.
6259    for ac_exec_ext in '' $ac_executable_extensions; do
6260  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6261    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6263    break 2
6264  fi
6265done
6266  done
6267IFS=$as_save_IFS
6268
6269  ;;
6270esac
6271fi
6272COMM=$ac_cv_path_COMM
6273if test -n "$COMM"; then
6274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6275$as_echo "$COMM" >&6; }
6276else
6277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6278$as_echo "no" >&6; }
6279fi
6280
6281
6282  test -n "$COMM" && break
6283done
6284
6285    else
6286      # If it succeeded, then it was overridden by the user. We will use it
6287      # for the tool.
6288
6289      # First remove it from the list of overridden variables, so we can test
6290      # for unknown variables in the end.
6291      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6292
6293      # Check if we try to supply an empty value
6294      if test "x$COMM" = x; then
6295        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6296$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6297        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6298$as_echo_n "checking for COMM... " >&6; }
6299        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6300$as_echo "disabled" >&6; }
6301      else
6302        # Check if the provided tool contains a complete path.
6303        tool_specified="$COMM"
6304        tool_basename="${tool_specified##*/}"
6305        if test "x$tool_basename" = "x$tool_specified"; then
6306          # A command without a complete path is provided, search $PATH.
6307          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6308$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6309          # Extract the first word of "$tool_basename", so it can be a program name with args.
6310set dummy $tool_basename; ac_word=$2
6311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6312$as_echo_n "checking for $ac_word... " >&6; }
6313if ${ac_cv_path_COMM+:} false; then :
6314  $as_echo_n "(cached) " >&6
6315else
6316  case $COMM in
6317  [\\/]* | ?:[\\/]*)
6318  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6319  ;;
6320  *)
6321  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6322for as_dir in $PATH
6323do
6324  IFS=$as_save_IFS
6325  test -z "$as_dir" && as_dir=.
6326    for ac_exec_ext in '' $ac_executable_extensions; do
6327  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6328    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6329    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6330    break 2
6331  fi
6332done
6333  done
6334IFS=$as_save_IFS
6335
6336  ;;
6337esac
6338fi
6339COMM=$ac_cv_path_COMM
6340if test -n "$COMM"; then
6341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6342$as_echo "$COMM" >&6; }
6343else
6344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6345$as_echo "no" >&6; }
6346fi
6347
6348
6349          if test "x$COMM" = x; then
6350            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6351          fi
6352        else
6353          # Otherwise we believe it is a complete path. Use it as it is.
6354          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6355$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6356          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6357$as_echo_n "checking for COMM... " >&6; }
6358          if test ! -x "$tool_specified"; then
6359            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6360$as_echo "not found" >&6; }
6361            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6362          fi
6363          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6364$as_echo "$tool_specified" >&6; }
6365        fi
6366      fi
6367    fi
6368
6369  fi
6370
6371
6372
6373  if test "x$COMM" = x; then
6374    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6375  fi
6376
6377
6378
6379
6380
6381  # Publish this variable in the help.
6382
6383
6384  if [ -z "${CP+x}" ]; then
6385    # The variable is not set by user, try to locate tool using the code snippet
6386    for ac_prog in cp
6387do
6388  # Extract the first word of "$ac_prog", so it can be a program name with args.
6389set dummy $ac_prog; ac_word=$2
6390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6391$as_echo_n "checking for $ac_word... " >&6; }
6392if ${ac_cv_path_CP+:} false; then :
6393  $as_echo_n "(cached) " >&6
6394else
6395  case $CP in
6396  [\\/]* | ?:[\\/]*)
6397  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6398  ;;
6399  *)
6400  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6401for as_dir in $PATH
6402do
6403  IFS=$as_save_IFS
6404  test -z "$as_dir" && as_dir=.
6405    for ac_exec_ext in '' $ac_executable_extensions; do
6406  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6407    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6408    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6409    break 2
6410  fi
6411done
6412  done
6413IFS=$as_save_IFS
6414
6415  ;;
6416esac
6417fi
6418CP=$ac_cv_path_CP
6419if test -n "$CP"; then
6420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6421$as_echo "$CP" >&6; }
6422else
6423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6424$as_echo "no" >&6; }
6425fi
6426
6427
6428  test -n "$CP" && break
6429done
6430
6431  else
6432    # The variable is set, but is it from the command line or the environment?
6433
6434    # Try to remove the string !CP! from our list.
6435    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6436    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6437      # If it failed, the variable was not from the command line. Ignore it,
6438      # but warn the user (except for BASH, which is always set by the calling BASH).
6439      if test "xCP" != xBASH; then
6440        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6441$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6442      fi
6443      # Try to locate tool using the code snippet
6444      for ac_prog in cp
6445do
6446  # Extract the first word of "$ac_prog", so it can be a program name with args.
6447set dummy $ac_prog; ac_word=$2
6448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6449$as_echo_n "checking for $ac_word... " >&6; }
6450if ${ac_cv_path_CP+:} false; then :
6451  $as_echo_n "(cached) " >&6
6452else
6453  case $CP in
6454  [\\/]* | ?:[\\/]*)
6455  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6456  ;;
6457  *)
6458  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6459for as_dir in $PATH
6460do
6461  IFS=$as_save_IFS
6462  test -z "$as_dir" && as_dir=.
6463    for ac_exec_ext in '' $ac_executable_extensions; do
6464  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6465    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6466    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6467    break 2
6468  fi
6469done
6470  done
6471IFS=$as_save_IFS
6472
6473  ;;
6474esac
6475fi
6476CP=$ac_cv_path_CP
6477if test -n "$CP"; then
6478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6479$as_echo "$CP" >&6; }
6480else
6481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6482$as_echo "no" >&6; }
6483fi
6484
6485
6486  test -n "$CP" && break
6487done
6488
6489    else
6490      # If it succeeded, then it was overridden by the user. We will use it
6491      # for the tool.
6492
6493      # First remove it from the list of overridden variables, so we can test
6494      # for unknown variables in the end.
6495      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6496
6497      # Check if we try to supply an empty value
6498      if test "x$CP" = x; then
6499        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6500$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6501        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6502$as_echo_n "checking for CP... " >&6; }
6503        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6504$as_echo "disabled" >&6; }
6505      else
6506        # Check if the provided tool contains a complete path.
6507        tool_specified="$CP"
6508        tool_basename="${tool_specified##*/}"
6509        if test "x$tool_basename" = "x$tool_specified"; then
6510          # A command without a complete path is provided, search $PATH.
6511          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6512$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6513          # Extract the first word of "$tool_basename", so it can be a program name with args.
6514set dummy $tool_basename; ac_word=$2
6515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6516$as_echo_n "checking for $ac_word... " >&6; }
6517if ${ac_cv_path_CP+:} false; then :
6518  $as_echo_n "(cached) " >&6
6519else
6520  case $CP in
6521  [\\/]* | ?:[\\/]*)
6522  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6523  ;;
6524  *)
6525  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6526for as_dir in $PATH
6527do
6528  IFS=$as_save_IFS
6529  test -z "$as_dir" && as_dir=.
6530    for ac_exec_ext in '' $ac_executable_extensions; do
6531  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6532    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6533    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6534    break 2
6535  fi
6536done
6537  done
6538IFS=$as_save_IFS
6539
6540  ;;
6541esac
6542fi
6543CP=$ac_cv_path_CP
6544if test -n "$CP"; then
6545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6546$as_echo "$CP" >&6; }
6547else
6548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6549$as_echo "no" >&6; }
6550fi
6551
6552
6553          if test "x$CP" = x; then
6554            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6555          fi
6556        else
6557          # Otherwise we believe it is a complete path. Use it as it is.
6558          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6559$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6560          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6561$as_echo_n "checking for CP... " >&6; }
6562          if test ! -x "$tool_specified"; then
6563            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6564$as_echo "not found" >&6; }
6565            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6566          fi
6567          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6568$as_echo "$tool_specified" >&6; }
6569        fi
6570      fi
6571    fi
6572
6573  fi
6574
6575
6576
6577  if test "x$CP" = x; then
6578    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6579  fi
6580
6581
6582
6583
6584
6585  # Publish this variable in the help.
6586
6587
6588  if [ -z "${CUT+x}" ]; then
6589    # The variable is not set by user, try to locate tool using the code snippet
6590    for ac_prog in cut
6591do
6592  # Extract the first word of "$ac_prog", so it can be a program name with args.
6593set dummy $ac_prog; ac_word=$2
6594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6595$as_echo_n "checking for $ac_word... " >&6; }
6596if ${ac_cv_path_CUT+:} false; then :
6597  $as_echo_n "(cached) " >&6
6598else
6599  case $CUT in
6600  [\\/]* | ?:[\\/]*)
6601  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6602  ;;
6603  *)
6604  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6605for as_dir in $PATH
6606do
6607  IFS=$as_save_IFS
6608  test -z "$as_dir" && as_dir=.
6609    for ac_exec_ext in '' $ac_executable_extensions; do
6610  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6611    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6612    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6613    break 2
6614  fi
6615done
6616  done
6617IFS=$as_save_IFS
6618
6619  ;;
6620esac
6621fi
6622CUT=$ac_cv_path_CUT
6623if test -n "$CUT"; then
6624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6625$as_echo "$CUT" >&6; }
6626else
6627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6628$as_echo "no" >&6; }
6629fi
6630
6631
6632  test -n "$CUT" && break
6633done
6634
6635  else
6636    # The variable is set, but is it from the command line or the environment?
6637
6638    # Try to remove the string !CUT! from our list.
6639    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6640    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6641      # If it failed, the variable was not from the command line. Ignore it,
6642      # but warn the user (except for BASH, which is always set by the calling BASH).
6643      if test "xCUT" != xBASH; then
6644        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6645$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6646      fi
6647      # Try to locate tool using the code snippet
6648      for ac_prog in cut
6649do
6650  # Extract the first word of "$ac_prog", so it can be a program name with args.
6651set dummy $ac_prog; ac_word=$2
6652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6653$as_echo_n "checking for $ac_word... " >&6; }
6654if ${ac_cv_path_CUT+:} false; then :
6655  $as_echo_n "(cached) " >&6
6656else
6657  case $CUT in
6658  [\\/]* | ?:[\\/]*)
6659  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6660  ;;
6661  *)
6662  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6663for as_dir in $PATH
6664do
6665  IFS=$as_save_IFS
6666  test -z "$as_dir" && as_dir=.
6667    for ac_exec_ext in '' $ac_executable_extensions; do
6668  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6669    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6670    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6671    break 2
6672  fi
6673done
6674  done
6675IFS=$as_save_IFS
6676
6677  ;;
6678esac
6679fi
6680CUT=$ac_cv_path_CUT
6681if test -n "$CUT"; then
6682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6683$as_echo "$CUT" >&6; }
6684else
6685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6686$as_echo "no" >&6; }
6687fi
6688
6689
6690  test -n "$CUT" && break
6691done
6692
6693    else
6694      # If it succeeded, then it was overridden by the user. We will use it
6695      # for the tool.
6696
6697      # First remove it from the list of overridden variables, so we can test
6698      # for unknown variables in the end.
6699      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6700
6701      # Check if we try to supply an empty value
6702      if test "x$CUT" = x; then
6703        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6704$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6705        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6706$as_echo_n "checking for CUT... " >&6; }
6707        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6708$as_echo "disabled" >&6; }
6709      else
6710        # Check if the provided tool contains a complete path.
6711        tool_specified="$CUT"
6712        tool_basename="${tool_specified##*/}"
6713        if test "x$tool_basename" = "x$tool_specified"; then
6714          # A command without a complete path is provided, search $PATH.
6715          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6716$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6717          # Extract the first word of "$tool_basename", so it can be a program name with args.
6718set dummy $tool_basename; ac_word=$2
6719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6720$as_echo_n "checking for $ac_word... " >&6; }
6721if ${ac_cv_path_CUT+:} false; then :
6722  $as_echo_n "(cached) " >&6
6723else
6724  case $CUT in
6725  [\\/]* | ?:[\\/]*)
6726  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6727  ;;
6728  *)
6729  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6730for as_dir in $PATH
6731do
6732  IFS=$as_save_IFS
6733  test -z "$as_dir" && as_dir=.
6734    for ac_exec_ext in '' $ac_executable_extensions; do
6735  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6736    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6737    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6738    break 2
6739  fi
6740done
6741  done
6742IFS=$as_save_IFS
6743
6744  ;;
6745esac
6746fi
6747CUT=$ac_cv_path_CUT
6748if test -n "$CUT"; then
6749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6750$as_echo "$CUT" >&6; }
6751else
6752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6753$as_echo "no" >&6; }
6754fi
6755
6756
6757          if test "x$CUT" = x; then
6758            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6759          fi
6760        else
6761          # Otherwise we believe it is a complete path. Use it as it is.
6762          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6763$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6764          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6765$as_echo_n "checking for CUT... " >&6; }
6766          if test ! -x "$tool_specified"; then
6767            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6768$as_echo "not found" >&6; }
6769            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6770          fi
6771          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6772$as_echo "$tool_specified" >&6; }
6773        fi
6774      fi
6775    fi
6776
6777  fi
6778
6779
6780
6781  if test "x$CUT" = x; then
6782    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6783  fi
6784
6785
6786
6787
6788
6789  # Publish this variable in the help.
6790
6791
6792  if [ -z "${DATE+x}" ]; then
6793    # The variable is not set by user, try to locate tool using the code snippet
6794    for ac_prog in date
6795do
6796  # Extract the first word of "$ac_prog", so it can be a program name with args.
6797set dummy $ac_prog; ac_word=$2
6798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6799$as_echo_n "checking for $ac_word... " >&6; }
6800if ${ac_cv_path_DATE+:} false; then :
6801  $as_echo_n "(cached) " >&6
6802else
6803  case $DATE in
6804  [\\/]* | ?:[\\/]*)
6805  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6806  ;;
6807  *)
6808  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6809for as_dir in $PATH
6810do
6811  IFS=$as_save_IFS
6812  test -z "$as_dir" && as_dir=.
6813    for ac_exec_ext in '' $ac_executable_extensions; do
6814  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6815    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6816    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6817    break 2
6818  fi
6819done
6820  done
6821IFS=$as_save_IFS
6822
6823  ;;
6824esac
6825fi
6826DATE=$ac_cv_path_DATE
6827if test -n "$DATE"; then
6828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6829$as_echo "$DATE" >&6; }
6830else
6831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6832$as_echo "no" >&6; }
6833fi
6834
6835
6836  test -n "$DATE" && break
6837done
6838
6839  else
6840    # The variable is set, but is it from the command line or the environment?
6841
6842    # Try to remove the string !DATE! from our list.
6843    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6844    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6845      # If it failed, the variable was not from the command line. Ignore it,
6846      # but warn the user (except for BASH, which is always set by the calling BASH).
6847      if test "xDATE" != xBASH; then
6848        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6849$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6850      fi
6851      # Try to locate tool using the code snippet
6852      for ac_prog in date
6853do
6854  # Extract the first word of "$ac_prog", so it can be a program name with args.
6855set dummy $ac_prog; ac_word=$2
6856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6857$as_echo_n "checking for $ac_word... " >&6; }
6858if ${ac_cv_path_DATE+:} false; then :
6859  $as_echo_n "(cached) " >&6
6860else
6861  case $DATE in
6862  [\\/]* | ?:[\\/]*)
6863  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6864  ;;
6865  *)
6866  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6867for as_dir in $PATH
6868do
6869  IFS=$as_save_IFS
6870  test -z "$as_dir" && as_dir=.
6871    for ac_exec_ext in '' $ac_executable_extensions; do
6872  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6873    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6874    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6875    break 2
6876  fi
6877done
6878  done
6879IFS=$as_save_IFS
6880
6881  ;;
6882esac
6883fi
6884DATE=$ac_cv_path_DATE
6885if test -n "$DATE"; then
6886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6887$as_echo "$DATE" >&6; }
6888else
6889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6890$as_echo "no" >&6; }
6891fi
6892
6893
6894  test -n "$DATE" && break
6895done
6896
6897    else
6898      # If it succeeded, then it was overridden by the user. We will use it
6899      # for the tool.
6900
6901      # First remove it from the list of overridden variables, so we can test
6902      # for unknown variables in the end.
6903      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6904
6905      # Check if we try to supply an empty value
6906      if test "x$DATE" = x; then
6907        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6908$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6909        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6910$as_echo_n "checking for DATE... " >&6; }
6911        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6912$as_echo "disabled" >&6; }
6913      else
6914        # Check if the provided tool contains a complete path.
6915        tool_specified="$DATE"
6916        tool_basename="${tool_specified##*/}"
6917        if test "x$tool_basename" = "x$tool_specified"; then
6918          # A command without a complete path is provided, search $PATH.
6919          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6920$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6921          # Extract the first word of "$tool_basename", so it can be a program name with args.
6922set dummy $tool_basename; ac_word=$2
6923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6924$as_echo_n "checking for $ac_word... " >&6; }
6925if ${ac_cv_path_DATE+:} false; then :
6926  $as_echo_n "(cached) " >&6
6927else
6928  case $DATE in
6929  [\\/]* | ?:[\\/]*)
6930  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6931  ;;
6932  *)
6933  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6934for as_dir in $PATH
6935do
6936  IFS=$as_save_IFS
6937  test -z "$as_dir" && as_dir=.
6938    for ac_exec_ext in '' $ac_executable_extensions; do
6939  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6940    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6941    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6942    break 2
6943  fi
6944done
6945  done
6946IFS=$as_save_IFS
6947
6948  ;;
6949esac
6950fi
6951DATE=$ac_cv_path_DATE
6952if test -n "$DATE"; then
6953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6954$as_echo "$DATE" >&6; }
6955else
6956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6957$as_echo "no" >&6; }
6958fi
6959
6960
6961          if test "x$DATE" = x; then
6962            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6963          fi
6964        else
6965          # Otherwise we believe it is a complete path. Use it as it is.
6966          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6967$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6968          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6969$as_echo_n "checking for DATE... " >&6; }
6970          if test ! -x "$tool_specified"; then
6971            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6972$as_echo "not found" >&6; }
6973            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6974          fi
6975          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6976$as_echo "$tool_specified" >&6; }
6977        fi
6978      fi
6979    fi
6980
6981  fi
6982
6983
6984
6985  if test "x$DATE" = x; then
6986    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6987  fi
6988
6989
6990
6991
6992
6993  # Publish this variable in the help.
6994
6995
6996  if [ -z "${DIFF+x}" ]; then
6997    # The variable is not set by user, try to locate tool using the code snippet
6998    for ac_prog in gdiff diff
6999do
7000  # Extract the first word of "$ac_prog", so it can be a program name with args.
7001set dummy $ac_prog; ac_word=$2
7002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7003$as_echo_n "checking for $ac_word... " >&6; }
7004if ${ac_cv_path_DIFF+:} false; then :
7005  $as_echo_n "(cached) " >&6
7006else
7007  case $DIFF in
7008  [\\/]* | ?:[\\/]*)
7009  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7010  ;;
7011  *)
7012  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7013for as_dir in $PATH
7014do
7015  IFS=$as_save_IFS
7016  test -z "$as_dir" && as_dir=.
7017    for ac_exec_ext in '' $ac_executable_extensions; do
7018  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7019    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7020    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7021    break 2
7022  fi
7023done
7024  done
7025IFS=$as_save_IFS
7026
7027  ;;
7028esac
7029fi
7030DIFF=$ac_cv_path_DIFF
7031if test -n "$DIFF"; then
7032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7033$as_echo "$DIFF" >&6; }
7034else
7035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7036$as_echo "no" >&6; }
7037fi
7038
7039
7040  test -n "$DIFF" && break
7041done
7042
7043  else
7044    # The variable is set, but is it from the command line or the environment?
7045
7046    # Try to remove the string !DIFF! from our list.
7047    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7048    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7049      # If it failed, the variable was not from the command line. Ignore it,
7050      # but warn the user (except for BASH, which is always set by the calling BASH).
7051      if test "xDIFF" != xBASH; then
7052        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7053$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7054      fi
7055      # Try to locate tool using the code snippet
7056      for ac_prog in gdiff diff
7057do
7058  # Extract the first word of "$ac_prog", so it can be a program name with args.
7059set dummy $ac_prog; ac_word=$2
7060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7061$as_echo_n "checking for $ac_word... " >&6; }
7062if ${ac_cv_path_DIFF+:} false; then :
7063  $as_echo_n "(cached) " >&6
7064else
7065  case $DIFF in
7066  [\\/]* | ?:[\\/]*)
7067  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7068  ;;
7069  *)
7070  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7071for as_dir in $PATH
7072do
7073  IFS=$as_save_IFS
7074  test -z "$as_dir" && as_dir=.
7075    for ac_exec_ext in '' $ac_executable_extensions; do
7076  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7077    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7078    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7079    break 2
7080  fi
7081done
7082  done
7083IFS=$as_save_IFS
7084
7085  ;;
7086esac
7087fi
7088DIFF=$ac_cv_path_DIFF
7089if test -n "$DIFF"; then
7090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7091$as_echo "$DIFF" >&6; }
7092else
7093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7094$as_echo "no" >&6; }
7095fi
7096
7097
7098  test -n "$DIFF" && break
7099done
7100
7101    else
7102      # If it succeeded, then it was overridden by the user. We will use it
7103      # for the tool.
7104
7105      # First remove it from the list of overridden variables, so we can test
7106      # for unknown variables in the end.
7107      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7108
7109      # Check if we try to supply an empty value
7110      if test "x$DIFF" = x; then
7111        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7112$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7113        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7114$as_echo_n "checking for DIFF... " >&6; }
7115        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7116$as_echo "disabled" >&6; }
7117      else
7118        # Check if the provided tool contains a complete path.
7119        tool_specified="$DIFF"
7120        tool_basename="${tool_specified##*/}"
7121        if test "x$tool_basename" = "x$tool_specified"; then
7122          # A command without a complete path is provided, search $PATH.
7123          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7124$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7125          # Extract the first word of "$tool_basename", so it can be a program name with args.
7126set dummy $tool_basename; ac_word=$2
7127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7128$as_echo_n "checking for $ac_word... " >&6; }
7129if ${ac_cv_path_DIFF+:} false; then :
7130  $as_echo_n "(cached) " >&6
7131else
7132  case $DIFF in
7133  [\\/]* | ?:[\\/]*)
7134  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7135  ;;
7136  *)
7137  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7138for as_dir in $PATH
7139do
7140  IFS=$as_save_IFS
7141  test -z "$as_dir" && as_dir=.
7142    for ac_exec_ext in '' $ac_executable_extensions; do
7143  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7144    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7145    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7146    break 2
7147  fi
7148done
7149  done
7150IFS=$as_save_IFS
7151
7152  ;;
7153esac
7154fi
7155DIFF=$ac_cv_path_DIFF
7156if test -n "$DIFF"; then
7157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7158$as_echo "$DIFF" >&6; }
7159else
7160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7161$as_echo "no" >&6; }
7162fi
7163
7164
7165          if test "x$DIFF" = x; then
7166            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7167          fi
7168        else
7169          # Otherwise we believe it is a complete path. Use it as it is.
7170          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7171$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7172          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7173$as_echo_n "checking for DIFF... " >&6; }
7174          if test ! -x "$tool_specified"; then
7175            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7176$as_echo "not found" >&6; }
7177            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7178          fi
7179          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7180$as_echo "$tool_specified" >&6; }
7181        fi
7182      fi
7183    fi
7184
7185  fi
7186
7187
7188
7189  if test "x$DIFF" = x; then
7190    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7191  fi
7192
7193
7194
7195
7196
7197  # Publish this variable in the help.
7198
7199
7200  if [ -z "${DIRNAME+x}" ]; then
7201    # The variable is not set by user, try to locate tool using the code snippet
7202    for ac_prog in dirname
7203do
7204  # Extract the first word of "$ac_prog", so it can be a program name with args.
7205set dummy $ac_prog; ac_word=$2
7206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7207$as_echo_n "checking for $ac_word... " >&6; }
7208if ${ac_cv_path_DIRNAME+:} false; then :
7209  $as_echo_n "(cached) " >&6
7210else
7211  case $DIRNAME in
7212  [\\/]* | ?:[\\/]*)
7213  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7214  ;;
7215  *)
7216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7217for as_dir in $PATH
7218do
7219  IFS=$as_save_IFS
7220  test -z "$as_dir" && as_dir=.
7221    for ac_exec_ext in '' $ac_executable_extensions; do
7222  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7223    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7224    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7225    break 2
7226  fi
7227done
7228  done
7229IFS=$as_save_IFS
7230
7231  ;;
7232esac
7233fi
7234DIRNAME=$ac_cv_path_DIRNAME
7235if test -n "$DIRNAME"; then
7236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7237$as_echo "$DIRNAME" >&6; }
7238else
7239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7240$as_echo "no" >&6; }
7241fi
7242
7243
7244  test -n "$DIRNAME" && break
7245done
7246
7247  else
7248    # The variable is set, but is it from the command line or the environment?
7249
7250    # Try to remove the string !DIRNAME! from our list.
7251    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7252    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7253      # If it failed, the variable was not from the command line. Ignore it,
7254      # but warn the user (except for BASH, which is always set by the calling BASH).
7255      if test "xDIRNAME" != xBASH; then
7256        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7257$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7258      fi
7259      # Try to locate tool using the code snippet
7260      for ac_prog in dirname
7261do
7262  # Extract the first word of "$ac_prog", so it can be a program name with args.
7263set dummy $ac_prog; ac_word=$2
7264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7265$as_echo_n "checking for $ac_word... " >&6; }
7266if ${ac_cv_path_DIRNAME+:} false; then :
7267  $as_echo_n "(cached) " >&6
7268else
7269  case $DIRNAME in
7270  [\\/]* | ?:[\\/]*)
7271  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7272  ;;
7273  *)
7274  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7275for as_dir in $PATH
7276do
7277  IFS=$as_save_IFS
7278  test -z "$as_dir" && as_dir=.
7279    for ac_exec_ext in '' $ac_executable_extensions; do
7280  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7281    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7282    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7283    break 2
7284  fi
7285done
7286  done
7287IFS=$as_save_IFS
7288
7289  ;;
7290esac
7291fi
7292DIRNAME=$ac_cv_path_DIRNAME
7293if test -n "$DIRNAME"; then
7294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7295$as_echo "$DIRNAME" >&6; }
7296else
7297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7298$as_echo "no" >&6; }
7299fi
7300
7301
7302  test -n "$DIRNAME" && break
7303done
7304
7305    else
7306      # If it succeeded, then it was overridden by the user. We will use it
7307      # for the tool.
7308
7309      # First remove it from the list of overridden variables, so we can test
7310      # for unknown variables in the end.
7311      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7312
7313      # Check if we try to supply an empty value
7314      if test "x$DIRNAME" = x; then
7315        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7316$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7317        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7318$as_echo_n "checking for DIRNAME... " >&6; }
7319        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7320$as_echo "disabled" >&6; }
7321      else
7322        # Check if the provided tool contains a complete path.
7323        tool_specified="$DIRNAME"
7324        tool_basename="${tool_specified##*/}"
7325        if test "x$tool_basename" = "x$tool_specified"; then
7326          # A command without a complete path is provided, search $PATH.
7327          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7328$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7329          # Extract the first word of "$tool_basename", so it can be a program name with args.
7330set dummy $tool_basename; ac_word=$2
7331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7332$as_echo_n "checking for $ac_word... " >&6; }
7333if ${ac_cv_path_DIRNAME+:} false; then :
7334  $as_echo_n "(cached) " >&6
7335else
7336  case $DIRNAME in
7337  [\\/]* | ?:[\\/]*)
7338  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7339  ;;
7340  *)
7341  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7342for as_dir in $PATH
7343do
7344  IFS=$as_save_IFS
7345  test -z "$as_dir" && as_dir=.
7346    for ac_exec_ext in '' $ac_executable_extensions; do
7347  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7348    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7349    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7350    break 2
7351  fi
7352done
7353  done
7354IFS=$as_save_IFS
7355
7356  ;;
7357esac
7358fi
7359DIRNAME=$ac_cv_path_DIRNAME
7360if test -n "$DIRNAME"; then
7361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7362$as_echo "$DIRNAME" >&6; }
7363else
7364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7365$as_echo "no" >&6; }
7366fi
7367
7368
7369          if test "x$DIRNAME" = x; then
7370            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7371          fi
7372        else
7373          # Otherwise we believe it is a complete path. Use it as it is.
7374          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7375$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7376          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7377$as_echo_n "checking for DIRNAME... " >&6; }
7378          if test ! -x "$tool_specified"; then
7379            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7380$as_echo "not found" >&6; }
7381            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7382          fi
7383          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7384$as_echo "$tool_specified" >&6; }
7385        fi
7386      fi
7387    fi
7388
7389  fi
7390
7391
7392
7393  if test "x$DIRNAME" = x; then
7394    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7395  fi
7396
7397
7398
7399
7400
7401  # Publish this variable in the help.
7402
7403
7404  if [ -z "${ECHO+x}" ]; then
7405    # The variable is not set by user, try to locate tool using the code snippet
7406    for ac_prog in echo
7407do
7408  # Extract the first word of "$ac_prog", so it can be a program name with args.
7409set dummy $ac_prog; ac_word=$2
7410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7411$as_echo_n "checking for $ac_word... " >&6; }
7412if ${ac_cv_path_ECHO+:} false; then :
7413  $as_echo_n "(cached) " >&6
7414else
7415  case $ECHO in
7416  [\\/]* | ?:[\\/]*)
7417  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7418  ;;
7419  *)
7420  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7421for as_dir in $PATH
7422do
7423  IFS=$as_save_IFS
7424  test -z "$as_dir" && as_dir=.
7425    for ac_exec_ext in '' $ac_executable_extensions; do
7426  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7427    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7428    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7429    break 2
7430  fi
7431done
7432  done
7433IFS=$as_save_IFS
7434
7435  ;;
7436esac
7437fi
7438ECHO=$ac_cv_path_ECHO
7439if test -n "$ECHO"; then
7440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7441$as_echo "$ECHO" >&6; }
7442else
7443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7444$as_echo "no" >&6; }
7445fi
7446
7447
7448  test -n "$ECHO" && break
7449done
7450
7451  else
7452    # The variable is set, but is it from the command line or the environment?
7453
7454    # Try to remove the string !ECHO! from our list.
7455    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7456    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7457      # If it failed, the variable was not from the command line. Ignore it,
7458      # but warn the user (except for BASH, which is always set by the calling BASH).
7459      if test "xECHO" != xBASH; then
7460        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7461$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7462      fi
7463      # Try to locate tool using the code snippet
7464      for ac_prog in echo
7465do
7466  # Extract the first word of "$ac_prog", so it can be a program name with args.
7467set dummy $ac_prog; ac_word=$2
7468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7469$as_echo_n "checking for $ac_word... " >&6; }
7470if ${ac_cv_path_ECHO+:} false; then :
7471  $as_echo_n "(cached) " >&6
7472else
7473  case $ECHO in
7474  [\\/]* | ?:[\\/]*)
7475  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7476  ;;
7477  *)
7478  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7479for as_dir in $PATH
7480do
7481  IFS=$as_save_IFS
7482  test -z "$as_dir" && as_dir=.
7483    for ac_exec_ext in '' $ac_executable_extensions; do
7484  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7485    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7486    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7487    break 2
7488  fi
7489done
7490  done
7491IFS=$as_save_IFS
7492
7493  ;;
7494esac
7495fi
7496ECHO=$ac_cv_path_ECHO
7497if test -n "$ECHO"; then
7498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7499$as_echo "$ECHO" >&6; }
7500else
7501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7502$as_echo "no" >&6; }
7503fi
7504
7505
7506  test -n "$ECHO" && break
7507done
7508
7509    else
7510      # If it succeeded, then it was overridden by the user. We will use it
7511      # for the tool.
7512
7513      # First remove it from the list of overridden variables, so we can test
7514      # for unknown variables in the end.
7515      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7516
7517      # Check if we try to supply an empty value
7518      if test "x$ECHO" = x; then
7519        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7520$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7521        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7522$as_echo_n "checking for ECHO... " >&6; }
7523        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7524$as_echo "disabled" >&6; }
7525      else
7526        # Check if the provided tool contains a complete path.
7527        tool_specified="$ECHO"
7528        tool_basename="${tool_specified##*/}"
7529        if test "x$tool_basename" = "x$tool_specified"; then
7530          # A command without a complete path is provided, search $PATH.
7531          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7532$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7533          # Extract the first word of "$tool_basename", so it can be a program name with args.
7534set dummy $tool_basename; ac_word=$2
7535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7536$as_echo_n "checking for $ac_word... " >&6; }
7537if ${ac_cv_path_ECHO+:} false; then :
7538  $as_echo_n "(cached) " >&6
7539else
7540  case $ECHO in
7541  [\\/]* | ?:[\\/]*)
7542  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7543  ;;
7544  *)
7545  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7546for as_dir in $PATH
7547do
7548  IFS=$as_save_IFS
7549  test -z "$as_dir" && as_dir=.
7550    for ac_exec_ext in '' $ac_executable_extensions; do
7551  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7552    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7553    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7554    break 2
7555  fi
7556done
7557  done
7558IFS=$as_save_IFS
7559
7560  ;;
7561esac
7562fi
7563ECHO=$ac_cv_path_ECHO
7564if test -n "$ECHO"; then
7565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7566$as_echo "$ECHO" >&6; }
7567else
7568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7569$as_echo "no" >&6; }
7570fi
7571
7572
7573          if test "x$ECHO" = x; then
7574            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7575          fi
7576        else
7577          # Otherwise we believe it is a complete path. Use it as it is.
7578          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7579$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7580          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7581$as_echo_n "checking for ECHO... " >&6; }
7582          if test ! -x "$tool_specified"; then
7583            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7584$as_echo "not found" >&6; }
7585            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7586          fi
7587          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7588$as_echo "$tool_specified" >&6; }
7589        fi
7590      fi
7591    fi
7592
7593  fi
7594
7595
7596
7597  if test "x$ECHO" = x; then
7598    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7599  fi
7600
7601
7602
7603
7604
7605  # Publish this variable in the help.
7606
7607
7608  if [ -z "${EXPR+x}" ]; then
7609    # The variable is not set by user, try to locate tool using the code snippet
7610    for ac_prog in expr
7611do
7612  # Extract the first word of "$ac_prog", so it can be a program name with args.
7613set dummy $ac_prog; ac_word=$2
7614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7615$as_echo_n "checking for $ac_word... " >&6; }
7616if ${ac_cv_path_EXPR+:} false; then :
7617  $as_echo_n "(cached) " >&6
7618else
7619  case $EXPR in
7620  [\\/]* | ?:[\\/]*)
7621  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7622  ;;
7623  *)
7624  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7625for as_dir in $PATH
7626do
7627  IFS=$as_save_IFS
7628  test -z "$as_dir" && as_dir=.
7629    for ac_exec_ext in '' $ac_executable_extensions; do
7630  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7631    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7632    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7633    break 2
7634  fi
7635done
7636  done
7637IFS=$as_save_IFS
7638
7639  ;;
7640esac
7641fi
7642EXPR=$ac_cv_path_EXPR
7643if test -n "$EXPR"; then
7644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7645$as_echo "$EXPR" >&6; }
7646else
7647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7648$as_echo "no" >&6; }
7649fi
7650
7651
7652  test -n "$EXPR" && break
7653done
7654
7655  else
7656    # The variable is set, but is it from the command line or the environment?
7657
7658    # Try to remove the string !EXPR! from our list.
7659    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7660    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7661      # If it failed, the variable was not from the command line. Ignore it,
7662      # but warn the user (except for BASH, which is always set by the calling BASH).
7663      if test "xEXPR" != xBASH; then
7664        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7665$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7666      fi
7667      # Try to locate tool using the code snippet
7668      for ac_prog in expr
7669do
7670  # Extract the first word of "$ac_prog", so it can be a program name with args.
7671set dummy $ac_prog; ac_word=$2
7672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7673$as_echo_n "checking for $ac_word... " >&6; }
7674if ${ac_cv_path_EXPR+:} false; then :
7675  $as_echo_n "(cached) " >&6
7676else
7677  case $EXPR in
7678  [\\/]* | ?:[\\/]*)
7679  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7680  ;;
7681  *)
7682  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7683for as_dir in $PATH
7684do
7685  IFS=$as_save_IFS
7686  test -z "$as_dir" && as_dir=.
7687    for ac_exec_ext in '' $ac_executable_extensions; do
7688  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7689    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7690    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7691    break 2
7692  fi
7693done
7694  done
7695IFS=$as_save_IFS
7696
7697  ;;
7698esac
7699fi
7700EXPR=$ac_cv_path_EXPR
7701if test -n "$EXPR"; then
7702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7703$as_echo "$EXPR" >&6; }
7704else
7705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7706$as_echo "no" >&6; }
7707fi
7708
7709
7710  test -n "$EXPR" && break
7711done
7712
7713    else
7714      # If it succeeded, then it was overridden by the user. We will use it
7715      # for the tool.
7716
7717      # First remove it from the list of overridden variables, so we can test
7718      # for unknown variables in the end.
7719      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7720
7721      # Check if we try to supply an empty value
7722      if test "x$EXPR" = x; then
7723        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7724$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7725        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7726$as_echo_n "checking for EXPR... " >&6; }
7727        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7728$as_echo "disabled" >&6; }
7729      else
7730        # Check if the provided tool contains a complete path.
7731        tool_specified="$EXPR"
7732        tool_basename="${tool_specified##*/}"
7733        if test "x$tool_basename" = "x$tool_specified"; then
7734          # A command without a complete path is provided, search $PATH.
7735          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7736$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7737          # Extract the first word of "$tool_basename", so it can be a program name with args.
7738set dummy $tool_basename; ac_word=$2
7739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7740$as_echo_n "checking for $ac_word... " >&6; }
7741if ${ac_cv_path_EXPR+:} false; then :
7742  $as_echo_n "(cached) " >&6
7743else
7744  case $EXPR in
7745  [\\/]* | ?:[\\/]*)
7746  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7747  ;;
7748  *)
7749  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7750for as_dir in $PATH
7751do
7752  IFS=$as_save_IFS
7753  test -z "$as_dir" && as_dir=.
7754    for ac_exec_ext in '' $ac_executable_extensions; do
7755  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7756    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7757    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7758    break 2
7759  fi
7760done
7761  done
7762IFS=$as_save_IFS
7763
7764  ;;
7765esac
7766fi
7767EXPR=$ac_cv_path_EXPR
7768if test -n "$EXPR"; then
7769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7770$as_echo "$EXPR" >&6; }
7771else
7772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7773$as_echo "no" >&6; }
7774fi
7775
7776
7777          if test "x$EXPR" = x; then
7778            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7779          fi
7780        else
7781          # Otherwise we believe it is a complete path. Use it as it is.
7782          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7783$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7784          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7785$as_echo_n "checking for EXPR... " >&6; }
7786          if test ! -x "$tool_specified"; then
7787            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7788$as_echo "not found" >&6; }
7789            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7790          fi
7791          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7792$as_echo "$tool_specified" >&6; }
7793        fi
7794      fi
7795    fi
7796
7797  fi
7798
7799
7800
7801  if test "x$EXPR" = x; then
7802    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7803  fi
7804
7805
7806
7807
7808
7809  # Publish this variable in the help.
7810
7811
7812  if [ -z "${FILE+x}" ]; then
7813    # The variable is not set by user, try to locate tool using the code snippet
7814    for ac_prog in file
7815do
7816  # Extract the first word of "$ac_prog", so it can be a program name with args.
7817set dummy $ac_prog; ac_word=$2
7818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7819$as_echo_n "checking for $ac_word... " >&6; }
7820if ${ac_cv_path_FILE+:} false; then :
7821  $as_echo_n "(cached) " >&6
7822else
7823  case $FILE in
7824  [\\/]* | ?:[\\/]*)
7825  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7826  ;;
7827  *)
7828  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7829for as_dir in $PATH
7830do
7831  IFS=$as_save_IFS
7832  test -z "$as_dir" && as_dir=.
7833    for ac_exec_ext in '' $ac_executable_extensions; do
7834  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7835    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7836    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7837    break 2
7838  fi
7839done
7840  done
7841IFS=$as_save_IFS
7842
7843  ;;
7844esac
7845fi
7846FILE=$ac_cv_path_FILE
7847if test -n "$FILE"; then
7848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7849$as_echo "$FILE" >&6; }
7850else
7851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7852$as_echo "no" >&6; }
7853fi
7854
7855
7856  test -n "$FILE" && break
7857done
7858
7859  else
7860    # The variable is set, but is it from the command line or the environment?
7861
7862    # Try to remove the string !FILE! from our list.
7863    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7864    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7865      # If it failed, the variable was not from the command line. Ignore it,
7866      # but warn the user (except for BASH, which is always set by the calling BASH).
7867      if test "xFILE" != xBASH; then
7868        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7869$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7870      fi
7871      # Try to locate tool using the code snippet
7872      for ac_prog in file
7873do
7874  # Extract the first word of "$ac_prog", so it can be a program name with args.
7875set dummy $ac_prog; ac_word=$2
7876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7877$as_echo_n "checking for $ac_word... " >&6; }
7878if ${ac_cv_path_FILE+:} false; then :
7879  $as_echo_n "(cached) " >&6
7880else
7881  case $FILE in
7882  [\\/]* | ?:[\\/]*)
7883  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7884  ;;
7885  *)
7886  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7887for as_dir in $PATH
7888do
7889  IFS=$as_save_IFS
7890  test -z "$as_dir" && as_dir=.
7891    for ac_exec_ext in '' $ac_executable_extensions; do
7892  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7893    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7894    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7895    break 2
7896  fi
7897done
7898  done
7899IFS=$as_save_IFS
7900
7901  ;;
7902esac
7903fi
7904FILE=$ac_cv_path_FILE
7905if test -n "$FILE"; then
7906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7907$as_echo "$FILE" >&6; }
7908else
7909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7910$as_echo "no" >&6; }
7911fi
7912
7913
7914  test -n "$FILE" && break
7915done
7916
7917    else
7918      # If it succeeded, then it was overridden by the user. We will use it
7919      # for the tool.
7920
7921      # First remove it from the list of overridden variables, so we can test
7922      # for unknown variables in the end.
7923      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7924
7925      # Check if we try to supply an empty value
7926      if test "x$FILE" = x; then
7927        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7928$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7929        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7930$as_echo_n "checking for FILE... " >&6; }
7931        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7932$as_echo "disabled" >&6; }
7933      else
7934        # Check if the provided tool contains a complete path.
7935        tool_specified="$FILE"
7936        tool_basename="${tool_specified##*/}"
7937        if test "x$tool_basename" = "x$tool_specified"; then
7938          # A command without a complete path is provided, search $PATH.
7939          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7940$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7941          # Extract the first word of "$tool_basename", so it can be a program name with args.
7942set dummy $tool_basename; ac_word=$2
7943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7944$as_echo_n "checking for $ac_word... " >&6; }
7945if ${ac_cv_path_FILE+:} false; then :
7946  $as_echo_n "(cached) " >&6
7947else
7948  case $FILE in
7949  [\\/]* | ?:[\\/]*)
7950  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7951  ;;
7952  *)
7953  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7954for as_dir in $PATH
7955do
7956  IFS=$as_save_IFS
7957  test -z "$as_dir" && as_dir=.
7958    for ac_exec_ext in '' $ac_executable_extensions; do
7959  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7960    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7961    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7962    break 2
7963  fi
7964done
7965  done
7966IFS=$as_save_IFS
7967
7968  ;;
7969esac
7970fi
7971FILE=$ac_cv_path_FILE
7972if test -n "$FILE"; then
7973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7974$as_echo "$FILE" >&6; }
7975else
7976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7977$as_echo "no" >&6; }
7978fi
7979
7980
7981          if test "x$FILE" = x; then
7982            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7983          fi
7984        else
7985          # Otherwise we believe it is a complete path. Use it as it is.
7986          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7987$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7988          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7989$as_echo_n "checking for FILE... " >&6; }
7990          if test ! -x "$tool_specified"; then
7991            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7992$as_echo "not found" >&6; }
7993            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7994          fi
7995          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7996$as_echo "$tool_specified" >&6; }
7997        fi
7998      fi
7999    fi
8000
8001  fi
8002
8003
8004
8005  if test "x$FILE" = x; then
8006    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
8007  fi
8008
8009
8010
8011
8012
8013  # Publish this variable in the help.
8014
8015
8016  if [ -z "${FIND+x}" ]; then
8017    # The variable is not set by user, try to locate tool using the code snippet
8018    for ac_prog in find
8019do
8020  # Extract the first word of "$ac_prog", so it can be a program name with args.
8021set dummy $ac_prog; ac_word=$2
8022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8023$as_echo_n "checking for $ac_word... " >&6; }
8024if ${ac_cv_path_FIND+:} false; then :
8025  $as_echo_n "(cached) " >&6
8026else
8027  case $FIND in
8028  [\\/]* | ?:[\\/]*)
8029  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8030  ;;
8031  *)
8032  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8033for as_dir in $PATH
8034do
8035  IFS=$as_save_IFS
8036  test -z "$as_dir" && as_dir=.
8037    for ac_exec_ext in '' $ac_executable_extensions; do
8038  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8039    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8040    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8041    break 2
8042  fi
8043done
8044  done
8045IFS=$as_save_IFS
8046
8047  ;;
8048esac
8049fi
8050FIND=$ac_cv_path_FIND
8051if test -n "$FIND"; then
8052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8053$as_echo "$FIND" >&6; }
8054else
8055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8056$as_echo "no" >&6; }
8057fi
8058
8059
8060  test -n "$FIND" && break
8061done
8062
8063  else
8064    # The variable is set, but is it from the command line or the environment?
8065
8066    # Try to remove the string !FIND! from our list.
8067    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8068    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8069      # If it failed, the variable was not from the command line. Ignore it,
8070      # but warn the user (except for BASH, which is always set by the calling BASH).
8071      if test "xFIND" != xBASH; then
8072        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8073$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8074      fi
8075      # Try to locate tool using the code snippet
8076      for ac_prog in find
8077do
8078  # Extract the first word of "$ac_prog", so it can be a program name with args.
8079set dummy $ac_prog; ac_word=$2
8080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8081$as_echo_n "checking for $ac_word... " >&6; }
8082if ${ac_cv_path_FIND+:} false; then :
8083  $as_echo_n "(cached) " >&6
8084else
8085  case $FIND in
8086  [\\/]* | ?:[\\/]*)
8087  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8088  ;;
8089  *)
8090  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8091for as_dir in $PATH
8092do
8093  IFS=$as_save_IFS
8094  test -z "$as_dir" && as_dir=.
8095    for ac_exec_ext in '' $ac_executable_extensions; do
8096  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8097    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8098    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8099    break 2
8100  fi
8101done
8102  done
8103IFS=$as_save_IFS
8104
8105  ;;
8106esac
8107fi
8108FIND=$ac_cv_path_FIND
8109if test -n "$FIND"; then
8110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8111$as_echo "$FIND" >&6; }
8112else
8113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8114$as_echo "no" >&6; }
8115fi
8116
8117
8118  test -n "$FIND" && break
8119done
8120
8121    else
8122      # If it succeeded, then it was overridden by the user. We will use it
8123      # for the tool.
8124
8125      # First remove it from the list of overridden variables, so we can test
8126      # for unknown variables in the end.
8127      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8128
8129      # Check if we try to supply an empty value
8130      if test "x$FIND" = x; then
8131        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8132$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8133        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8134$as_echo_n "checking for FIND... " >&6; }
8135        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8136$as_echo "disabled" >&6; }
8137      else
8138        # Check if the provided tool contains a complete path.
8139        tool_specified="$FIND"
8140        tool_basename="${tool_specified##*/}"
8141        if test "x$tool_basename" = "x$tool_specified"; then
8142          # A command without a complete path is provided, search $PATH.
8143          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8144$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8145          # Extract the first word of "$tool_basename", so it can be a program name with args.
8146set dummy $tool_basename; ac_word=$2
8147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8148$as_echo_n "checking for $ac_word... " >&6; }
8149if ${ac_cv_path_FIND+:} false; then :
8150  $as_echo_n "(cached) " >&6
8151else
8152  case $FIND in
8153  [\\/]* | ?:[\\/]*)
8154  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8155  ;;
8156  *)
8157  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8158for as_dir in $PATH
8159do
8160  IFS=$as_save_IFS
8161  test -z "$as_dir" && as_dir=.
8162    for ac_exec_ext in '' $ac_executable_extensions; do
8163  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8164    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8165    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8166    break 2
8167  fi
8168done
8169  done
8170IFS=$as_save_IFS
8171
8172  ;;
8173esac
8174fi
8175FIND=$ac_cv_path_FIND
8176if test -n "$FIND"; then
8177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8178$as_echo "$FIND" >&6; }
8179else
8180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8181$as_echo "no" >&6; }
8182fi
8183
8184
8185          if test "x$FIND" = x; then
8186            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8187          fi
8188        else
8189          # Otherwise we believe it is a complete path. Use it as it is.
8190          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8191$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8192          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8193$as_echo_n "checking for FIND... " >&6; }
8194          if test ! -x "$tool_specified"; then
8195            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8196$as_echo "not found" >&6; }
8197            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8198          fi
8199          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8200$as_echo "$tool_specified" >&6; }
8201        fi
8202      fi
8203    fi
8204
8205  fi
8206
8207
8208
8209  if test "x$FIND" = x; then
8210    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8211  fi
8212
8213
8214
8215
8216
8217  # Publish this variable in the help.
8218
8219
8220  if [ -z "${HEAD+x}" ]; then
8221    # The variable is not set by user, try to locate tool using the code snippet
8222    for ac_prog in head
8223do
8224  # Extract the first word of "$ac_prog", so it can be a program name with args.
8225set dummy $ac_prog; ac_word=$2
8226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8227$as_echo_n "checking for $ac_word... " >&6; }
8228if ${ac_cv_path_HEAD+:} false; then :
8229  $as_echo_n "(cached) " >&6
8230else
8231  case $HEAD in
8232  [\\/]* | ?:[\\/]*)
8233  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8234  ;;
8235  *)
8236  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8237for as_dir in $PATH
8238do
8239  IFS=$as_save_IFS
8240  test -z "$as_dir" && as_dir=.
8241    for ac_exec_ext in '' $ac_executable_extensions; do
8242  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8243    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8244    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8245    break 2
8246  fi
8247done
8248  done
8249IFS=$as_save_IFS
8250
8251  ;;
8252esac
8253fi
8254HEAD=$ac_cv_path_HEAD
8255if test -n "$HEAD"; then
8256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8257$as_echo "$HEAD" >&6; }
8258else
8259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8260$as_echo "no" >&6; }
8261fi
8262
8263
8264  test -n "$HEAD" && break
8265done
8266
8267  else
8268    # The variable is set, but is it from the command line or the environment?
8269
8270    # Try to remove the string !HEAD! from our list.
8271    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8272    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8273      # If it failed, the variable was not from the command line. Ignore it,
8274      # but warn the user (except for BASH, which is always set by the calling BASH).
8275      if test "xHEAD" != xBASH; then
8276        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8277$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8278      fi
8279      # Try to locate tool using the code snippet
8280      for ac_prog in head
8281do
8282  # Extract the first word of "$ac_prog", so it can be a program name with args.
8283set dummy $ac_prog; ac_word=$2
8284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8285$as_echo_n "checking for $ac_word... " >&6; }
8286if ${ac_cv_path_HEAD+:} false; then :
8287  $as_echo_n "(cached) " >&6
8288else
8289  case $HEAD in
8290  [\\/]* | ?:[\\/]*)
8291  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8292  ;;
8293  *)
8294  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8295for as_dir in $PATH
8296do
8297  IFS=$as_save_IFS
8298  test -z "$as_dir" && as_dir=.
8299    for ac_exec_ext in '' $ac_executable_extensions; do
8300  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8301    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8302    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8303    break 2
8304  fi
8305done
8306  done
8307IFS=$as_save_IFS
8308
8309  ;;
8310esac
8311fi
8312HEAD=$ac_cv_path_HEAD
8313if test -n "$HEAD"; then
8314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8315$as_echo "$HEAD" >&6; }
8316else
8317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8318$as_echo "no" >&6; }
8319fi
8320
8321
8322  test -n "$HEAD" && break
8323done
8324
8325    else
8326      # If it succeeded, then it was overridden by the user. We will use it
8327      # for the tool.
8328
8329      # First remove it from the list of overridden variables, so we can test
8330      # for unknown variables in the end.
8331      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8332
8333      # Check if we try to supply an empty value
8334      if test "x$HEAD" = x; then
8335        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8336$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8337        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8338$as_echo_n "checking for HEAD... " >&6; }
8339        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8340$as_echo "disabled" >&6; }
8341      else
8342        # Check if the provided tool contains a complete path.
8343        tool_specified="$HEAD"
8344        tool_basename="${tool_specified##*/}"
8345        if test "x$tool_basename" = "x$tool_specified"; then
8346          # A command without a complete path is provided, search $PATH.
8347          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8348$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8349          # Extract the first word of "$tool_basename", so it can be a program name with args.
8350set dummy $tool_basename; ac_word=$2
8351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8352$as_echo_n "checking for $ac_word... " >&6; }
8353if ${ac_cv_path_HEAD+:} false; then :
8354  $as_echo_n "(cached) " >&6
8355else
8356  case $HEAD in
8357  [\\/]* | ?:[\\/]*)
8358  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8359  ;;
8360  *)
8361  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8362for as_dir in $PATH
8363do
8364  IFS=$as_save_IFS
8365  test -z "$as_dir" && as_dir=.
8366    for ac_exec_ext in '' $ac_executable_extensions; do
8367  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8368    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8369    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8370    break 2
8371  fi
8372done
8373  done
8374IFS=$as_save_IFS
8375
8376  ;;
8377esac
8378fi
8379HEAD=$ac_cv_path_HEAD
8380if test -n "$HEAD"; then
8381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8382$as_echo "$HEAD" >&6; }
8383else
8384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8385$as_echo "no" >&6; }
8386fi
8387
8388
8389          if test "x$HEAD" = x; then
8390            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8391          fi
8392        else
8393          # Otherwise we believe it is a complete path. Use it as it is.
8394          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8395$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8396          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8397$as_echo_n "checking for HEAD... " >&6; }
8398          if test ! -x "$tool_specified"; then
8399            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8400$as_echo "not found" >&6; }
8401            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8402          fi
8403          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8404$as_echo "$tool_specified" >&6; }
8405        fi
8406      fi
8407    fi
8408
8409  fi
8410
8411
8412
8413  if test "x$HEAD" = x; then
8414    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8415  fi
8416
8417
8418
8419
8420
8421  # Publish this variable in the help.
8422
8423
8424  if [ -z "${GUNZIP+x}" ]; then
8425    # The variable is not set by user, try to locate tool using the code snippet
8426    for ac_prog in gunzip
8427do
8428  # Extract the first word of "$ac_prog", so it can be a program name with args.
8429set dummy $ac_prog; ac_word=$2
8430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8431$as_echo_n "checking for $ac_word... " >&6; }
8432if ${ac_cv_path_GUNZIP+:} false; then :
8433  $as_echo_n "(cached) " >&6
8434else
8435  case $GUNZIP in
8436  [\\/]* | ?:[\\/]*)
8437  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8438  ;;
8439  *)
8440  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8441for as_dir in $PATH
8442do
8443  IFS=$as_save_IFS
8444  test -z "$as_dir" && as_dir=.
8445    for ac_exec_ext in '' $ac_executable_extensions; do
8446  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8447    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8448    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8449    break 2
8450  fi
8451done
8452  done
8453IFS=$as_save_IFS
8454
8455  ;;
8456esac
8457fi
8458GUNZIP=$ac_cv_path_GUNZIP
8459if test -n "$GUNZIP"; then
8460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8461$as_echo "$GUNZIP" >&6; }
8462else
8463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8464$as_echo "no" >&6; }
8465fi
8466
8467
8468  test -n "$GUNZIP" && break
8469done
8470
8471  else
8472    # The variable is set, but is it from the command line or the environment?
8473
8474    # Try to remove the string !GUNZIP! from our list.
8475    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GUNZIP!/}
8476    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8477      # If it failed, the variable was not from the command line. Ignore it,
8478      # but warn the user (except for BASH, which is always set by the calling BASH).
8479      if test "xGUNZIP" != xBASH; then
8480        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&5
8481$as_echo "$as_me: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&2;}
8482      fi
8483      # Try to locate tool using the code snippet
8484      for ac_prog in gunzip
8485do
8486  # Extract the first word of "$ac_prog", so it can be a program name with args.
8487set dummy $ac_prog; ac_word=$2
8488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8489$as_echo_n "checking for $ac_word... " >&6; }
8490if ${ac_cv_path_GUNZIP+:} false; then :
8491  $as_echo_n "(cached) " >&6
8492else
8493  case $GUNZIP in
8494  [\\/]* | ?:[\\/]*)
8495  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8496  ;;
8497  *)
8498  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8499for as_dir in $PATH
8500do
8501  IFS=$as_save_IFS
8502  test -z "$as_dir" && as_dir=.
8503    for ac_exec_ext in '' $ac_executable_extensions; do
8504  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8505    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8506    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8507    break 2
8508  fi
8509done
8510  done
8511IFS=$as_save_IFS
8512
8513  ;;
8514esac
8515fi
8516GUNZIP=$ac_cv_path_GUNZIP
8517if test -n "$GUNZIP"; then
8518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8519$as_echo "$GUNZIP" >&6; }
8520else
8521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8522$as_echo "no" >&6; }
8523fi
8524
8525
8526  test -n "$GUNZIP" && break
8527done
8528
8529    else
8530      # If it succeeded, then it was overridden by the user. We will use it
8531      # for the tool.
8532
8533      # First remove it from the list of overridden variables, so we can test
8534      # for unknown variables in the end.
8535      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8536
8537      # Check if we try to supply an empty value
8538      if test "x$GUNZIP" = x; then
8539        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GUNZIP= (no value)" >&5
8540$as_echo "$as_me: Setting user supplied tool GUNZIP= (no value)" >&6;}
8541        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8542$as_echo_n "checking for GUNZIP... " >&6; }
8543        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8544$as_echo "disabled" >&6; }
8545      else
8546        # Check if the provided tool contains a complete path.
8547        tool_specified="$GUNZIP"
8548        tool_basename="${tool_specified##*/}"
8549        if test "x$tool_basename" = "x$tool_specified"; then
8550          # A command without a complete path is provided, search $PATH.
8551          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GUNZIP=$tool_basename" >&5
8552$as_echo "$as_me: Will search for user supplied tool GUNZIP=$tool_basename" >&6;}
8553          # Extract the first word of "$tool_basename", so it can be a program name with args.
8554set dummy $tool_basename; ac_word=$2
8555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8556$as_echo_n "checking for $ac_word... " >&6; }
8557if ${ac_cv_path_GUNZIP+:} false; then :
8558  $as_echo_n "(cached) " >&6
8559else
8560  case $GUNZIP in
8561  [\\/]* | ?:[\\/]*)
8562  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8563  ;;
8564  *)
8565  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8566for as_dir in $PATH
8567do
8568  IFS=$as_save_IFS
8569  test -z "$as_dir" && as_dir=.
8570    for ac_exec_ext in '' $ac_executable_extensions; do
8571  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8572    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8573    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8574    break 2
8575  fi
8576done
8577  done
8578IFS=$as_save_IFS
8579
8580  ;;
8581esac
8582fi
8583GUNZIP=$ac_cv_path_GUNZIP
8584if test -n "$GUNZIP"; then
8585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8586$as_echo "$GUNZIP" >&6; }
8587else
8588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8589$as_echo "no" >&6; }
8590fi
8591
8592
8593          if test "x$GUNZIP" = x; then
8594            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8595          fi
8596        else
8597          # Otherwise we believe it is a complete path. Use it as it is.
8598          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GUNZIP=$tool_specified" >&5
8599$as_echo "$as_me: Will use user supplied tool GUNZIP=$tool_specified" >&6;}
8600          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8601$as_echo_n "checking for GUNZIP... " >&6; }
8602          if test ! -x "$tool_specified"; then
8603            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8604$as_echo "not found" >&6; }
8605            as_fn_error $? "User supplied tool GUNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8606          fi
8607          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8608$as_echo "$tool_specified" >&6; }
8609        fi
8610      fi
8611    fi
8612
8613  fi
8614
8615
8616
8617  if test "x$GUNZIP" = x; then
8618    as_fn_error $? "Could not find required tool for GUNZIP" "$LINENO" 5
8619  fi
8620
8621
8622
8623
8624
8625  # Publish this variable in the help.
8626
8627
8628  if [ -z "${GZIP+x}" ]; then
8629    # The variable is not set by user, try to locate tool using the code snippet
8630    for ac_prog in pigz gzip
8631do
8632  # Extract the first word of "$ac_prog", so it can be a program name with args.
8633set dummy $ac_prog; ac_word=$2
8634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8635$as_echo_n "checking for $ac_word... " >&6; }
8636if ${ac_cv_path_GZIP+:} false; then :
8637  $as_echo_n "(cached) " >&6
8638else
8639  case $GZIP in
8640  [\\/]* | ?:[\\/]*)
8641  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8642  ;;
8643  *)
8644  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8645for as_dir in $PATH
8646do
8647  IFS=$as_save_IFS
8648  test -z "$as_dir" && as_dir=.
8649    for ac_exec_ext in '' $ac_executable_extensions; do
8650  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8651    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8652    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8653    break 2
8654  fi
8655done
8656  done
8657IFS=$as_save_IFS
8658
8659  ;;
8660esac
8661fi
8662GZIP=$ac_cv_path_GZIP
8663if test -n "$GZIP"; then
8664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8665$as_echo "$GZIP" >&6; }
8666else
8667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8668$as_echo "no" >&6; }
8669fi
8670
8671
8672  test -n "$GZIP" && break
8673done
8674
8675  else
8676    # The variable is set, but is it from the command line or the environment?
8677
8678    # Try to remove the string !GZIP! from our list.
8679    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GZIP!/}
8680    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8681      # If it failed, the variable was not from the command line. Ignore it,
8682      # but warn the user (except for BASH, which is always set by the calling BASH).
8683      if test "xGZIP" != xBASH; then
8684        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&5
8685$as_echo "$as_me: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&2;}
8686      fi
8687      # Try to locate tool using the code snippet
8688      for ac_prog in pigz gzip
8689do
8690  # Extract the first word of "$ac_prog", so it can be a program name with args.
8691set dummy $ac_prog; ac_word=$2
8692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8693$as_echo_n "checking for $ac_word... " >&6; }
8694if ${ac_cv_path_GZIP+:} false; then :
8695  $as_echo_n "(cached) " >&6
8696else
8697  case $GZIP in
8698  [\\/]* | ?:[\\/]*)
8699  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8700  ;;
8701  *)
8702  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8703for as_dir in $PATH
8704do
8705  IFS=$as_save_IFS
8706  test -z "$as_dir" && as_dir=.
8707    for ac_exec_ext in '' $ac_executable_extensions; do
8708  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8709    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8710    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8711    break 2
8712  fi
8713done
8714  done
8715IFS=$as_save_IFS
8716
8717  ;;
8718esac
8719fi
8720GZIP=$ac_cv_path_GZIP
8721if test -n "$GZIP"; then
8722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8723$as_echo "$GZIP" >&6; }
8724else
8725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8726$as_echo "no" >&6; }
8727fi
8728
8729
8730  test -n "$GZIP" && break
8731done
8732
8733    else
8734      # If it succeeded, then it was overridden by the user. We will use it
8735      # for the tool.
8736
8737      # First remove it from the list of overridden variables, so we can test
8738      # for unknown variables in the end.
8739      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8740
8741      # Check if we try to supply an empty value
8742      if test "x$GZIP" = x; then
8743        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GZIP= (no value)" >&5
8744$as_echo "$as_me: Setting user supplied tool GZIP= (no value)" >&6;}
8745        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8746$as_echo_n "checking for GZIP... " >&6; }
8747        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8748$as_echo "disabled" >&6; }
8749      else
8750        # Check if the provided tool contains a complete path.
8751        tool_specified="$GZIP"
8752        tool_basename="${tool_specified##*/}"
8753        if test "x$tool_basename" = "x$tool_specified"; then
8754          # A command without a complete path is provided, search $PATH.
8755          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GZIP=$tool_basename" >&5
8756$as_echo "$as_me: Will search for user supplied tool GZIP=$tool_basename" >&6;}
8757          # Extract the first word of "$tool_basename", so it can be a program name with args.
8758set dummy $tool_basename; ac_word=$2
8759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8760$as_echo_n "checking for $ac_word... " >&6; }
8761if ${ac_cv_path_GZIP+:} false; then :
8762  $as_echo_n "(cached) " >&6
8763else
8764  case $GZIP in
8765  [\\/]* | ?:[\\/]*)
8766  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8767  ;;
8768  *)
8769  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8770for as_dir in $PATH
8771do
8772  IFS=$as_save_IFS
8773  test -z "$as_dir" && as_dir=.
8774    for ac_exec_ext in '' $ac_executable_extensions; do
8775  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8776    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8777    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8778    break 2
8779  fi
8780done
8781  done
8782IFS=$as_save_IFS
8783
8784  ;;
8785esac
8786fi
8787GZIP=$ac_cv_path_GZIP
8788if test -n "$GZIP"; then
8789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8790$as_echo "$GZIP" >&6; }
8791else
8792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8793$as_echo "no" >&6; }
8794fi
8795
8796
8797          if test "x$GZIP" = x; then
8798            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8799          fi
8800        else
8801          # Otherwise we believe it is a complete path. Use it as it is.
8802          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GZIP=$tool_specified" >&5
8803$as_echo "$as_me: Will use user supplied tool GZIP=$tool_specified" >&6;}
8804          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8805$as_echo_n "checking for GZIP... " >&6; }
8806          if test ! -x "$tool_specified"; then
8807            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8808$as_echo "not found" >&6; }
8809            as_fn_error $? "User supplied tool GZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8810          fi
8811          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8812$as_echo "$tool_specified" >&6; }
8813        fi
8814      fi
8815    fi
8816
8817  fi
8818
8819
8820
8821  if test "x$GZIP" = x; then
8822    as_fn_error $? "Could not find required tool for GZIP" "$LINENO" 5
8823  fi
8824
8825
8826
8827
8828
8829  # Publish this variable in the help.
8830
8831
8832  if [ -z "${LN+x}" ]; then
8833    # The variable is not set by user, try to locate tool using the code snippet
8834    for ac_prog in ln
8835do
8836  # Extract the first word of "$ac_prog", so it can be a program name with args.
8837set dummy $ac_prog; ac_word=$2
8838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8839$as_echo_n "checking for $ac_word... " >&6; }
8840if ${ac_cv_path_LN+:} false; then :
8841  $as_echo_n "(cached) " >&6
8842else
8843  case $LN in
8844  [\\/]* | ?:[\\/]*)
8845  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8846  ;;
8847  *)
8848  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8849for as_dir in $PATH
8850do
8851  IFS=$as_save_IFS
8852  test -z "$as_dir" && as_dir=.
8853    for ac_exec_ext in '' $ac_executable_extensions; do
8854  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8855    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8856    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8857    break 2
8858  fi
8859done
8860  done
8861IFS=$as_save_IFS
8862
8863  ;;
8864esac
8865fi
8866LN=$ac_cv_path_LN
8867if test -n "$LN"; then
8868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8869$as_echo "$LN" >&6; }
8870else
8871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8872$as_echo "no" >&6; }
8873fi
8874
8875
8876  test -n "$LN" && break
8877done
8878
8879  else
8880    # The variable is set, but is it from the command line or the environment?
8881
8882    # Try to remove the string !LN! from our list.
8883    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8884    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8885      # If it failed, the variable was not from the command line. Ignore it,
8886      # but warn the user (except for BASH, which is always set by the calling BASH).
8887      if test "xLN" != xBASH; then
8888        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8889$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8890      fi
8891      # Try to locate tool using the code snippet
8892      for ac_prog in ln
8893do
8894  # Extract the first word of "$ac_prog", so it can be a program name with args.
8895set dummy $ac_prog; ac_word=$2
8896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8897$as_echo_n "checking for $ac_word... " >&6; }
8898if ${ac_cv_path_LN+:} false; then :
8899  $as_echo_n "(cached) " >&6
8900else
8901  case $LN in
8902  [\\/]* | ?:[\\/]*)
8903  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8904  ;;
8905  *)
8906  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8907for as_dir in $PATH
8908do
8909  IFS=$as_save_IFS
8910  test -z "$as_dir" && as_dir=.
8911    for ac_exec_ext in '' $ac_executable_extensions; do
8912  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8913    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8914    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8915    break 2
8916  fi
8917done
8918  done
8919IFS=$as_save_IFS
8920
8921  ;;
8922esac
8923fi
8924LN=$ac_cv_path_LN
8925if test -n "$LN"; then
8926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8927$as_echo "$LN" >&6; }
8928else
8929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8930$as_echo "no" >&6; }
8931fi
8932
8933
8934  test -n "$LN" && break
8935done
8936
8937    else
8938      # If it succeeded, then it was overridden by the user. We will use it
8939      # for the tool.
8940
8941      # First remove it from the list of overridden variables, so we can test
8942      # for unknown variables in the end.
8943      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8944
8945      # Check if we try to supply an empty value
8946      if test "x$LN" = x; then
8947        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8948$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8949        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8950$as_echo_n "checking for LN... " >&6; }
8951        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8952$as_echo "disabled" >&6; }
8953      else
8954        # Check if the provided tool contains a complete path.
8955        tool_specified="$LN"
8956        tool_basename="${tool_specified##*/}"
8957        if test "x$tool_basename" = "x$tool_specified"; then
8958          # A command without a complete path is provided, search $PATH.
8959          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8960$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8961          # Extract the first word of "$tool_basename", so it can be a program name with args.
8962set dummy $tool_basename; ac_word=$2
8963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8964$as_echo_n "checking for $ac_word... " >&6; }
8965if ${ac_cv_path_LN+:} false; then :
8966  $as_echo_n "(cached) " >&6
8967else
8968  case $LN in
8969  [\\/]* | ?:[\\/]*)
8970  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8971  ;;
8972  *)
8973  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8974for as_dir in $PATH
8975do
8976  IFS=$as_save_IFS
8977  test -z "$as_dir" && as_dir=.
8978    for ac_exec_ext in '' $ac_executable_extensions; do
8979  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8980    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8981    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8982    break 2
8983  fi
8984done
8985  done
8986IFS=$as_save_IFS
8987
8988  ;;
8989esac
8990fi
8991LN=$ac_cv_path_LN
8992if test -n "$LN"; then
8993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8994$as_echo "$LN" >&6; }
8995else
8996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8997$as_echo "no" >&6; }
8998fi
8999
9000
9001          if test "x$LN" = x; then
9002            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9003          fi
9004        else
9005          # Otherwise we believe it is a complete path. Use it as it is.
9006          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
9007$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
9008          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9009$as_echo_n "checking for LN... " >&6; }
9010          if test ! -x "$tool_specified"; then
9011            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9012$as_echo "not found" >&6; }
9013            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
9014          fi
9015          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9016$as_echo "$tool_specified" >&6; }
9017        fi
9018      fi
9019    fi
9020
9021  fi
9022
9023
9024
9025  if test "x$LN" = x; then
9026    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
9027  fi
9028
9029
9030
9031
9032
9033  # Publish this variable in the help.
9034
9035
9036  if [ -z "${LS+x}" ]; then
9037    # The variable is not set by user, try to locate tool using the code snippet
9038    for ac_prog in ls
9039do
9040  # Extract the first word of "$ac_prog", so it can be a program name with args.
9041set dummy $ac_prog; ac_word=$2
9042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9043$as_echo_n "checking for $ac_word... " >&6; }
9044if ${ac_cv_path_LS+:} false; then :
9045  $as_echo_n "(cached) " >&6
9046else
9047  case $LS in
9048  [\\/]* | ?:[\\/]*)
9049  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9050  ;;
9051  *)
9052  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9053for as_dir in $PATH
9054do
9055  IFS=$as_save_IFS
9056  test -z "$as_dir" && as_dir=.
9057    for ac_exec_ext in '' $ac_executable_extensions; do
9058  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9059    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9060    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9061    break 2
9062  fi
9063done
9064  done
9065IFS=$as_save_IFS
9066
9067  ;;
9068esac
9069fi
9070LS=$ac_cv_path_LS
9071if test -n "$LS"; then
9072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9073$as_echo "$LS" >&6; }
9074else
9075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9076$as_echo "no" >&6; }
9077fi
9078
9079
9080  test -n "$LS" && break
9081done
9082
9083  else
9084    # The variable is set, but is it from the command line or the environment?
9085
9086    # Try to remove the string !LS! from our list.
9087    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
9088    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9089      # If it failed, the variable was not from the command line. Ignore it,
9090      # but warn the user (except for BASH, which is always set by the calling BASH).
9091      if test "xLS" != xBASH; then
9092        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
9093$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
9094      fi
9095      # Try to locate tool using the code snippet
9096      for ac_prog in ls
9097do
9098  # Extract the first word of "$ac_prog", so it can be a program name with args.
9099set dummy $ac_prog; ac_word=$2
9100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9101$as_echo_n "checking for $ac_word... " >&6; }
9102if ${ac_cv_path_LS+:} false; then :
9103  $as_echo_n "(cached) " >&6
9104else
9105  case $LS in
9106  [\\/]* | ?:[\\/]*)
9107  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9108  ;;
9109  *)
9110  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9111for as_dir in $PATH
9112do
9113  IFS=$as_save_IFS
9114  test -z "$as_dir" && as_dir=.
9115    for ac_exec_ext in '' $ac_executable_extensions; do
9116  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9117    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9118    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9119    break 2
9120  fi
9121done
9122  done
9123IFS=$as_save_IFS
9124
9125  ;;
9126esac
9127fi
9128LS=$ac_cv_path_LS
9129if test -n "$LS"; then
9130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9131$as_echo "$LS" >&6; }
9132else
9133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9134$as_echo "no" >&6; }
9135fi
9136
9137
9138  test -n "$LS" && break
9139done
9140
9141    else
9142      # If it succeeded, then it was overridden by the user. We will use it
9143      # for the tool.
9144
9145      # First remove it from the list of overridden variables, so we can test
9146      # for unknown variables in the end.
9147      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9148
9149      # Check if we try to supply an empty value
9150      if test "x$LS" = x; then
9151        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
9152$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
9153        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9154$as_echo_n "checking for LS... " >&6; }
9155        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9156$as_echo "disabled" >&6; }
9157      else
9158        # Check if the provided tool contains a complete path.
9159        tool_specified="$LS"
9160        tool_basename="${tool_specified##*/}"
9161        if test "x$tool_basename" = "x$tool_specified"; then
9162          # A command without a complete path is provided, search $PATH.
9163          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
9164$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
9165          # Extract the first word of "$tool_basename", so it can be a program name with args.
9166set dummy $tool_basename; ac_word=$2
9167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9168$as_echo_n "checking for $ac_word... " >&6; }
9169if ${ac_cv_path_LS+:} false; then :
9170  $as_echo_n "(cached) " >&6
9171else
9172  case $LS in
9173  [\\/]* | ?:[\\/]*)
9174  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9175  ;;
9176  *)
9177  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9178for as_dir in $PATH
9179do
9180  IFS=$as_save_IFS
9181  test -z "$as_dir" && as_dir=.
9182    for ac_exec_ext in '' $ac_executable_extensions; do
9183  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9184    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9185    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9186    break 2
9187  fi
9188done
9189  done
9190IFS=$as_save_IFS
9191
9192  ;;
9193esac
9194fi
9195LS=$ac_cv_path_LS
9196if test -n "$LS"; then
9197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9198$as_echo "$LS" >&6; }
9199else
9200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9201$as_echo "no" >&6; }
9202fi
9203
9204
9205          if test "x$LS" = x; then
9206            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9207          fi
9208        else
9209          # Otherwise we believe it is a complete path. Use it as it is.
9210          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
9211$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
9212          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9213$as_echo_n "checking for LS... " >&6; }
9214          if test ! -x "$tool_specified"; then
9215            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9216$as_echo "not found" >&6; }
9217            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
9218          fi
9219          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9220$as_echo "$tool_specified" >&6; }
9221        fi
9222      fi
9223    fi
9224
9225  fi
9226
9227
9228
9229  if test "x$LS" = x; then
9230    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
9231  fi
9232
9233
9234
9235
9236
9237  # Publish this variable in the help.
9238
9239
9240  if [ -z "${MKDIR+x}" ]; then
9241    # The variable is not set by user, try to locate tool using the code snippet
9242    for ac_prog in mkdir
9243do
9244  # Extract the first word of "$ac_prog", so it can be a program name with args.
9245set dummy $ac_prog; ac_word=$2
9246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9247$as_echo_n "checking for $ac_word... " >&6; }
9248if ${ac_cv_path_MKDIR+:} false; then :
9249  $as_echo_n "(cached) " >&6
9250else
9251  case $MKDIR in
9252  [\\/]* | ?:[\\/]*)
9253  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9254  ;;
9255  *)
9256  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9257for as_dir in $PATH
9258do
9259  IFS=$as_save_IFS
9260  test -z "$as_dir" && as_dir=.
9261    for ac_exec_ext in '' $ac_executable_extensions; do
9262  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9263    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9264    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9265    break 2
9266  fi
9267done
9268  done
9269IFS=$as_save_IFS
9270
9271  ;;
9272esac
9273fi
9274MKDIR=$ac_cv_path_MKDIR
9275if test -n "$MKDIR"; then
9276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9277$as_echo "$MKDIR" >&6; }
9278else
9279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9280$as_echo "no" >&6; }
9281fi
9282
9283
9284  test -n "$MKDIR" && break
9285done
9286
9287  else
9288    # The variable is set, but is it from the command line or the environment?
9289
9290    # Try to remove the string !MKDIR! from our list.
9291    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
9292    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9293      # If it failed, the variable was not from the command line. Ignore it,
9294      # but warn the user (except for BASH, which is always set by the calling BASH).
9295      if test "xMKDIR" != xBASH; then
9296        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
9297$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
9298      fi
9299      # Try to locate tool using the code snippet
9300      for ac_prog in mkdir
9301do
9302  # Extract the first word of "$ac_prog", so it can be a program name with args.
9303set dummy $ac_prog; ac_word=$2
9304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9305$as_echo_n "checking for $ac_word... " >&6; }
9306if ${ac_cv_path_MKDIR+:} false; then :
9307  $as_echo_n "(cached) " >&6
9308else
9309  case $MKDIR in
9310  [\\/]* | ?:[\\/]*)
9311  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9312  ;;
9313  *)
9314  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9315for as_dir in $PATH
9316do
9317  IFS=$as_save_IFS
9318  test -z "$as_dir" && as_dir=.
9319    for ac_exec_ext in '' $ac_executable_extensions; do
9320  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9321    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9322    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9323    break 2
9324  fi
9325done
9326  done
9327IFS=$as_save_IFS
9328
9329  ;;
9330esac
9331fi
9332MKDIR=$ac_cv_path_MKDIR
9333if test -n "$MKDIR"; then
9334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9335$as_echo "$MKDIR" >&6; }
9336else
9337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9338$as_echo "no" >&6; }
9339fi
9340
9341
9342  test -n "$MKDIR" && break
9343done
9344
9345    else
9346      # If it succeeded, then it was overridden by the user. We will use it
9347      # for the tool.
9348
9349      # First remove it from the list of overridden variables, so we can test
9350      # for unknown variables in the end.
9351      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9352
9353      # Check if we try to supply an empty value
9354      if test "x$MKDIR" = x; then
9355        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
9356$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
9357        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9358$as_echo_n "checking for MKDIR... " >&6; }
9359        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9360$as_echo "disabled" >&6; }
9361      else
9362        # Check if the provided tool contains a complete path.
9363        tool_specified="$MKDIR"
9364        tool_basename="${tool_specified##*/}"
9365        if test "x$tool_basename" = "x$tool_specified"; then
9366          # A command without a complete path is provided, search $PATH.
9367          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
9368$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
9369          # Extract the first word of "$tool_basename", so it can be a program name with args.
9370set dummy $tool_basename; ac_word=$2
9371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9372$as_echo_n "checking for $ac_word... " >&6; }
9373if ${ac_cv_path_MKDIR+:} false; then :
9374  $as_echo_n "(cached) " >&6
9375else
9376  case $MKDIR in
9377  [\\/]* | ?:[\\/]*)
9378  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9379  ;;
9380  *)
9381  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9382for as_dir in $PATH
9383do
9384  IFS=$as_save_IFS
9385  test -z "$as_dir" && as_dir=.
9386    for ac_exec_ext in '' $ac_executable_extensions; do
9387  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9388    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9389    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9390    break 2
9391  fi
9392done
9393  done
9394IFS=$as_save_IFS
9395
9396  ;;
9397esac
9398fi
9399MKDIR=$ac_cv_path_MKDIR
9400if test -n "$MKDIR"; then
9401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9402$as_echo "$MKDIR" >&6; }
9403else
9404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9405$as_echo "no" >&6; }
9406fi
9407
9408
9409          if test "x$MKDIR" = x; then
9410            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9411          fi
9412        else
9413          # Otherwise we believe it is a complete path. Use it as it is.
9414          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
9415$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
9416          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9417$as_echo_n "checking for MKDIR... " >&6; }
9418          if test ! -x "$tool_specified"; then
9419            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9420$as_echo "not found" >&6; }
9421            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9422          fi
9423          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9424$as_echo "$tool_specified" >&6; }
9425        fi
9426      fi
9427    fi
9428
9429  fi
9430
9431
9432
9433  if test "x$MKDIR" = x; then
9434    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
9435  fi
9436
9437
9438
9439
9440
9441  # Publish this variable in the help.
9442
9443
9444  if [ -z "${MKTEMP+x}" ]; then
9445    # The variable is not set by user, try to locate tool using the code snippet
9446    for ac_prog in mktemp
9447do
9448  # Extract the first word of "$ac_prog", so it can be a program name with args.
9449set dummy $ac_prog; ac_word=$2
9450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9451$as_echo_n "checking for $ac_word... " >&6; }
9452if ${ac_cv_path_MKTEMP+:} false; then :
9453  $as_echo_n "(cached) " >&6
9454else
9455  case $MKTEMP in
9456  [\\/]* | ?:[\\/]*)
9457  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9458  ;;
9459  *)
9460  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9461for as_dir in $PATH
9462do
9463  IFS=$as_save_IFS
9464  test -z "$as_dir" && as_dir=.
9465    for ac_exec_ext in '' $ac_executable_extensions; do
9466  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9467    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9468    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9469    break 2
9470  fi
9471done
9472  done
9473IFS=$as_save_IFS
9474
9475  ;;
9476esac
9477fi
9478MKTEMP=$ac_cv_path_MKTEMP
9479if test -n "$MKTEMP"; then
9480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9481$as_echo "$MKTEMP" >&6; }
9482else
9483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9484$as_echo "no" >&6; }
9485fi
9486
9487
9488  test -n "$MKTEMP" && break
9489done
9490
9491  else
9492    # The variable is set, but is it from the command line or the environment?
9493
9494    # Try to remove the string !MKTEMP! from our list.
9495    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9496    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9497      # If it failed, the variable was not from the command line. Ignore it,
9498      # but warn the user (except for BASH, which is always set by the calling BASH).
9499      if test "xMKTEMP" != xBASH; then
9500        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9501$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9502      fi
9503      # Try to locate tool using the code snippet
9504      for ac_prog in mktemp
9505do
9506  # Extract the first word of "$ac_prog", so it can be a program name with args.
9507set dummy $ac_prog; ac_word=$2
9508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9509$as_echo_n "checking for $ac_word... " >&6; }
9510if ${ac_cv_path_MKTEMP+:} false; then :
9511  $as_echo_n "(cached) " >&6
9512else
9513  case $MKTEMP in
9514  [\\/]* | ?:[\\/]*)
9515  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9516  ;;
9517  *)
9518  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9519for as_dir in $PATH
9520do
9521  IFS=$as_save_IFS
9522  test -z "$as_dir" && as_dir=.
9523    for ac_exec_ext in '' $ac_executable_extensions; do
9524  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9525    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9526    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9527    break 2
9528  fi
9529done
9530  done
9531IFS=$as_save_IFS
9532
9533  ;;
9534esac
9535fi
9536MKTEMP=$ac_cv_path_MKTEMP
9537if test -n "$MKTEMP"; then
9538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9539$as_echo "$MKTEMP" >&6; }
9540else
9541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9542$as_echo "no" >&6; }
9543fi
9544
9545
9546  test -n "$MKTEMP" && break
9547done
9548
9549    else
9550      # If it succeeded, then it was overridden by the user. We will use it
9551      # for the tool.
9552
9553      # First remove it from the list of overridden variables, so we can test
9554      # for unknown variables in the end.
9555      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9556
9557      # Check if we try to supply an empty value
9558      if test "x$MKTEMP" = x; then
9559        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9560$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9561        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9562$as_echo_n "checking for MKTEMP... " >&6; }
9563        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9564$as_echo "disabled" >&6; }
9565      else
9566        # Check if the provided tool contains a complete path.
9567        tool_specified="$MKTEMP"
9568        tool_basename="${tool_specified##*/}"
9569        if test "x$tool_basename" = "x$tool_specified"; then
9570          # A command without a complete path is provided, search $PATH.
9571          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9572$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9573          # Extract the first word of "$tool_basename", so it can be a program name with args.
9574set dummy $tool_basename; ac_word=$2
9575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9576$as_echo_n "checking for $ac_word... " >&6; }
9577if ${ac_cv_path_MKTEMP+:} false; then :
9578  $as_echo_n "(cached) " >&6
9579else
9580  case $MKTEMP in
9581  [\\/]* | ?:[\\/]*)
9582  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9583  ;;
9584  *)
9585  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9586for as_dir in $PATH
9587do
9588  IFS=$as_save_IFS
9589  test -z "$as_dir" && as_dir=.
9590    for ac_exec_ext in '' $ac_executable_extensions; do
9591  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9592    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9593    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9594    break 2
9595  fi
9596done
9597  done
9598IFS=$as_save_IFS
9599
9600  ;;
9601esac
9602fi
9603MKTEMP=$ac_cv_path_MKTEMP
9604if test -n "$MKTEMP"; then
9605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9606$as_echo "$MKTEMP" >&6; }
9607else
9608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9609$as_echo "no" >&6; }
9610fi
9611
9612
9613          if test "x$MKTEMP" = x; then
9614            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9615          fi
9616        else
9617          # Otherwise we believe it is a complete path. Use it as it is.
9618          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9619$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9620          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9621$as_echo_n "checking for MKTEMP... " >&6; }
9622          if test ! -x "$tool_specified"; then
9623            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9624$as_echo "not found" >&6; }
9625            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9626          fi
9627          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9628$as_echo "$tool_specified" >&6; }
9629        fi
9630      fi
9631    fi
9632
9633  fi
9634
9635
9636
9637  if test "x$MKTEMP" = x; then
9638    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9639  fi
9640
9641
9642
9643
9644
9645  # Publish this variable in the help.
9646
9647
9648  if [ -z "${MV+x}" ]; then
9649    # The variable is not set by user, try to locate tool using the code snippet
9650    for ac_prog in mv
9651do
9652  # Extract the first word of "$ac_prog", so it can be a program name with args.
9653set dummy $ac_prog; ac_word=$2
9654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9655$as_echo_n "checking for $ac_word... " >&6; }
9656if ${ac_cv_path_MV+:} false; then :
9657  $as_echo_n "(cached) " >&6
9658else
9659  case $MV in
9660  [\\/]* | ?:[\\/]*)
9661  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9662  ;;
9663  *)
9664  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9665for as_dir in $PATH
9666do
9667  IFS=$as_save_IFS
9668  test -z "$as_dir" && as_dir=.
9669    for ac_exec_ext in '' $ac_executable_extensions; do
9670  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9671    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9672    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9673    break 2
9674  fi
9675done
9676  done
9677IFS=$as_save_IFS
9678
9679  ;;
9680esac
9681fi
9682MV=$ac_cv_path_MV
9683if test -n "$MV"; then
9684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9685$as_echo "$MV" >&6; }
9686else
9687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9688$as_echo "no" >&6; }
9689fi
9690
9691
9692  test -n "$MV" && break
9693done
9694
9695  else
9696    # The variable is set, but is it from the command line or the environment?
9697
9698    # Try to remove the string !MV! from our list.
9699    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9700    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9701      # If it failed, the variable was not from the command line. Ignore it,
9702      # but warn the user (except for BASH, which is always set by the calling BASH).
9703      if test "xMV" != xBASH; then
9704        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9705$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9706      fi
9707      # Try to locate tool using the code snippet
9708      for ac_prog in mv
9709do
9710  # Extract the first word of "$ac_prog", so it can be a program name with args.
9711set dummy $ac_prog; ac_word=$2
9712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9713$as_echo_n "checking for $ac_word... " >&6; }
9714if ${ac_cv_path_MV+:} false; then :
9715  $as_echo_n "(cached) " >&6
9716else
9717  case $MV in
9718  [\\/]* | ?:[\\/]*)
9719  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9720  ;;
9721  *)
9722  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9723for as_dir in $PATH
9724do
9725  IFS=$as_save_IFS
9726  test -z "$as_dir" && as_dir=.
9727    for ac_exec_ext in '' $ac_executable_extensions; do
9728  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9729    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9730    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9731    break 2
9732  fi
9733done
9734  done
9735IFS=$as_save_IFS
9736
9737  ;;
9738esac
9739fi
9740MV=$ac_cv_path_MV
9741if test -n "$MV"; then
9742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9743$as_echo "$MV" >&6; }
9744else
9745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9746$as_echo "no" >&6; }
9747fi
9748
9749
9750  test -n "$MV" && break
9751done
9752
9753    else
9754      # If it succeeded, then it was overridden by the user. We will use it
9755      # for the tool.
9756
9757      # First remove it from the list of overridden variables, so we can test
9758      # for unknown variables in the end.
9759      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9760
9761      # Check if we try to supply an empty value
9762      if test "x$MV" = x; then
9763        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9764$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9765        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9766$as_echo_n "checking for MV... " >&6; }
9767        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9768$as_echo "disabled" >&6; }
9769      else
9770        # Check if the provided tool contains a complete path.
9771        tool_specified="$MV"
9772        tool_basename="${tool_specified##*/}"
9773        if test "x$tool_basename" = "x$tool_specified"; then
9774          # A command without a complete path is provided, search $PATH.
9775          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9776$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9777          # Extract the first word of "$tool_basename", so it can be a program name with args.
9778set dummy $tool_basename; ac_word=$2
9779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9780$as_echo_n "checking for $ac_word... " >&6; }
9781if ${ac_cv_path_MV+:} false; then :
9782  $as_echo_n "(cached) " >&6
9783else
9784  case $MV in
9785  [\\/]* | ?:[\\/]*)
9786  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9787  ;;
9788  *)
9789  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9790for as_dir in $PATH
9791do
9792  IFS=$as_save_IFS
9793  test -z "$as_dir" && as_dir=.
9794    for ac_exec_ext in '' $ac_executable_extensions; do
9795  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9796    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9797    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9798    break 2
9799  fi
9800done
9801  done
9802IFS=$as_save_IFS
9803
9804  ;;
9805esac
9806fi
9807MV=$ac_cv_path_MV
9808if test -n "$MV"; then
9809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9810$as_echo "$MV" >&6; }
9811else
9812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9813$as_echo "no" >&6; }
9814fi
9815
9816
9817          if test "x$MV" = x; then
9818            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9819          fi
9820        else
9821          # Otherwise we believe it is a complete path. Use it as it is.
9822          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9823$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9824          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9825$as_echo_n "checking for MV... " >&6; }
9826          if test ! -x "$tool_specified"; then
9827            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9828$as_echo "not found" >&6; }
9829            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9830          fi
9831          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9832$as_echo "$tool_specified" >&6; }
9833        fi
9834      fi
9835    fi
9836
9837  fi
9838
9839
9840
9841  if test "x$MV" = x; then
9842    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9843  fi
9844
9845
9846
9847
9848
9849  # Publish this variable in the help.
9850
9851
9852  if [ -z "${NAWK+x}" ]; then
9853    # The variable is not set by user, try to locate tool using the code snippet
9854    for ac_prog in nawk gawk awk
9855do
9856  # Extract the first word of "$ac_prog", so it can be a program name with args.
9857set dummy $ac_prog; ac_word=$2
9858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9859$as_echo_n "checking for $ac_word... " >&6; }
9860if ${ac_cv_path_NAWK+:} false; then :
9861  $as_echo_n "(cached) " >&6
9862else
9863  case $NAWK in
9864  [\\/]* | ?:[\\/]*)
9865  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9866  ;;
9867  *)
9868  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9869for as_dir in $PATH
9870do
9871  IFS=$as_save_IFS
9872  test -z "$as_dir" && as_dir=.
9873    for ac_exec_ext in '' $ac_executable_extensions; do
9874  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9875    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9876    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9877    break 2
9878  fi
9879done
9880  done
9881IFS=$as_save_IFS
9882
9883  ;;
9884esac
9885fi
9886NAWK=$ac_cv_path_NAWK
9887if test -n "$NAWK"; then
9888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9889$as_echo "$NAWK" >&6; }
9890else
9891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9892$as_echo "no" >&6; }
9893fi
9894
9895
9896  test -n "$NAWK" && break
9897done
9898
9899  else
9900    # The variable is set, but is it from the command line or the environment?
9901
9902    # Try to remove the string !NAWK! from our list.
9903    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9904    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9905      # If it failed, the variable was not from the command line. Ignore it,
9906      # but warn the user (except for BASH, which is always set by the calling BASH).
9907      if test "xNAWK" != xBASH; then
9908        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9909$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9910      fi
9911      # Try to locate tool using the code snippet
9912      for ac_prog in nawk gawk awk
9913do
9914  # Extract the first word of "$ac_prog", so it can be a program name with args.
9915set dummy $ac_prog; ac_word=$2
9916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9917$as_echo_n "checking for $ac_word... " >&6; }
9918if ${ac_cv_path_NAWK+:} false; then :
9919  $as_echo_n "(cached) " >&6
9920else
9921  case $NAWK in
9922  [\\/]* | ?:[\\/]*)
9923  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9924  ;;
9925  *)
9926  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9927for as_dir in $PATH
9928do
9929  IFS=$as_save_IFS
9930  test -z "$as_dir" && as_dir=.
9931    for ac_exec_ext in '' $ac_executable_extensions; do
9932  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9933    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9934    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9935    break 2
9936  fi
9937done
9938  done
9939IFS=$as_save_IFS
9940
9941  ;;
9942esac
9943fi
9944NAWK=$ac_cv_path_NAWK
9945if test -n "$NAWK"; then
9946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9947$as_echo "$NAWK" >&6; }
9948else
9949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9950$as_echo "no" >&6; }
9951fi
9952
9953
9954  test -n "$NAWK" && break
9955done
9956
9957    else
9958      # If it succeeded, then it was overridden by the user. We will use it
9959      # for the tool.
9960
9961      # First remove it from the list of overridden variables, so we can test
9962      # for unknown variables in the end.
9963      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9964
9965      # Check if we try to supply an empty value
9966      if test "x$NAWK" = x; then
9967        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9968$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9969        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9970$as_echo_n "checking for NAWK... " >&6; }
9971        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9972$as_echo "disabled" >&6; }
9973      else
9974        # Check if the provided tool contains a complete path.
9975        tool_specified="$NAWK"
9976        tool_basename="${tool_specified##*/}"
9977        if test "x$tool_basename" = "x$tool_specified"; then
9978          # A command without a complete path is provided, search $PATH.
9979          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
9980$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
9981          # Extract the first word of "$tool_basename", so it can be a program name with args.
9982set dummy $tool_basename; ac_word=$2
9983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9984$as_echo_n "checking for $ac_word... " >&6; }
9985if ${ac_cv_path_NAWK+:} false; then :
9986  $as_echo_n "(cached) " >&6
9987else
9988  case $NAWK in
9989  [\\/]* | ?:[\\/]*)
9990  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9991  ;;
9992  *)
9993  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9994for as_dir in $PATH
9995do
9996  IFS=$as_save_IFS
9997  test -z "$as_dir" && as_dir=.
9998    for ac_exec_ext in '' $ac_executable_extensions; do
9999  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10000    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10001    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10002    break 2
10003  fi
10004done
10005  done
10006IFS=$as_save_IFS
10007
10008  ;;
10009esac
10010fi
10011NAWK=$ac_cv_path_NAWK
10012if test -n "$NAWK"; then
10013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10014$as_echo "$NAWK" >&6; }
10015else
10016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10017$as_echo "no" >&6; }
10018fi
10019
10020
10021          if test "x$NAWK" = x; then
10022            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10023          fi
10024        else
10025          # Otherwise we believe it is a complete path. Use it as it is.
10026          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
10027$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
10028          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10029$as_echo_n "checking for NAWK... " >&6; }
10030          if test ! -x "$tool_specified"; then
10031            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10032$as_echo "not found" >&6; }
10033            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
10034          fi
10035          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10036$as_echo "$tool_specified" >&6; }
10037        fi
10038      fi
10039    fi
10040
10041  fi
10042
10043
10044
10045  if test "x$NAWK" = x; then
10046    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
10047  fi
10048
10049
10050
10051
10052
10053  # Publish this variable in the help.
10054
10055
10056  if [ -z "${PRINTF+x}" ]; then
10057    # The variable is not set by user, try to locate tool using the code snippet
10058    for ac_prog in printf
10059do
10060  # Extract the first word of "$ac_prog", so it can be a program name with args.
10061set dummy $ac_prog; ac_word=$2
10062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10063$as_echo_n "checking for $ac_word... " >&6; }
10064if ${ac_cv_path_PRINTF+:} false; then :
10065  $as_echo_n "(cached) " >&6
10066else
10067  case $PRINTF in
10068  [\\/]* | ?:[\\/]*)
10069  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10070  ;;
10071  *)
10072  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10073for as_dir in $PATH
10074do
10075  IFS=$as_save_IFS
10076  test -z "$as_dir" && as_dir=.
10077    for ac_exec_ext in '' $ac_executable_extensions; do
10078  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10079    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10080    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10081    break 2
10082  fi
10083done
10084  done
10085IFS=$as_save_IFS
10086
10087  ;;
10088esac
10089fi
10090PRINTF=$ac_cv_path_PRINTF
10091if test -n "$PRINTF"; then
10092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10093$as_echo "$PRINTF" >&6; }
10094else
10095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10096$as_echo "no" >&6; }
10097fi
10098
10099
10100  test -n "$PRINTF" && break
10101done
10102
10103  else
10104    # The variable is set, but is it from the command line or the environment?
10105
10106    # Try to remove the string !PRINTF! from our list.
10107    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
10108    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10109      # If it failed, the variable was not from the command line. Ignore it,
10110      # but warn the user (except for BASH, which is always set by the calling BASH).
10111      if test "xPRINTF" != xBASH; then
10112        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
10113$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
10114      fi
10115      # Try to locate tool using the code snippet
10116      for ac_prog in printf
10117do
10118  # Extract the first word of "$ac_prog", so it can be a program name with args.
10119set dummy $ac_prog; ac_word=$2
10120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10121$as_echo_n "checking for $ac_word... " >&6; }
10122if ${ac_cv_path_PRINTF+:} false; then :
10123  $as_echo_n "(cached) " >&6
10124else
10125  case $PRINTF in
10126  [\\/]* | ?:[\\/]*)
10127  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10128  ;;
10129  *)
10130  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10131for as_dir in $PATH
10132do
10133  IFS=$as_save_IFS
10134  test -z "$as_dir" && as_dir=.
10135    for ac_exec_ext in '' $ac_executable_extensions; do
10136  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10137    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10138    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10139    break 2
10140  fi
10141done
10142  done
10143IFS=$as_save_IFS
10144
10145  ;;
10146esac
10147fi
10148PRINTF=$ac_cv_path_PRINTF
10149if test -n "$PRINTF"; then
10150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10151$as_echo "$PRINTF" >&6; }
10152else
10153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10154$as_echo "no" >&6; }
10155fi
10156
10157
10158  test -n "$PRINTF" && break
10159done
10160
10161    else
10162      # If it succeeded, then it was overridden by the user. We will use it
10163      # for the tool.
10164
10165      # First remove it from the list of overridden variables, so we can test
10166      # for unknown variables in the end.
10167      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10168
10169      # Check if we try to supply an empty value
10170      if test "x$PRINTF" = x; then
10171        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
10172$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
10173        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10174$as_echo_n "checking for PRINTF... " >&6; }
10175        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10176$as_echo "disabled" >&6; }
10177      else
10178        # Check if the provided tool contains a complete path.
10179        tool_specified="$PRINTF"
10180        tool_basename="${tool_specified##*/}"
10181        if test "x$tool_basename" = "x$tool_specified"; then
10182          # A command without a complete path is provided, search $PATH.
10183          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
10184$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
10185          # Extract the first word of "$tool_basename", so it can be a program name with args.
10186set dummy $tool_basename; ac_word=$2
10187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10188$as_echo_n "checking for $ac_word... " >&6; }
10189if ${ac_cv_path_PRINTF+:} false; then :
10190  $as_echo_n "(cached) " >&6
10191else
10192  case $PRINTF in
10193  [\\/]* | ?:[\\/]*)
10194  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10195  ;;
10196  *)
10197  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10198for as_dir in $PATH
10199do
10200  IFS=$as_save_IFS
10201  test -z "$as_dir" && as_dir=.
10202    for ac_exec_ext in '' $ac_executable_extensions; do
10203  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10204    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10205    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10206    break 2
10207  fi
10208done
10209  done
10210IFS=$as_save_IFS
10211
10212  ;;
10213esac
10214fi
10215PRINTF=$ac_cv_path_PRINTF
10216if test -n "$PRINTF"; then
10217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10218$as_echo "$PRINTF" >&6; }
10219else
10220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10221$as_echo "no" >&6; }
10222fi
10223
10224
10225          if test "x$PRINTF" = x; then
10226            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10227          fi
10228        else
10229          # Otherwise we believe it is a complete path. Use it as it is.
10230          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
10231$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
10232          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10233$as_echo_n "checking for PRINTF... " >&6; }
10234          if test ! -x "$tool_specified"; then
10235            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10236$as_echo "not found" >&6; }
10237            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
10238          fi
10239          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10240$as_echo "$tool_specified" >&6; }
10241        fi
10242      fi
10243    fi
10244
10245  fi
10246
10247
10248
10249  if test "x$PRINTF" = x; then
10250    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
10251  fi
10252
10253
10254
10255
10256
10257  # Publish this variable in the help.
10258
10259
10260  if [ -z "${RM+x}" ]; then
10261    # The variable is not set by user, try to locate tool using the code snippet
10262    for ac_prog in rm
10263do
10264  # Extract the first word of "$ac_prog", so it can be a program name with args.
10265set dummy $ac_prog; ac_word=$2
10266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10267$as_echo_n "checking for $ac_word... " >&6; }
10268if ${ac_cv_path_RM+:} false; then :
10269  $as_echo_n "(cached) " >&6
10270else
10271  case $RM in
10272  [\\/]* | ?:[\\/]*)
10273  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10274  ;;
10275  *)
10276  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10277for as_dir in $PATH
10278do
10279  IFS=$as_save_IFS
10280  test -z "$as_dir" && as_dir=.
10281    for ac_exec_ext in '' $ac_executable_extensions; do
10282  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10283    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10284    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10285    break 2
10286  fi
10287done
10288  done
10289IFS=$as_save_IFS
10290
10291  ;;
10292esac
10293fi
10294RM=$ac_cv_path_RM
10295if test -n "$RM"; then
10296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10297$as_echo "$RM" >&6; }
10298else
10299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10300$as_echo "no" >&6; }
10301fi
10302
10303
10304  test -n "$RM" && break
10305done
10306
10307  else
10308    # The variable is set, but is it from the command line or the environment?
10309
10310    # Try to remove the string !RM! from our list.
10311    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
10312    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10313      # If it failed, the variable was not from the command line. Ignore it,
10314      # but warn the user (except for BASH, which is always set by the calling BASH).
10315      if test "xRM" != xBASH; then
10316        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
10317$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
10318      fi
10319      # Try to locate tool using the code snippet
10320      for ac_prog in rm
10321do
10322  # Extract the first word of "$ac_prog", so it can be a program name with args.
10323set dummy $ac_prog; ac_word=$2
10324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10325$as_echo_n "checking for $ac_word... " >&6; }
10326if ${ac_cv_path_RM+:} false; then :
10327  $as_echo_n "(cached) " >&6
10328else
10329  case $RM in
10330  [\\/]* | ?:[\\/]*)
10331  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10332  ;;
10333  *)
10334  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10335for as_dir in $PATH
10336do
10337  IFS=$as_save_IFS
10338  test -z "$as_dir" && as_dir=.
10339    for ac_exec_ext in '' $ac_executable_extensions; do
10340  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10341    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10342    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10343    break 2
10344  fi
10345done
10346  done
10347IFS=$as_save_IFS
10348
10349  ;;
10350esac
10351fi
10352RM=$ac_cv_path_RM
10353if test -n "$RM"; then
10354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10355$as_echo "$RM" >&6; }
10356else
10357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10358$as_echo "no" >&6; }
10359fi
10360
10361
10362  test -n "$RM" && break
10363done
10364
10365    else
10366      # If it succeeded, then it was overridden by the user. We will use it
10367      # for the tool.
10368
10369      # First remove it from the list of overridden variables, so we can test
10370      # for unknown variables in the end.
10371      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10372
10373      # Check if we try to supply an empty value
10374      if test "x$RM" = x; then
10375        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
10376$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
10377        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10378$as_echo_n "checking for RM... " >&6; }
10379        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10380$as_echo "disabled" >&6; }
10381      else
10382        # Check if the provided tool contains a complete path.
10383        tool_specified="$RM"
10384        tool_basename="${tool_specified##*/}"
10385        if test "x$tool_basename" = "x$tool_specified"; then
10386          # A command without a complete path is provided, search $PATH.
10387          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
10388$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
10389          # Extract the first word of "$tool_basename", so it can be a program name with args.
10390set dummy $tool_basename; ac_word=$2
10391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10392$as_echo_n "checking for $ac_word... " >&6; }
10393if ${ac_cv_path_RM+:} false; then :
10394  $as_echo_n "(cached) " >&6
10395else
10396  case $RM in
10397  [\\/]* | ?:[\\/]*)
10398  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10399  ;;
10400  *)
10401  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10402for as_dir in $PATH
10403do
10404  IFS=$as_save_IFS
10405  test -z "$as_dir" && as_dir=.
10406    for ac_exec_ext in '' $ac_executable_extensions; do
10407  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10408    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10409    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10410    break 2
10411  fi
10412done
10413  done
10414IFS=$as_save_IFS
10415
10416  ;;
10417esac
10418fi
10419RM=$ac_cv_path_RM
10420if test -n "$RM"; then
10421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10422$as_echo "$RM" >&6; }
10423else
10424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10425$as_echo "no" >&6; }
10426fi
10427
10428
10429          if test "x$RM" = x; then
10430            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10431          fi
10432        else
10433          # Otherwise we believe it is a complete path. Use it as it is.
10434          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
10435$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
10436          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10437$as_echo_n "checking for RM... " >&6; }
10438          if test ! -x "$tool_specified"; then
10439            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10440$as_echo "not found" >&6; }
10441            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
10442          fi
10443          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10444$as_echo "$tool_specified" >&6; }
10445        fi
10446      fi
10447    fi
10448
10449  fi
10450
10451
10452
10453  if test "x$RM" = x; then
10454    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10455  fi
10456
10457
10458
10459
10460
10461  # Publish this variable in the help.
10462
10463
10464  if [ -z "${RMDIR+x}" ]; then
10465    # The variable is not set by user, try to locate tool using the code snippet
10466    for ac_prog in rmdir
10467do
10468  # Extract the first word of "$ac_prog", so it can be a program name with args.
10469set dummy $ac_prog; ac_word=$2
10470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10471$as_echo_n "checking for $ac_word... " >&6; }
10472if ${ac_cv_path_RMDIR+:} false; then :
10473  $as_echo_n "(cached) " >&6
10474else
10475  case $RMDIR in
10476  [\\/]* | ?:[\\/]*)
10477  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10478  ;;
10479  *)
10480  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10481for as_dir in $PATH
10482do
10483  IFS=$as_save_IFS
10484  test -z "$as_dir" && as_dir=.
10485    for ac_exec_ext in '' $ac_executable_extensions; do
10486  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10487    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10488    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10489    break 2
10490  fi
10491done
10492  done
10493IFS=$as_save_IFS
10494
10495  ;;
10496esac
10497fi
10498RMDIR=$ac_cv_path_RMDIR
10499if test -n "$RMDIR"; then
10500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10501$as_echo "$RMDIR" >&6; }
10502else
10503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10504$as_echo "no" >&6; }
10505fi
10506
10507
10508  test -n "$RMDIR" && break
10509done
10510
10511  else
10512    # The variable is set, but is it from the command line or the environment?
10513
10514    # Try to remove the string !RMDIR! from our list.
10515    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10516    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10517      # If it failed, the variable was not from the command line. Ignore it,
10518      # but warn the user (except for BASH, which is always set by the calling BASH).
10519      if test "xRMDIR" != xBASH; then
10520        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10521$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10522      fi
10523      # Try to locate tool using the code snippet
10524      for ac_prog in rmdir
10525do
10526  # Extract the first word of "$ac_prog", so it can be a program name with args.
10527set dummy $ac_prog; ac_word=$2
10528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10529$as_echo_n "checking for $ac_word... " >&6; }
10530if ${ac_cv_path_RMDIR+:} false; then :
10531  $as_echo_n "(cached) " >&6
10532else
10533  case $RMDIR in
10534  [\\/]* | ?:[\\/]*)
10535  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10536  ;;
10537  *)
10538  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10539for as_dir in $PATH
10540do
10541  IFS=$as_save_IFS
10542  test -z "$as_dir" && as_dir=.
10543    for ac_exec_ext in '' $ac_executable_extensions; do
10544  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10545    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10546    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10547    break 2
10548  fi
10549done
10550  done
10551IFS=$as_save_IFS
10552
10553  ;;
10554esac
10555fi
10556RMDIR=$ac_cv_path_RMDIR
10557if test -n "$RMDIR"; then
10558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10559$as_echo "$RMDIR" >&6; }
10560else
10561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10562$as_echo "no" >&6; }
10563fi
10564
10565
10566  test -n "$RMDIR" && break
10567done
10568
10569    else
10570      # If it succeeded, then it was overridden by the user. We will use it
10571      # for the tool.
10572
10573      # First remove it from the list of overridden variables, so we can test
10574      # for unknown variables in the end.
10575      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10576
10577      # Check if we try to supply an empty value
10578      if test "x$RMDIR" = x; then
10579        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10580$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10581        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10582$as_echo_n "checking for RMDIR... " >&6; }
10583        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10584$as_echo "disabled" >&6; }
10585      else
10586        # Check if the provided tool contains a complete path.
10587        tool_specified="$RMDIR"
10588        tool_basename="${tool_specified##*/}"
10589        if test "x$tool_basename" = "x$tool_specified"; then
10590          # A command without a complete path is provided, search $PATH.
10591          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10592$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10593          # Extract the first word of "$tool_basename", so it can be a program name with args.
10594set dummy $tool_basename; ac_word=$2
10595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10596$as_echo_n "checking for $ac_word... " >&6; }
10597if ${ac_cv_path_RMDIR+:} false; then :
10598  $as_echo_n "(cached) " >&6
10599else
10600  case $RMDIR in
10601  [\\/]* | ?:[\\/]*)
10602  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10603  ;;
10604  *)
10605  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10606for as_dir in $PATH
10607do
10608  IFS=$as_save_IFS
10609  test -z "$as_dir" && as_dir=.
10610    for ac_exec_ext in '' $ac_executable_extensions; do
10611  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10612    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10613    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10614    break 2
10615  fi
10616done
10617  done
10618IFS=$as_save_IFS
10619
10620  ;;
10621esac
10622fi
10623RMDIR=$ac_cv_path_RMDIR
10624if test -n "$RMDIR"; then
10625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10626$as_echo "$RMDIR" >&6; }
10627else
10628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10629$as_echo "no" >&6; }
10630fi
10631
10632
10633          if test "x$RMDIR" = x; then
10634            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10635          fi
10636        else
10637          # Otherwise we believe it is a complete path. Use it as it is.
10638          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10639$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10640          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10641$as_echo_n "checking for RMDIR... " >&6; }
10642          if test ! -x "$tool_specified"; then
10643            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10644$as_echo "not found" >&6; }
10645            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10646          fi
10647          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10648$as_echo "$tool_specified" >&6; }
10649        fi
10650      fi
10651    fi
10652
10653  fi
10654
10655
10656
10657  if test "x$RMDIR" = x; then
10658    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10659  fi
10660
10661
10662
10663
10664
10665  # Publish this variable in the help.
10666
10667
10668  if [ -z "${SH+x}" ]; then
10669    # The variable is not set by user, try to locate tool using the code snippet
10670    for ac_prog in sh
10671do
10672  # Extract the first word of "$ac_prog", so it can be a program name with args.
10673set dummy $ac_prog; ac_word=$2
10674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10675$as_echo_n "checking for $ac_word... " >&6; }
10676if ${ac_cv_path_SH+:} false; then :
10677  $as_echo_n "(cached) " >&6
10678else
10679  case $SH in
10680  [\\/]* | ?:[\\/]*)
10681  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10682  ;;
10683  *)
10684  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10685for as_dir in $PATH
10686do
10687  IFS=$as_save_IFS
10688  test -z "$as_dir" && as_dir=.
10689    for ac_exec_ext in '' $ac_executable_extensions; do
10690  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10691    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10692    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10693    break 2
10694  fi
10695done
10696  done
10697IFS=$as_save_IFS
10698
10699  ;;
10700esac
10701fi
10702SH=$ac_cv_path_SH
10703if test -n "$SH"; then
10704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10705$as_echo "$SH" >&6; }
10706else
10707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10708$as_echo "no" >&6; }
10709fi
10710
10711
10712  test -n "$SH" && break
10713done
10714
10715  else
10716    # The variable is set, but is it from the command line or the environment?
10717
10718    # Try to remove the string !SH! from our list.
10719    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10720    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10721      # If it failed, the variable was not from the command line. Ignore it,
10722      # but warn the user (except for BASH, which is always set by the calling BASH).
10723      if test "xSH" != xBASH; then
10724        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10725$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10726      fi
10727      # Try to locate tool using the code snippet
10728      for ac_prog in sh
10729do
10730  # Extract the first word of "$ac_prog", so it can be a program name with args.
10731set dummy $ac_prog; ac_word=$2
10732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10733$as_echo_n "checking for $ac_word... " >&6; }
10734if ${ac_cv_path_SH+:} false; then :
10735  $as_echo_n "(cached) " >&6
10736else
10737  case $SH in
10738  [\\/]* | ?:[\\/]*)
10739  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10740  ;;
10741  *)
10742  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10743for as_dir in $PATH
10744do
10745  IFS=$as_save_IFS
10746  test -z "$as_dir" && as_dir=.
10747    for ac_exec_ext in '' $ac_executable_extensions; do
10748  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10749    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10750    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10751    break 2
10752  fi
10753done
10754  done
10755IFS=$as_save_IFS
10756
10757  ;;
10758esac
10759fi
10760SH=$ac_cv_path_SH
10761if test -n "$SH"; then
10762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10763$as_echo "$SH" >&6; }
10764else
10765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10766$as_echo "no" >&6; }
10767fi
10768
10769
10770  test -n "$SH" && break
10771done
10772
10773    else
10774      # If it succeeded, then it was overridden by the user. We will use it
10775      # for the tool.
10776
10777      # First remove it from the list of overridden variables, so we can test
10778      # for unknown variables in the end.
10779      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10780
10781      # Check if we try to supply an empty value
10782      if test "x$SH" = x; then
10783        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10784$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10785        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10786$as_echo_n "checking for SH... " >&6; }
10787        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10788$as_echo "disabled" >&6; }
10789      else
10790        # Check if the provided tool contains a complete path.
10791        tool_specified="$SH"
10792        tool_basename="${tool_specified##*/}"
10793        if test "x$tool_basename" = "x$tool_specified"; then
10794          # A command without a complete path is provided, search $PATH.
10795          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10796$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10797          # Extract the first word of "$tool_basename", so it can be a program name with args.
10798set dummy $tool_basename; ac_word=$2
10799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10800$as_echo_n "checking for $ac_word... " >&6; }
10801if ${ac_cv_path_SH+:} false; then :
10802  $as_echo_n "(cached) " >&6
10803else
10804  case $SH in
10805  [\\/]* | ?:[\\/]*)
10806  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10807  ;;
10808  *)
10809  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10810for as_dir in $PATH
10811do
10812  IFS=$as_save_IFS
10813  test -z "$as_dir" && as_dir=.
10814    for ac_exec_ext in '' $ac_executable_extensions; do
10815  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10816    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10817    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10818    break 2
10819  fi
10820done
10821  done
10822IFS=$as_save_IFS
10823
10824  ;;
10825esac
10826fi
10827SH=$ac_cv_path_SH
10828if test -n "$SH"; then
10829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10830$as_echo "$SH" >&6; }
10831else
10832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10833$as_echo "no" >&6; }
10834fi
10835
10836
10837          if test "x$SH" = x; then
10838            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10839          fi
10840        else
10841          # Otherwise we believe it is a complete path. Use it as it is.
10842          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10843$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10844          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10845$as_echo_n "checking for SH... " >&6; }
10846          if test ! -x "$tool_specified"; then
10847            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10848$as_echo "not found" >&6; }
10849            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10850          fi
10851          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10852$as_echo "$tool_specified" >&6; }
10853        fi
10854      fi
10855    fi
10856
10857  fi
10858
10859
10860
10861  if test "x$SH" = x; then
10862    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10863  fi
10864
10865
10866
10867
10868
10869  # Publish this variable in the help.
10870
10871
10872  if [ -z "${SORT+x}" ]; then
10873    # The variable is not set by user, try to locate tool using the code snippet
10874    for ac_prog in sort
10875do
10876  # Extract the first word of "$ac_prog", so it can be a program name with args.
10877set dummy $ac_prog; ac_word=$2
10878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10879$as_echo_n "checking for $ac_word... " >&6; }
10880if ${ac_cv_path_SORT+:} false; then :
10881  $as_echo_n "(cached) " >&6
10882else
10883  case $SORT in
10884  [\\/]* | ?:[\\/]*)
10885  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10886  ;;
10887  *)
10888  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10889for as_dir in $PATH
10890do
10891  IFS=$as_save_IFS
10892  test -z "$as_dir" && as_dir=.
10893    for ac_exec_ext in '' $ac_executable_extensions; do
10894  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10895    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10896    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10897    break 2
10898  fi
10899done
10900  done
10901IFS=$as_save_IFS
10902
10903  ;;
10904esac
10905fi
10906SORT=$ac_cv_path_SORT
10907if test -n "$SORT"; then
10908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10909$as_echo "$SORT" >&6; }
10910else
10911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10912$as_echo "no" >&6; }
10913fi
10914
10915
10916  test -n "$SORT" && break
10917done
10918
10919  else
10920    # The variable is set, but is it from the command line or the environment?
10921
10922    # Try to remove the string !SORT! from our list.
10923    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10924    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10925      # If it failed, the variable was not from the command line. Ignore it,
10926      # but warn the user (except for BASH, which is always set by the calling BASH).
10927      if test "xSORT" != xBASH; then
10928        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10929$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10930      fi
10931      # Try to locate tool using the code snippet
10932      for ac_prog in sort
10933do
10934  # Extract the first word of "$ac_prog", so it can be a program name with args.
10935set dummy $ac_prog; ac_word=$2
10936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10937$as_echo_n "checking for $ac_word... " >&6; }
10938if ${ac_cv_path_SORT+:} false; then :
10939  $as_echo_n "(cached) " >&6
10940else
10941  case $SORT in
10942  [\\/]* | ?:[\\/]*)
10943  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10944  ;;
10945  *)
10946  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10947for as_dir in $PATH
10948do
10949  IFS=$as_save_IFS
10950  test -z "$as_dir" && as_dir=.
10951    for ac_exec_ext in '' $ac_executable_extensions; do
10952  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10953    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10954    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10955    break 2
10956  fi
10957done
10958  done
10959IFS=$as_save_IFS
10960
10961  ;;
10962esac
10963fi
10964SORT=$ac_cv_path_SORT
10965if test -n "$SORT"; then
10966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10967$as_echo "$SORT" >&6; }
10968else
10969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10970$as_echo "no" >&6; }
10971fi
10972
10973
10974  test -n "$SORT" && break
10975done
10976
10977    else
10978      # If it succeeded, then it was overridden by the user. We will use it
10979      # for the tool.
10980
10981      # First remove it from the list of overridden variables, so we can test
10982      # for unknown variables in the end.
10983      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10984
10985      # Check if we try to supply an empty value
10986      if test "x$SORT" = x; then
10987        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
10988$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
10989        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10990$as_echo_n "checking for SORT... " >&6; }
10991        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10992$as_echo "disabled" >&6; }
10993      else
10994        # Check if the provided tool contains a complete path.
10995        tool_specified="$SORT"
10996        tool_basename="${tool_specified##*/}"
10997        if test "x$tool_basename" = "x$tool_specified"; then
10998          # A command without a complete path is provided, search $PATH.
10999          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
11000$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
11001          # Extract the first word of "$tool_basename", so it can be a program name with args.
11002set dummy $tool_basename; ac_word=$2
11003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11004$as_echo_n "checking for $ac_word... " >&6; }
11005if ${ac_cv_path_SORT+:} false; then :
11006  $as_echo_n "(cached) " >&6
11007else
11008  case $SORT in
11009  [\\/]* | ?:[\\/]*)
11010  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11011  ;;
11012  *)
11013  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11014for as_dir in $PATH
11015do
11016  IFS=$as_save_IFS
11017  test -z "$as_dir" && as_dir=.
11018    for ac_exec_ext in '' $ac_executable_extensions; do
11019  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11020    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11021    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11022    break 2
11023  fi
11024done
11025  done
11026IFS=$as_save_IFS
11027
11028  ;;
11029esac
11030fi
11031SORT=$ac_cv_path_SORT
11032if test -n "$SORT"; then
11033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11034$as_echo "$SORT" >&6; }
11035else
11036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11037$as_echo "no" >&6; }
11038fi
11039
11040
11041          if test "x$SORT" = x; then
11042            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11043          fi
11044        else
11045          # Otherwise we believe it is a complete path. Use it as it is.
11046          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
11047$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
11048          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11049$as_echo_n "checking for SORT... " >&6; }
11050          if test ! -x "$tool_specified"; then
11051            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11052$as_echo "not found" >&6; }
11053            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
11054          fi
11055          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11056$as_echo "$tool_specified" >&6; }
11057        fi
11058      fi
11059    fi
11060
11061  fi
11062
11063
11064
11065  if test "x$SORT" = x; then
11066    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
11067  fi
11068
11069
11070
11071
11072
11073  # Publish this variable in the help.
11074
11075
11076  if [ -z "${TAIL+x}" ]; then
11077    # The variable is not set by user, try to locate tool using the code snippet
11078    for ac_prog in tail
11079do
11080  # Extract the first word of "$ac_prog", so it can be a program name with args.
11081set dummy $ac_prog; ac_word=$2
11082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11083$as_echo_n "checking for $ac_word... " >&6; }
11084if ${ac_cv_path_TAIL+:} false; then :
11085  $as_echo_n "(cached) " >&6
11086else
11087  case $TAIL in
11088  [\\/]* | ?:[\\/]*)
11089  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11090  ;;
11091  *)
11092  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11093for as_dir in $PATH
11094do
11095  IFS=$as_save_IFS
11096  test -z "$as_dir" && as_dir=.
11097    for ac_exec_ext in '' $ac_executable_extensions; do
11098  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11099    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11100    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11101    break 2
11102  fi
11103done
11104  done
11105IFS=$as_save_IFS
11106
11107  ;;
11108esac
11109fi
11110TAIL=$ac_cv_path_TAIL
11111if test -n "$TAIL"; then
11112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11113$as_echo "$TAIL" >&6; }
11114else
11115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11116$as_echo "no" >&6; }
11117fi
11118
11119
11120  test -n "$TAIL" && break
11121done
11122
11123  else
11124    # The variable is set, but is it from the command line or the environment?
11125
11126    # Try to remove the string !TAIL! from our list.
11127    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
11128    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11129      # If it failed, the variable was not from the command line. Ignore it,
11130      # but warn the user (except for BASH, which is always set by the calling BASH).
11131      if test "xTAIL" != xBASH; then
11132        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
11133$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
11134      fi
11135      # Try to locate tool using the code snippet
11136      for ac_prog in tail
11137do
11138  # Extract the first word of "$ac_prog", so it can be a program name with args.
11139set dummy $ac_prog; ac_word=$2
11140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11141$as_echo_n "checking for $ac_word... " >&6; }
11142if ${ac_cv_path_TAIL+:} false; then :
11143  $as_echo_n "(cached) " >&6
11144else
11145  case $TAIL in
11146  [\\/]* | ?:[\\/]*)
11147  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11148  ;;
11149  *)
11150  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11151for as_dir in $PATH
11152do
11153  IFS=$as_save_IFS
11154  test -z "$as_dir" && as_dir=.
11155    for ac_exec_ext in '' $ac_executable_extensions; do
11156  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11157    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11158    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11159    break 2
11160  fi
11161done
11162  done
11163IFS=$as_save_IFS
11164
11165  ;;
11166esac
11167fi
11168TAIL=$ac_cv_path_TAIL
11169if test -n "$TAIL"; then
11170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11171$as_echo "$TAIL" >&6; }
11172else
11173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11174$as_echo "no" >&6; }
11175fi
11176
11177
11178  test -n "$TAIL" && break
11179done
11180
11181    else
11182      # If it succeeded, then it was overridden by the user. We will use it
11183      # for the tool.
11184
11185      # First remove it from the list of overridden variables, so we can test
11186      # for unknown variables in the end.
11187      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11188
11189      # Check if we try to supply an empty value
11190      if test "x$TAIL" = x; then
11191        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
11192$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
11193        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11194$as_echo_n "checking for TAIL... " >&6; }
11195        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11196$as_echo "disabled" >&6; }
11197      else
11198        # Check if the provided tool contains a complete path.
11199        tool_specified="$TAIL"
11200        tool_basename="${tool_specified##*/}"
11201        if test "x$tool_basename" = "x$tool_specified"; then
11202          # A command without a complete path is provided, search $PATH.
11203          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
11204$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
11205          # Extract the first word of "$tool_basename", so it can be a program name with args.
11206set dummy $tool_basename; ac_word=$2
11207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11208$as_echo_n "checking for $ac_word... " >&6; }
11209if ${ac_cv_path_TAIL+:} false; then :
11210  $as_echo_n "(cached) " >&6
11211else
11212  case $TAIL in
11213  [\\/]* | ?:[\\/]*)
11214  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11215  ;;
11216  *)
11217  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11218for as_dir in $PATH
11219do
11220  IFS=$as_save_IFS
11221  test -z "$as_dir" && as_dir=.
11222    for ac_exec_ext in '' $ac_executable_extensions; do
11223  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11224    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11225    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11226    break 2
11227  fi
11228done
11229  done
11230IFS=$as_save_IFS
11231
11232  ;;
11233esac
11234fi
11235TAIL=$ac_cv_path_TAIL
11236if test -n "$TAIL"; then
11237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11238$as_echo "$TAIL" >&6; }
11239else
11240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11241$as_echo "no" >&6; }
11242fi
11243
11244
11245          if test "x$TAIL" = x; then
11246            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11247          fi
11248        else
11249          # Otherwise we believe it is a complete path. Use it as it is.
11250          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
11251$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
11252          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11253$as_echo_n "checking for TAIL... " >&6; }
11254          if test ! -x "$tool_specified"; then
11255            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11256$as_echo "not found" >&6; }
11257            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
11258          fi
11259          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11260$as_echo "$tool_specified" >&6; }
11261        fi
11262      fi
11263    fi
11264
11265  fi
11266
11267
11268
11269  if test "x$TAIL" = x; then
11270    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
11271  fi
11272
11273
11274
11275
11276
11277  # Publish this variable in the help.
11278
11279
11280  if [ -z "${TAR+x}" ]; then
11281    # The variable is not set by user, try to locate tool using the code snippet
11282    for ac_prog in gtar tar
11283do
11284  # Extract the first word of "$ac_prog", so it can be a program name with args.
11285set dummy $ac_prog; ac_word=$2
11286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11287$as_echo_n "checking for $ac_word... " >&6; }
11288if ${ac_cv_path_TAR+:} false; then :
11289  $as_echo_n "(cached) " >&6
11290else
11291  case $TAR in
11292  [\\/]* | ?:[\\/]*)
11293  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11294  ;;
11295  *)
11296  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11297for as_dir in $PATH
11298do
11299  IFS=$as_save_IFS
11300  test -z "$as_dir" && as_dir=.
11301    for ac_exec_ext in '' $ac_executable_extensions; do
11302  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11303    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11304    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11305    break 2
11306  fi
11307done
11308  done
11309IFS=$as_save_IFS
11310
11311  ;;
11312esac
11313fi
11314TAR=$ac_cv_path_TAR
11315if test -n "$TAR"; then
11316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11317$as_echo "$TAR" >&6; }
11318else
11319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11320$as_echo "no" >&6; }
11321fi
11322
11323
11324  test -n "$TAR" && break
11325done
11326
11327  else
11328    # The variable is set, but is it from the command line or the environment?
11329
11330    # Try to remove the string !TAR! from our list.
11331    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
11332    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11333      # If it failed, the variable was not from the command line. Ignore it,
11334      # but warn the user (except for BASH, which is always set by the calling BASH).
11335      if test "xTAR" != xBASH; then
11336        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
11337$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
11338      fi
11339      # Try to locate tool using the code snippet
11340      for ac_prog in gtar tar
11341do
11342  # Extract the first word of "$ac_prog", so it can be a program name with args.
11343set dummy $ac_prog; ac_word=$2
11344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11345$as_echo_n "checking for $ac_word... " >&6; }
11346if ${ac_cv_path_TAR+:} false; then :
11347  $as_echo_n "(cached) " >&6
11348else
11349  case $TAR in
11350  [\\/]* | ?:[\\/]*)
11351  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11352  ;;
11353  *)
11354  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11355for as_dir in $PATH
11356do
11357  IFS=$as_save_IFS
11358  test -z "$as_dir" && as_dir=.
11359    for ac_exec_ext in '' $ac_executable_extensions; do
11360  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11361    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11362    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11363    break 2
11364  fi
11365done
11366  done
11367IFS=$as_save_IFS
11368
11369  ;;
11370esac
11371fi
11372TAR=$ac_cv_path_TAR
11373if test -n "$TAR"; then
11374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11375$as_echo "$TAR" >&6; }
11376else
11377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11378$as_echo "no" >&6; }
11379fi
11380
11381
11382  test -n "$TAR" && break
11383done
11384
11385    else
11386      # If it succeeded, then it was overridden by the user. We will use it
11387      # for the tool.
11388
11389      # First remove it from the list of overridden variables, so we can test
11390      # for unknown variables in the end.
11391      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11392
11393      # Check if we try to supply an empty value
11394      if test "x$TAR" = x; then
11395        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
11396$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
11397        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11398$as_echo_n "checking for TAR... " >&6; }
11399        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11400$as_echo "disabled" >&6; }
11401      else
11402        # Check if the provided tool contains a complete path.
11403        tool_specified="$TAR"
11404        tool_basename="${tool_specified##*/}"
11405        if test "x$tool_basename" = "x$tool_specified"; then
11406          # A command without a complete path is provided, search $PATH.
11407          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
11408$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
11409          # Extract the first word of "$tool_basename", so it can be a program name with args.
11410set dummy $tool_basename; ac_word=$2
11411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11412$as_echo_n "checking for $ac_word... " >&6; }
11413if ${ac_cv_path_TAR+:} false; then :
11414  $as_echo_n "(cached) " >&6
11415else
11416  case $TAR in
11417  [\\/]* | ?:[\\/]*)
11418  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11419  ;;
11420  *)
11421  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11422for as_dir in $PATH
11423do
11424  IFS=$as_save_IFS
11425  test -z "$as_dir" && as_dir=.
11426    for ac_exec_ext in '' $ac_executable_extensions; do
11427  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11428    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11429    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11430    break 2
11431  fi
11432done
11433  done
11434IFS=$as_save_IFS
11435
11436  ;;
11437esac
11438fi
11439TAR=$ac_cv_path_TAR
11440if test -n "$TAR"; then
11441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11442$as_echo "$TAR" >&6; }
11443else
11444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11445$as_echo "no" >&6; }
11446fi
11447
11448
11449          if test "x$TAR" = x; then
11450            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11451          fi
11452        else
11453          # Otherwise we believe it is a complete path. Use it as it is.
11454          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11455$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11456          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11457$as_echo_n "checking for TAR... " >&6; }
11458          if test ! -x "$tool_specified"; then
11459            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11460$as_echo "not found" >&6; }
11461            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11462          fi
11463          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11464$as_echo "$tool_specified" >&6; }
11465        fi
11466      fi
11467    fi
11468
11469  fi
11470
11471
11472
11473  if test "x$TAR" = x; then
11474    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11475  fi
11476
11477
11478
11479
11480
11481  # Publish this variable in the help.
11482
11483
11484  if [ -z "${TEE+x}" ]; then
11485    # The variable is not set by user, try to locate tool using the code snippet
11486    for ac_prog in tee
11487do
11488  # Extract the first word of "$ac_prog", so it can be a program name with args.
11489set dummy $ac_prog; ac_word=$2
11490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11491$as_echo_n "checking for $ac_word... " >&6; }
11492if ${ac_cv_path_TEE+:} false; then :
11493  $as_echo_n "(cached) " >&6
11494else
11495  case $TEE in
11496  [\\/]* | ?:[\\/]*)
11497  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11498  ;;
11499  *)
11500  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11501for as_dir in $PATH
11502do
11503  IFS=$as_save_IFS
11504  test -z "$as_dir" && as_dir=.
11505    for ac_exec_ext in '' $ac_executable_extensions; do
11506  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11507    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11508    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11509    break 2
11510  fi
11511done
11512  done
11513IFS=$as_save_IFS
11514
11515  ;;
11516esac
11517fi
11518TEE=$ac_cv_path_TEE
11519if test -n "$TEE"; then
11520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11521$as_echo "$TEE" >&6; }
11522else
11523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11524$as_echo "no" >&6; }
11525fi
11526
11527
11528  test -n "$TEE" && break
11529done
11530
11531  else
11532    # The variable is set, but is it from the command line or the environment?
11533
11534    # Try to remove the string !TEE! from our list.
11535    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11536    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11537      # If it failed, the variable was not from the command line. Ignore it,
11538      # but warn the user (except for BASH, which is always set by the calling BASH).
11539      if test "xTEE" != xBASH; then
11540        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11541$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11542      fi
11543      # Try to locate tool using the code snippet
11544      for ac_prog in tee
11545do
11546  # Extract the first word of "$ac_prog", so it can be a program name with args.
11547set dummy $ac_prog; ac_word=$2
11548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11549$as_echo_n "checking for $ac_word... " >&6; }
11550if ${ac_cv_path_TEE+:} false; then :
11551  $as_echo_n "(cached) " >&6
11552else
11553  case $TEE in
11554  [\\/]* | ?:[\\/]*)
11555  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11556  ;;
11557  *)
11558  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11559for as_dir in $PATH
11560do
11561  IFS=$as_save_IFS
11562  test -z "$as_dir" && as_dir=.
11563    for ac_exec_ext in '' $ac_executable_extensions; do
11564  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11565    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11566    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11567    break 2
11568  fi
11569done
11570  done
11571IFS=$as_save_IFS
11572
11573  ;;
11574esac
11575fi
11576TEE=$ac_cv_path_TEE
11577if test -n "$TEE"; then
11578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11579$as_echo "$TEE" >&6; }
11580else
11581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11582$as_echo "no" >&6; }
11583fi
11584
11585
11586  test -n "$TEE" && break
11587done
11588
11589    else
11590      # If it succeeded, then it was overridden by the user. We will use it
11591      # for the tool.
11592
11593      # First remove it from the list of overridden variables, so we can test
11594      # for unknown variables in the end.
11595      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11596
11597      # Check if we try to supply an empty value
11598      if test "x$TEE" = x; then
11599        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11600$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11601        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11602$as_echo_n "checking for TEE... " >&6; }
11603        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11604$as_echo "disabled" >&6; }
11605      else
11606        # Check if the provided tool contains a complete path.
11607        tool_specified="$TEE"
11608        tool_basename="${tool_specified##*/}"
11609        if test "x$tool_basename" = "x$tool_specified"; then
11610          # A command without a complete path is provided, search $PATH.
11611          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11612$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11613          # Extract the first word of "$tool_basename", so it can be a program name with args.
11614set dummy $tool_basename; ac_word=$2
11615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11616$as_echo_n "checking for $ac_word... " >&6; }
11617if ${ac_cv_path_TEE+:} false; then :
11618  $as_echo_n "(cached) " >&6
11619else
11620  case $TEE in
11621  [\\/]* | ?:[\\/]*)
11622  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11623  ;;
11624  *)
11625  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11626for as_dir in $PATH
11627do
11628  IFS=$as_save_IFS
11629  test -z "$as_dir" && as_dir=.
11630    for ac_exec_ext in '' $ac_executable_extensions; do
11631  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11632    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11633    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11634    break 2
11635  fi
11636done
11637  done
11638IFS=$as_save_IFS
11639
11640  ;;
11641esac
11642fi
11643TEE=$ac_cv_path_TEE
11644if test -n "$TEE"; then
11645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11646$as_echo "$TEE" >&6; }
11647else
11648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11649$as_echo "no" >&6; }
11650fi
11651
11652
11653          if test "x$TEE" = x; then
11654            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11655          fi
11656        else
11657          # Otherwise we believe it is a complete path. Use it as it is.
11658          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11659$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11660          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11661$as_echo_n "checking for TEE... " >&6; }
11662          if test ! -x "$tool_specified"; then
11663            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11664$as_echo "not found" >&6; }
11665            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11666          fi
11667          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11668$as_echo "$tool_specified" >&6; }
11669        fi
11670      fi
11671    fi
11672
11673  fi
11674
11675
11676
11677  if test "x$TEE" = x; then
11678    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11679  fi
11680
11681
11682
11683
11684
11685  # Publish this variable in the help.
11686
11687
11688  if [ -z "${TOUCH+x}" ]; then
11689    # The variable is not set by user, try to locate tool using the code snippet
11690    for ac_prog in touch
11691do
11692  # Extract the first word of "$ac_prog", so it can be a program name with args.
11693set dummy $ac_prog; ac_word=$2
11694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11695$as_echo_n "checking for $ac_word... " >&6; }
11696if ${ac_cv_path_TOUCH+:} false; then :
11697  $as_echo_n "(cached) " >&6
11698else
11699  case $TOUCH in
11700  [\\/]* | ?:[\\/]*)
11701  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11702  ;;
11703  *)
11704  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11705for as_dir in $PATH
11706do
11707  IFS=$as_save_IFS
11708  test -z "$as_dir" && as_dir=.
11709    for ac_exec_ext in '' $ac_executable_extensions; do
11710  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11711    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11712    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11713    break 2
11714  fi
11715done
11716  done
11717IFS=$as_save_IFS
11718
11719  ;;
11720esac
11721fi
11722TOUCH=$ac_cv_path_TOUCH
11723if test -n "$TOUCH"; then
11724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11725$as_echo "$TOUCH" >&6; }
11726else
11727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11728$as_echo "no" >&6; }
11729fi
11730
11731
11732  test -n "$TOUCH" && break
11733done
11734
11735  else
11736    # The variable is set, but is it from the command line or the environment?
11737
11738    # Try to remove the string !TOUCH! from our list.
11739    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11740    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11741      # If it failed, the variable was not from the command line. Ignore it,
11742      # but warn the user (except for BASH, which is always set by the calling BASH).
11743      if test "xTOUCH" != xBASH; then
11744        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11745$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11746      fi
11747      # Try to locate tool using the code snippet
11748      for ac_prog in touch
11749do
11750  # Extract the first word of "$ac_prog", so it can be a program name with args.
11751set dummy $ac_prog; ac_word=$2
11752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11753$as_echo_n "checking for $ac_word... " >&6; }
11754if ${ac_cv_path_TOUCH+:} false; then :
11755  $as_echo_n "(cached) " >&6
11756else
11757  case $TOUCH in
11758  [\\/]* | ?:[\\/]*)
11759  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11760  ;;
11761  *)
11762  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11763for as_dir in $PATH
11764do
11765  IFS=$as_save_IFS
11766  test -z "$as_dir" && as_dir=.
11767    for ac_exec_ext in '' $ac_executable_extensions; do
11768  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11769    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11770    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11771    break 2
11772  fi
11773done
11774  done
11775IFS=$as_save_IFS
11776
11777  ;;
11778esac
11779fi
11780TOUCH=$ac_cv_path_TOUCH
11781if test -n "$TOUCH"; then
11782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11783$as_echo "$TOUCH" >&6; }
11784else
11785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11786$as_echo "no" >&6; }
11787fi
11788
11789
11790  test -n "$TOUCH" && break
11791done
11792
11793    else
11794      # If it succeeded, then it was overridden by the user. We will use it
11795      # for the tool.
11796
11797      # First remove it from the list of overridden variables, so we can test
11798      # for unknown variables in the end.
11799      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11800
11801      # Check if we try to supply an empty value
11802      if test "x$TOUCH" = x; then
11803        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11804$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11805        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11806$as_echo_n "checking for TOUCH... " >&6; }
11807        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11808$as_echo "disabled" >&6; }
11809      else
11810        # Check if the provided tool contains a complete path.
11811        tool_specified="$TOUCH"
11812        tool_basename="${tool_specified##*/}"
11813        if test "x$tool_basename" = "x$tool_specified"; then
11814          # A command without a complete path is provided, search $PATH.
11815          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11816$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11817          # Extract the first word of "$tool_basename", so it can be a program name with args.
11818set dummy $tool_basename; ac_word=$2
11819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11820$as_echo_n "checking for $ac_word... " >&6; }
11821if ${ac_cv_path_TOUCH+:} false; then :
11822  $as_echo_n "(cached) " >&6
11823else
11824  case $TOUCH in
11825  [\\/]* | ?:[\\/]*)
11826  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11827  ;;
11828  *)
11829  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11830for as_dir in $PATH
11831do
11832  IFS=$as_save_IFS
11833  test -z "$as_dir" && as_dir=.
11834    for ac_exec_ext in '' $ac_executable_extensions; do
11835  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11836    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11837    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11838    break 2
11839  fi
11840done
11841  done
11842IFS=$as_save_IFS
11843
11844  ;;
11845esac
11846fi
11847TOUCH=$ac_cv_path_TOUCH
11848if test -n "$TOUCH"; then
11849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11850$as_echo "$TOUCH" >&6; }
11851else
11852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11853$as_echo "no" >&6; }
11854fi
11855
11856
11857          if test "x$TOUCH" = x; then
11858            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11859          fi
11860        else
11861          # Otherwise we believe it is a complete path. Use it as it is.
11862          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11863$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11864          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11865$as_echo_n "checking for TOUCH... " >&6; }
11866          if test ! -x "$tool_specified"; then
11867            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11868$as_echo "not found" >&6; }
11869            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11870          fi
11871          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11872$as_echo "$tool_specified" >&6; }
11873        fi
11874      fi
11875    fi
11876
11877  fi
11878
11879
11880
11881  if test "x$TOUCH" = x; then
11882    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11883  fi
11884
11885
11886
11887
11888
11889  # Publish this variable in the help.
11890
11891
11892  if [ -z "${TR+x}" ]; then
11893    # The variable is not set by user, try to locate tool using the code snippet
11894    for ac_prog in tr
11895do
11896  # Extract the first word of "$ac_prog", so it can be a program name with args.
11897set dummy $ac_prog; ac_word=$2
11898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11899$as_echo_n "checking for $ac_word... " >&6; }
11900if ${ac_cv_path_TR+:} false; then :
11901  $as_echo_n "(cached) " >&6
11902else
11903  case $TR in
11904  [\\/]* | ?:[\\/]*)
11905  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11906  ;;
11907  *)
11908  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11909for as_dir in $PATH
11910do
11911  IFS=$as_save_IFS
11912  test -z "$as_dir" && as_dir=.
11913    for ac_exec_ext in '' $ac_executable_extensions; do
11914  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11915    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11916    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11917    break 2
11918  fi
11919done
11920  done
11921IFS=$as_save_IFS
11922
11923  ;;
11924esac
11925fi
11926TR=$ac_cv_path_TR
11927if test -n "$TR"; then
11928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11929$as_echo "$TR" >&6; }
11930else
11931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11932$as_echo "no" >&6; }
11933fi
11934
11935
11936  test -n "$TR" && break
11937done
11938
11939  else
11940    # The variable is set, but is it from the command line or the environment?
11941
11942    # Try to remove the string !TR! from our list.
11943    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11944    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11945      # If it failed, the variable was not from the command line. Ignore it,
11946      # but warn the user (except for BASH, which is always set by the calling BASH).
11947      if test "xTR" != xBASH; then
11948        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11949$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11950      fi
11951      # Try to locate tool using the code snippet
11952      for ac_prog in tr
11953do
11954  # Extract the first word of "$ac_prog", so it can be a program name with args.
11955set dummy $ac_prog; ac_word=$2
11956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11957$as_echo_n "checking for $ac_word... " >&6; }
11958if ${ac_cv_path_TR+:} false; then :
11959  $as_echo_n "(cached) " >&6
11960else
11961  case $TR in
11962  [\\/]* | ?:[\\/]*)
11963  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11964  ;;
11965  *)
11966  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11967for as_dir in $PATH
11968do
11969  IFS=$as_save_IFS
11970  test -z "$as_dir" && as_dir=.
11971    for ac_exec_ext in '' $ac_executable_extensions; do
11972  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11973    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11974    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11975    break 2
11976  fi
11977done
11978  done
11979IFS=$as_save_IFS
11980
11981  ;;
11982esac
11983fi
11984TR=$ac_cv_path_TR
11985if test -n "$TR"; then
11986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11987$as_echo "$TR" >&6; }
11988else
11989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11990$as_echo "no" >&6; }
11991fi
11992
11993
11994  test -n "$TR" && break
11995done
11996
11997    else
11998      # If it succeeded, then it was overridden by the user. We will use it
11999      # for the tool.
12000
12001      # First remove it from the list of overridden variables, so we can test
12002      # for unknown variables in the end.
12003      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12004
12005      # Check if we try to supply an empty value
12006      if test "x$TR" = x; then
12007        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
12008$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
12009        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12010$as_echo_n "checking for TR... " >&6; }
12011        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12012$as_echo "disabled" >&6; }
12013      else
12014        # Check if the provided tool contains a complete path.
12015        tool_specified="$TR"
12016        tool_basename="${tool_specified##*/}"
12017        if test "x$tool_basename" = "x$tool_specified"; then
12018          # A command without a complete path is provided, search $PATH.
12019          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
12020$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
12021          # Extract the first word of "$tool_basename", so it can be a program name with args.
12022set dummy $tool_basename; ac_word=$2
12023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12024$as_echo_n "checking for $ac_word... " >&6; }
12025if ${ac_cv_path_TR+:} false; then :
12026  $as_echo_n "(cached) " >&6
12027else
12028  case $TR in
12029  [\\/]* | ?:[\\/]*)
12030  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12031  ;;
12032  *)
12033  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12034for as_dir in $PATH
12035do
12036  IFS=$as_save_IFS
12037  test -z "$as_dir" && as_dir=.
12038    for ac_exec_ext in '' $ac_executable_extensions; do
12039  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12040    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12041    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12042    break 2
12043  fi
12044done
12045  done
12046IFS=$as_save_IFS
12047
12048  ;;
12049esac
12050fi
12051TR=$ac_cv_path_TR
12052if test -n "$TR"; then
12053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12054$as_echo "$TR" >&6; }
12055else
12056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12057$as_echo "no" >&6; }
12058fi
12059
12060
12061          if test "x$TR" = x; then
12062            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12063          fi
12064        else
12065          # Otherwise we believe it is a complete path. Use it as it is.
12066          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
12067$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
12068          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12069$as_echo_n "checking for TR... " >&6; }
12070          if test ! -x "$tool_specified"; then
12071            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12072$as_echo "not found" >&6; }
12073            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
12074          fi
12075          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12076$as_echo "$tool_specified" >&6; }
12077        fi
12078      fi
12079    fi
12080
12081  fi
12082
12083
12084
12085  if test "x$TR" = x; then
12086    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
12087  fi
12088
12089
12090
12091
12092
12093  # Publish this variable in the help.
12094
12095
12096  if [ -z "${UNAME+x}" ]; then
12097    # The variable is not set by user, try to locate tool using the code snippet
12098    for ac_prog in uname
12099do
12100  # Extract the first word of "$ac_prog", so it can be a program name with args.
12101set dummy $ac_prog; ac_word=$2
12102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12103$as_echo_n "checking for $ac_word... " >&6; }
12104if ${ac_cv_path_UNAME+:} false; then :
12105  $as_echo_n "(cached) " >&6
12106else
12107  case $UNAME in
12108  [\\/]* | ?:[\\/]*)
12109  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12110  ;;
12111  *)
12112  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12113for as_dir in $PATH
12114do
12115  IFS=$as_save_IFS
12116  test -z "$as_dir" && as_dir=.
12117    for ac_exec_ext in '' $ac_executable_extensions; do
12118  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12119    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12121    break 2
12122  fi
12123done
12124  done
12125IFS=$as_save_IFS
12126
12127  ;;
12128esac
12129fi
12130UNAME=$ac_cv_path_UNAME
12131if test -n "$UNAME"; then
12132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12133$as_echo "$UNAME" >&6; }
12134else
12135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12136$as_echo "no" >&6; }
12137fi
12138
12139
12140  test -n "$UNAME" && break
12141done
12142
12143  else
12144    # The variable is set, but is it from the command line or the environment?
12145
12146    # Try to remove the string !UNAME! from our list.
12147    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
12148    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12149      # If it failed, the variable was not from the command line. Ignore it,
12150      # but warn the user (except for BASH, which is always set by the calling BASH).
12151      if test "xUNAME" != xBASH; then
12152        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
12153$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
12154      fi
12155      # Try to locate tool using the code snippet
12156      for ac_prog in uname
12157do
12158  # Extract the first word of "$ac_prog", so it can be a program name with args.
12159set dummy $ac_prog; ac_word=$2
12160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12161$as_echo_n "checking for $ac_word... " >&6; }
12162if ${ac_cv_path_UNAME+:} false; then :
12163  $as_echo_n "(cached) " >&6
12164else
12165  case $UNAME in
12166  [\\/]* | ?:[\\/]*)
12167  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12168  ;;
12169  *)
12170  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12171for as_dir in $PATH
12172do
12173  IFS=$as_save_IFS
12174  test -z "$as_dir" && as_dir=.
12175    for ac_exec_ext in '' $ac_executable_extensions; do
12176  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12177    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12178    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12179    break 2
12180  fi
12181done
12182  done
12183IFS=$as_save_IFS
12184
12185  ;;
12186esac
12187fi
12188UNAME=$ac_cv_path_UNAME
12189if test -n "$UNAME"; then
12190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12191$as_echo "$UNAME" >&6; }
12192else
12193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12194$as_echo "no" >&6; }
12195fi
12196
12197
12198  test -n "$UNAME" && break
12199done
12200
12201    else
12202      # If it succeeded, then it was overridden by the user. We will use it
12203      # for the tool.
12204
12205      # First remove it from the list of overridden variables, so we can test
12206      # for unknown variables in the end.
12207      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12208
12209      # Check if we try to supply an empty value
12210      if test "x$UNAME" = x; then
12211        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
12212$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
12213        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12214$as_echo_n "checking for UNAME... " >&6; }
12215        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12216$as_echo "disabled" >&6; }
12217      else
12218        # Check if the provided tool contains a complete path.
12219        tool_specified="$UNAME"
12220        tool_basename="${tool_specified##*/}"
12221        if test "x$tool_basename" = "x$tool_specified"; then
12222          # A command without a complete path is provided, search $PATH.
12223          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
12224$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
12225          # Extract the first word of "$tool_basename", so it can be a program name with args.
12226set dummy $tool_basename; ac_word=$2
12227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12228$as_echo_n "checking for $ac_word... " >&6; }
12229if ${ac_cv_path_UNAME+:} false; then :
12230  $as_echo_n "(cached) " >&6
12231else
12232  case $UNAME in
12233  [\\/]* | ?:[\\/]*)
12234  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12235  ;;
12236  *)
12237  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12238for as_dir in $PATH
12239do
12240  IFS=$as_save_IFS
12241  test -z "$as_dir" && as_dir=.
12242    for ac_exec_ext in '' $ac_executable_extensions; do
12243  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12244    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12245    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12246    break 2
12247  fi
12248done
12249  done
12250IFS=$as_save_IFS
12251
12252  ;;
12253esac
12254fi
12255UNAME=$ac_cv_path_UNAME
12256if test -n "$UNAME"; then
12257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12258$as_echo "$UNAME" >&6; }
12259else
12260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12261$as_echo "no" >&6; }
12262fi
12263
12264
12265          if test "x$UNAME" = x; then
12266            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12267          fi
12268        else
12269          # Otherwise we believe it is a complete path. Use it as it is.
12270          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
12271$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
12272          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12273$as_echo_n "checking for UNAME... " >&6; }
12274          if test ! -x "$tool_specified"; then
12275            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12276$as_echo "not found" >&6; }
12277            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
12278          fi
12279          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12280$as_echo "$tool_specified" >&6; }
12281        fi
12282      fi
12283    fi
12284
12285  fi
12286
12287
12288
12289  if test "x$UNAME" = x; then
12290    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
12291  fi
12292
12293
12294
12295
12296
12297  # Publish this variable in the help.
12298
12299
12300  if [ -z "${UNIQ+x}" ]; then
12301    # The variable is not set by user, try to locate tool using the code snippet
12302    for ac_prog in uniq
12303do
12304  # Extract the first word of "$ac_prog", so it can be a program name with args.
12305set dummy $ac_prog; ac_word=$2
12306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12307$as_echo_n "checking for $ac_word... " >&6; }
12308if ${ac_cv_path_UNIQ+:} false; then :
12309  $as_echo_n "(cached) " >&6
12310else
12311  case $UNIQ in
12312  [\\/]* | ?:[\\/]*)
12313  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12314  ;;
12315  *)
12316  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12317for as_dir in $PATH
12318do
12319  IFS=$as_save_IFS
12320  test -z "$as_dir" && as_dir=.
12321    for ac_exec_ext in '' $ac_executable_extensions; do
12322  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12323    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12324    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12325    break 2
12326  fi
12327done
12328  done
12329IFS=$as_save_IFS
12330
12331  ;;
12332esac
12333fi
12334UNIQ=$ac_cv_path_UNIQ
12335if test -n "$UNIQ"; then
12336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12337$as_echo "$UNIQ" >&6; }
12338else
12339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12340$as_echo "no" >&6; }
12341fi
12342
12343
12344  test -n "$UNIQ" && break
12345done
12346
12347  else
12348    # The variable is set, but is it from the command line or the environment?
12349
12350    # Try to remove the string !UNIQ! from our list.
12351    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
12352    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12353      # If it failed, the variable was not from the command line. Ignore it,
12354      # but warn the user (except for BASH, which is always set by the calling BASH).
12355      if test "xUNIQ" != xBASH; then
12356        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
12357$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
12358      fi
12359      # Try to locate tool using the code snippet
12360      for ac_prog in uniq
12361do
12362  # Extract the first word of "$ac_prog", so it can be a program name with args.
12363set dummy $ac_prog; ac_word=$2
12364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12365$as_echo_n "checking for $ac_word... " >&6; }
12366if ${ac_cv_path_UNIQ+:} false; then :
12367  $as_echo_n "(cached) " >&6
12368else
12369  case $UNIQ in
12370  [\\/]* | ?:[\\/]*)
12371  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12372  ;;
12373  *)
12374  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12375for as_dir in $PATH
12376do
12377  IFS=$as_save_IFS
12378  test -z "$as_dir" && as_dir=.
12379    for ac_exec_ext in '' $ac_executable_extensions; do
12380  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12381    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12382    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12383    break 2
12384  fi
12385done
12386  done
12387IFS=$as_save_IFS
12388
12389  ;;
12390esac
12391fi
12392UNIQ=$ac_cv_path_UNIQ
12393if test -n "$UNIQ"; then
12394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12395$as_echo "$UNIQ" >&6; }
12396else
12397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12398$as_echo "no" >&6; }
12399fi
12400
12401
12402  test -n "$UNIQ" && break
12403done
12404
12405    else
12406      # If it succeeded, then it was overridden by the user. We will use it
12407      # for the tool.
12408
12409      # First remove it from the list of overridden variables, so we can test
12410      # for unknown variables in the end.
12411      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12412
12413      # Check if we try to supply an empty value
12414      if test "x$UNIQ" = x; then
12415        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
12416$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
12417        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12418$as_echo_n "checking for UNIQ... " >&6; }
12419        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12420$as_echo "disabled" >&6; }
12421      else
12422        # Check if the provided tool contains a complete path.
12423        tool_specified="$UNIQ"
12424        tool_basename="${tool_specified##*/}"
12425        if test "x$tool_basename" = "x$tool_specified"; then
12426          # A command without a complete path is provided, search $PATH.
12427          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
12428$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
12429          # Extract the first word of "$tool_basename", so it can be a program name with args.
12430set dummy $tool_basename; ac_word=$2
12431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12432$as_echo_n "checking for $ac_word... " >&6; }
12433if ${ac_cv_path_UNIQ+:} false; then :
12434  $as_echo_n "(cached) " >&6
12435else
12436  case $UNIQ in
12437  [\\/]* | ?:[\\/]*)
12438  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12439  ;;
12440  *)
12441  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12442for as_dir in $PATH
12443do
12444  IFS=$as_save_IFS
12445  test -z "$as_dir" && as_dir=.
12446    for ac_exec_ext in '' $ac_executable_extensions; do
12447  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12448    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12449    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12450    break 2
12451  fi
12452done
12453  done
12454IFS=$as_save_IFS
12455
12456  ;;
12457esac
12458fi
12459UNIQ=$ac_cv_path_UNIQ
12460if test -n "$UNIQ"; then
12461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12462$as_echo "$UNIQ" >&6; }
12463else
12464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12465$as_echo "no" >&6; }
12466fi
12467
12468
12469          if test "x$UNIQ" = x; then
12470            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12471          fi
12472        else
12473          # Otherwise we believe it is a complete path. Use it as it is.
12474          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12475$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12476          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12477$as_echo_n "checking for UNIQ... " >&6; }
12478          if test ! -x "$tool_specified"; then
12479            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12480$as_echo "not found" >&6; }
12481            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12482          fi
12483          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12484$as_echo "$tool_specified" >&6; }
12485        fi
12486      fi
12487    fi
12488
12489  fi
12490
12491
12492
12493  if test "x$UNIQ" = x; then
12494    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12495  fi
12496
12497
12498
12499
12500
12501  # Publish this variable in the help.
12502
12503
12504  if [ -z "${WC+x}" ]; then
12505    # The variable is not set by user, try to locate tool using the code snippet
12506    for ac_prog in wc
12507do
12508  # Extract the first word of "$ac_prog", so it can be a program name with args.
12509set dummy $ac_prog; ac_word=$2
12510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12511$as_echo_n "checking for $ac_word... " >&6; }
12512if ${ac_cv_path_WC+:} false; then :
12513  $as_echo_n "(cached) " >&6
12514else
12515  case $WC in
12516  [\\/]* | ?:[\\/]*)
12517  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12518  ;;
12519  *)
12520  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12521for as_dir in $PATH
12522do
12523  IFS=$as_save_IFS
12524  test -z "$as_dir" && as_dir=.
12525    for ac_exec_ext in '' $ac_executable_extensions; do
12526  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12527    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12528    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12529    break 2
12530  fi
12531done
12532  done
12533IFS=$as_save_IFS
12534
12535  ;;
12536esac
12537fi
12538WC=$ac_cv_path_WC
12539if test -n "$WC"; then
12540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12541$as_echo "$WC" >&6; }
12542else
12543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12544$as_echo "no" >&6; }
12545fi
12546
12547
12548  test -n "$WC" && break
12549done
12550
12551  else
12552    # The variable is set, but is it from the command line or the environment?
12553
12554    # Try to remove the string !WC! from our list.
12555    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12556    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12557      # If it failed, the variable was not from the command line. Ignore it,
12558      # but warn the user (except for BASH, which is always set by the calling BASH).
12559      if test "xWC" != xBASH; then
12560        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12561$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12562      fi
12563      # Try to locate tool using the code snippet
12564      for ac_prog in wc
12565do
12566  # Extract the first word of "$ac_prog", so it can be a program name with args.
12567set dummy $ac_prog; ac_word=$2
12568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12569$as_echo_n "checking for $ac_word... " >&6; }
12570if ${ac_cv_path_WC+:} false; then :
12571  $as_echo_n "(cached) " >&6
12572else
12573  case $WC in
12574  [\\/]* | ?:[\\/]*)
12575  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12576  ;;
12577  *)
12578  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12579for as_dir in $PATH
12580do
12581  IFS=$as_save_IFS
12582  test -z "$as_dir" && as_dir=.
12583    for ac_exec_ext in '' $ac_executable_extensions; do
12584  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12585    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12586    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12587    break 2
12588  fi
12589done
12590  done
12591IFS=$as_save_IFS
12592
12593  ;;
12594esac
12595fi
12596WC=$ac_cv_path_WC
12597if test -n "$WC"; then
12598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12599$as_echo "$WC" >&6; }
12600else
12601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12602$as_echo "no" >&6; }
12603fi
12604
12605
12606  test -n "$WC" && break
12607done
12608
12609    else
12610      # If it succeeded, then it was overridden by the user. We will use it
12611      # for the tool.
12612
12613      # First remove it from the list of overridden variables, so we can test
12614      # for unknown variables in the end.
12615      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12616
12617      # Check if we try to supply an empty value
12618      if test "x$WC" = x; then
12619        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12620$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12621        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12622$as_echo_n "checking for WC... " >&6; }
12623        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12624$as_echo "disabled" >&6; }
12625      else
12626        # Check if the provided tool contains a complete path.
12627        tool_specified="$WC"
12628        tool_basename="${tool_specified##*/}"
12629        if test "x$tool_basename" = "x$tool_specified"; then
12630          # A command without a complete path is provided, search $PATH.
12631          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12632$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12633          # Extract the first word of "$tool_basename", so it can be a program name with args.
12634set dummy $tool_basename; ac_word=$2
12635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12636$as_echo_n "checking for $ac_word... " >&6; }
12637if ${ac_cv_path_WC+:} false; then :
12638  $as_echo_n "(cached) " >&6
12639else
12640  case $WC in
12641  [\\/]* | ?:[\\/]*)
12642  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12643  ;;
12644  *)
12645  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12646for as_dir in $PATH
12647do
12648  IFS=$as_save_IFS
12649  test -z "$as_dir" && as_dir=.
12650    for ac_exec_ext in '' $ac_executable_extensions; do
12651  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12652    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12653    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12654    break 2
12655  fi
12656done
12657  done
12658IFS=$as_save_IFS
12659
12660  ;;
12661esac
12662fi
12663WC=$ac_cv_path_WC
12664if test -n "$WC"; then
12665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12666$as_echo "$WC" >&6; }
12667else
12668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12669$as_echo "no" >&6; }
12670fi
12671
12672
12673          if test "x$WC" = x; then
12674            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12675          fi
12676        else
12677          # Otherwise we believe it is a complete path. Use it as it is.
12678          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12679$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12680          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12681$as_echo_n "checking for WC... " >&6; }
12682          if test ! -x "$tool_specified"; then
12683            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12684$as_echo "not found" >&6; }
12685            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12686          fi
12687          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12688$as_echo "$tool_specified" >&6; }
12689        fi
12690      fi
12691    fi
12692
12693  fi
12694
12695
12696
12697  if test "x$WC" = x; then
12698    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12699  fi
12700
12701
12702
12703
12704
12705  # Publish this variable in the help.
12706
12707
12708  if [ -z "${WHICH+x}" ]; then
12709    # The variable is not set by user, try to locate tool using the code snippet
12710    for ac_prog in which
12711do
12712  # Extract the first word of "$ac_prog", so it can be a program name with args.
12713set dummy $ac_prog; ac_word=$2
12714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12715$as_echo_n "checking for $ac_word... " >&6; }
12716if ${ac_cv_path_WHICH+:} false; then :
12717  $as_echo_n "(cached) " >&6
12718else
12719  case $WHICH in
12720  [\\/]* | ?:[\\/]*)
12721  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12722  ;;
12723  *)
12724  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12725for as_dir in $PATH
12726do
12727  IFS=$as_save_IFS
12728  test -z "$as_dir" && as_dir=.
12729    for ac_exec_ext in '' $ac_executable_extensions; do
12730  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12731    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12732    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12733    break 2
12734  fi
12735done
12736  done
12737IFS=$as_save_IFS
12738
12739  ;;
12740esac
12741fi
12742WHICH=$ac_cv_path_WHICH
12743if test -n "$WHICH"; then
12744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12745$as_echo "$WHICH" >&6; }
12746else
12747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12748$as_echo "no" >&6; }
12749fi
12750
12751
12752  test -n "$WHICH" && break
12753done
12754
12755  else
12756    # The variable is set, but is it from the command line or the environment?
12757
12758    # Try to remove the string !WHICH! from our list.
12759    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12760    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12761      # If it failed, the variable was not from the command line. Ignore it,
12762      # but warn the user (except for BASH, which is always set by the calling BASH).
12763      if test "xWHICH" != xBASH; then
12764        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12765$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12766      fi
12767      # Try to locate tool using the code snippet
12768      for ac_prog in which
12769do
12770  # Extract the first word of "$ac_prog", so it can be a program name with args.
12771set dummy $ac_prog; ac_word=$2
12772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12773$as_echo_n "checking for $ac_word... " >&6; }
12774if ${ac_cv_path_WHICH+:} false; then :
12775  $as_echo_n "(cached) " >&6
12776else
12777  case $WHICH in
12778  [\\/]* | ?:[\\/]*)
12779  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12780  ;;
12781  *)
12782  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12783for as_dir in $PATH
12784do
12785  IFS=$as_save_IFS
12786  test -z "$as_dir" && as_dir=.
12787    for ac_exec_ext in '' $ac_executable_extensions; do
12788  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12789    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12790    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12791    break 2
12792  fi
12793done
12794  done
12795IFS=$as_save_IFS
12796
12797  ;;
12798esac
12799fi
12800WHICH=$ac_cv_path_WHICH
12801if test -n "$WHICH"; then
12802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12803$as_echo "$WHICH" >&6; }
12804else
12805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12806$as_echo "no" >&6; }
12807fi
12808
12809
12810  test -n "$WHICH" && break
12811done
12812
12813    else
12814      # If it succeeded, then it was overridden by the user. We will use it
12815      # for the tool.
12816
12817      # First remove it from the list of overridden variables, so we can test
12818      # for unknown variables in the end.
12819      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12820
12821      # Check if we try to supply an empty value
12822      if test "x$WHICH" = x; then
12823        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12824$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12825        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12826$as_echo_n "checking for WHICH... " >&6; }
12827        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12828$as_echo "disabled" >&6; }
12829      else
12830        # Check if the provided tool contains a complete path.
12831        tool_specified="$WHICH"
12832        tool_basename="${tool_specified##*/}"
12833        if test "x$tool_basename" = "x$tool_specified"; then
12834          # A command without a complete path is provided, search $PATH.
12835          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12836$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12837          # Extract the first word of "$tool_basename", so it can be a program name with args.
12838set dummy $tool_basename; ac_word=$2
12839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12840$as_echo_n "checking for $ac_word... " >&6; }
12841if ${ac_cv_path_WHICH+:} false; then :
12842  $as_echo_n "(cached) " >&6
12843else
12844  case $WHICH in
12845  [\\/]* | ?:[\\/]*)
12846  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12847  ;;
12848  *)
12849  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12850for as_dir in $PATH
12851do
12852  IFS=$as_save_IFS
12853  test -z "$as_dir" && as_dir=.
12854    for ac_exec_ext in '' $ac_executable_extensions; do
12855  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12856    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12857    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12858    break 2
12859  fi
12860done
12861  done
12862IFS=$as_save_IFS
12863
12864  ;;
12865esac
12866fi
12867WHICH=$ac_cv_path_WHICH
12868if test -n "$WHICH"; then
12869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12870$as_echo "$WHICH" >&6; }
12871else
12872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12873$as_echo "no" >&6; }
12874fi
12875
12876
12877          if test "x$WHICH" = x; then
12878            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12879          fi
12880        else
12881          # Otherwise we believe it is a complete path. Use it as it is.
12882          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12883$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12884          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12885$as_echo_n "checking for WHICH... " >&6; }
12886          if test ! -x "$tool_specified"; then
12887            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12888$as_echo "not found" >&6; }
12889            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12890          fi
12891          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12892$as_echo "$tool_specified" >&6; }
12893        fi
12894      fi
12895    fi
12896
12897  fi
12898
12899
12900
12901  if test "x$WHICH" = x; then
12902    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12903  fi
12904
12905
12906
12907
12908
12909  # Publish this variable in the help.
12910
12911
12912  if [ -z "${XARGS+x}" ]; then
12913    # The variable is not set by user, try to locate tool using the code snippet
12914    for ac_prog in xargs
12915do
12916  # Extract the first word of "$ac_prog", so it can be a program name with args.
12917set dummy $ac_prog; ac_word=$2
12918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12919$as_echo_n "checking for $ac_word... " >&6; }
12920if ${ac_cv_path_XARGS+:} false; then :
12921  $as_echo_n "(cached) " >&6
12922else
12923  case $XARGS in
12924  [\\/]* | ?:[\\/]*)
12925  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12926  ;;
12927  *)
12928  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12929for as_dir in $PATH
12930do
12931  IFS=$as_save_IFS
12932  test -z "$as_dir" && as_dir=.
12933    for ac_exec_ext in '' $ac_executable_extensions; do
12934  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12935    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12936    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12937    break 2
12938  fi
12939done
12940  done
12941IFS=$as_save_IFS
12942
12943  ;;
12944esac
12945fi
12946XARGS=$ac_cv_path_XARGS
12947if test -n "$XARGS"; then
12948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12949$as_echo "$XARGS" >&6; }
12950else
12951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12952$as_echo "no" >&6; }
12953fi
12954
12955
12956  test -n "$XARGS" && break
12957done
12958
12959  else
12960    # The variable is set, but is it from the command line or the environment?
12961
12962    # Try to remove the string !XARGS! from our list.
12963    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12964    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12965      # If it failed, the variable was not from the command line. Ignore it,
12966      # but warn the user (except for BASH, which is always set by the calling BASH).
12967      if test "xXARGS" != xBASH; then
12968        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12969$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12970      fi
12971      # Try to locate tool using the code snippet
12972      for ac_prog in xargs
12973do
12974  # Extract the first word of "$ac_prog", so it can be a program name with args.
12975set dummy $ac_prog; ac_word=$2
12976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12977$as_echo_n "checking for $ac_word... " >&6; }
12978if ${ac_cv_path_XARGS+:} false; then :
12979  $as_echo_n "(cached) " >&6
12980else
12981  case $XARGS in
12982  [\\/]* | ?:[\\/]*)
12983  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12984  ;;
12985  *)
12986  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12987for as_dir in $PATH
12988do
12989  IFS=$as_save_IFS
12990  test -z "$as_dir" && as_dir=.
12991    for ac_exec_ext in '' $ac_executable_extensions; do
12992  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12993    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12994    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12995    break 2
12996  fi
12997done
12998  done
12999IFS=$as_save_IFS
13000
13001  ;;
13002esac
13003fi
13004XARGS=$ac_cv_path_XARGS
13005if test -n "$XARGS"; then
13006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13007$as_echo "$XARGS" >&6; }
13008else
13009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13010$as_echo "no" >&6; }
13011fi
13012
13013
13014  test -n "$XARGS" && break
13015done
13016
13017    else
13018      # If it succeeded, then it was overridden by the user. We will use it
13019      # for the tool.
13020
13021      # First remove it from the list of overridden variables, so we can test
13022      # for unknown variables in the end.
13023      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13024
13025      # Check if we try to supply an empty value
13026      if test "x$XARGS" = x; then
13027        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
13028$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
13029        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13030$as_echo_n "checking for XARGS... " >&6; }
13031        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13032$as_echo "disabled" >&6; }
13033      else
13034        # Check if the provided tool contains a complete path.
13035        tool_specified="$XARGS"
13036        tool_basename="${tool_specified##*/}"
13037        if test "x$tool_basename" = "x$tool_specified"; then
13038          # A command without a complete path is provided, search $PATH.
13039          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
13040$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
13041          # Extract the first word of "$tool_basename", so it can be a program name with args.
13042set dummy $tool_basename; ac_word=$2
13043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13044$as_echo_n "checking for $ac_word... " >&6; }
13045if ${ac_cv_path_XARGS+:} false; then :
13046  $as_echo_n "(cached) " >&6
13047else
13048  case $XARGS in
13049  [\\/]* | ?:[\\/]*)
13050  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13051  ;;
13052  *)
13053  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13054for as_dir in $PATH
13055do
13056  IFS=$as_save_IFS
13057  test -z "$as_dir" && as_dir=.
13058    for ac_exec_ext in '' $ac_executable_extensions; do
13059  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13060    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13061    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13062    break 2
13063  fi
13064done
13065  done
13066IFS=$as_save_IFS
13067
13068  ;;
13069esac
13070fi
13071XARGS=$ac_cv_path_XARGS
13072if test -n "$XARGS"; then
13073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13074$as_echo "$XARGS" >&6; }
13075else
13076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13077$as_echo "no" >&6; }
13078fi
13079
13080
13081          if test "x$XARGS" = x; then
13082            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13083          fi
13084        else
13085          # Otherwise we believe it is a complete path. Use it as it is.
13086          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
13087$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
13088          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13089$as_echo_n "checking for XARGS... " >&6; }
13090          if test ! -x "$tool_specified"; then
13091            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13092$as_echo "not found" >&6; }
13093            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
13094          fi
13095          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13096$as_echo "$tool_specified" >&6; }
13097        fi
13098      fi
13099    fi
13100
13101  fi
13102
13103
13104
13105  if test "x$XARGS" = x; then
13106    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
13107  fi
13108
13109
13110
13111  # Then required tools that require some special treatment.
13112
13113
13114  # Publish this variable in the help.
13115
13116
13117  if [ -z "${AWK+x}" ]; then
13118    # The variable is not set by user, try to locate tool using the code snippet
13119    for ac_prog in gawk mawk nawk awk
13120do
13121  # Extract the first word of "$ac_prog", so it can be a program name with args.
13122set dummy $ac_prog; ac_word=$2
13123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13124$as_echo_n "checking for $ac_word... " >&6; }
13125if ${ac_cv_prog_AWK+:} false; then :
13126  $as_echo_n "(cached) " >&6
13127else
13128  if test -n "$AWK"; then
13129  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13130else
13131as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13132for as_dir in $PATH
13133do
13134  IFS=$as_save_IFS
13135  test -z "$as_dir" && as_dir=.
13136    for ac_exec_ext in '' $ac_executable_extensions; do
13137  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13138    ac_cv_prog_AWK="$ac_prog"
13139    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13140    break 2
13141  fi
13142done
13143  done
13144IFS=$as_save_IFS
13145
13146fi
13147fi
13148AWK=$ac_cv_prog_AWK
13149if test -n "$AWK"; then
13150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13151$as_echo "$AWK" >&6; }
13152else
13153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13154$as_echo "no" >&6; }
13155fi
13156
13157
13158  test -n "$AWK" && break
13159done
13160
13161  else
13162    # The variable is set, but is it from the command line or the environment?
13163
13164    # Try to remove the string !AWK! from our list.
13165    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
13166    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13167      # If it failed, the variable was not from the command line. Ignore it,
13168      # but warn the user (except for BASH, which is always set by the calling BASH).
13169      if test "xAWK" != xBASH; then
13170        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
13171$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
13172      fi
13173      # Try to locate tool using the code snippet
13174      for ac_prog in gawk mawk nawk awk
13175do
13176  # Extract the first word of "$ac_prog", so it can be a program name with args.
13177set dummy $ac_prog; ac_word=$2
13178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13179$as_echo_n "checking for $ac_word... " >&6; }
13180if ${ac_cv_prog_AWK+:} false; then :
13181  $as_echo_n "(cached) " >&6
13182else
13183  if test -n "$AWK"; then
13184  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13185else
13186as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13187for as_dir in $PATH
13188do
13189  IFS=$as_save_IFS
13190  test -z "$as_dir" && as_dir=.
13191    for ac_exec_ext in '' $ac_executable_extensions; do
13192  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13193    ac_cv_prog_AWK="$ac_prog"
13194    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13195    break 2
13196  fi
13197done
13198  done
13199IFS=$as_save_IFS
13200
13201fi
13202fi
13203AWK=$ac_cv_prog_AWK
13204if test -n "$AWK"; then
13205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13206$as_echo "$AWK" >&6; }
13207else
13208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13209$as_echo "no" >&6; }
13210fi
13211
13212
13213  test -n "$AWK" && break
13214done
13215
13216    else
13217      # If it succeeded, then it was overridden by the user. We will use it
13218      # for the tool.
13219
13220      # First remove it from the list of overridden variables, so we can test
13221      # for unknown variables in the end.
13222      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13223
13224      # Check if we try to supply an empty value
13225      if test "x$AWK" = x; then
13226        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
13227$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
13228        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13229$as_echo_n "checking for AWK... " >&6; }
13230        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13231$as_echo "disabled" >&6; }
13232      else
13233        # Check if the provided tool contains a complete path.
13234        tool_specified="$AWK"
13235        tool_basename="${tool_specified##*/}"
13236        if test "x$tool_basename" = "x$tool_specified"; then
13237          # A command without a complete path is provided, search $PATH.
13238          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
13239$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
13240          # Extract the first word of "$tool_basename", so it can be a program name with args.
13241set dummy $tool_basename; ac_word=$2
13242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13243$as_echo_n "checking for $ac_word... " >&6; }
13244if ${ac_cv_path_AWK+:} false; then :
13245  $as_echo_n "(cached) " >&6
13246else
13247  case $AWK in
13248  [\\/]* | ?:[\\/]*)
13249  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
13250  ;;
13251  *)
13252  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13253for as_dir in $PATH
13254do
13255  IFS=$as_save_IFS
13256  test -z "$as_dir" && as_dir=.
13257    for ac_exec_ext in '' $ac_executable_extensions; do
13258  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13259    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
13260    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13261    break 2
13262  fi
13263done
13264  done
13265IFS=$as_save_IFS
13266
13267  ;;
13268esac
13269fi
13270AWK=$ac_cv_path_AWK
13271if test -n "$AWK"; then
13272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13273$as_echo "$AWK" >&6; }
13274else
13275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13276$as_echo "no" >&6; }
13277fi
13278
13279
13280          if test "x$AWK" = x; then
13281            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13282          fi
13283        else
13284          # Otherwise we believe it is a complete path. Use it as it is.
13285          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
13286$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
13287          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13288$as_echo_n "checking for AWK... " >&6; }
13289          if test ! -x "$tool_specified"; then
13290            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13291$as_echo "not found" >&6; }
13292            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
13293          fi
13294          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13295$as_echo "$tool_specified" >&6; }
13296        fi
13297      fi
13298    fi
13299
13300  fi
13301
13302
13303  if test "x$AWK" = x; then
13304    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
13305  fi
13306
13307
13308
13309
13310  # Publish this variable in the help.
13311
13312
13313  if [ -z "${GREP+x}" ]; then
13314    # The variable is not set by user, try to locate tool using the code snippet
13315    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13316$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13317if ${ac_cv_path_GREP+:} false; then :
13318  $as_echo_n "(cached) " >&6
13319else
13320  if test -z "$GREP"; then
13321  ac_path_GREP_found=false
13322  # Loop through the user's path and test for each of PROGNAME-LIST
13323  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13324for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13325do
13326  IFS=$as_save_IFS
13327  test -z "$as_dir" && as_dir=.
13328    for ac_prog in grep ggrep; do
13329    for ac_exec_ext in '' $ac_executable_extensions; do
13330      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13331      as_fn_executable_p "$ac_path_GREP" || continue
13332# Check for GNU ac_path_GREP and select it if it is found.
13333  # Check for GNU $ac_path_GREP
13334case `"$ac_path_GREP" --version 2>&1` in
13335*GNU*)
13336  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13337*)
13338  ac_count=0
13339  $as_echo_n 0123456789 >"conftest.in"
13340  while :
13341  do
13342    cat "conftest.in" "conftest.in" >"conftest.tmp"
13343    mv "conftest.tmp" "conftest.in"
13344    cp "conftest.in" "conftest.nl"
13345    $as_echo 'GREP' >> "conftest.nl"
13346    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13347    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13348    as_fn_arith $ac_count + 1 && ac_count=$as_val
13349    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13350      # Best one so far, save it but keep looking for a better one
13351      ac_cv_path_GREP="$ac_path_GREP"
13352      ac_path_GREP_max=$ac_count
13353    fi
13354    # 10*(2^10) chars as input seems more than enough
13355    test $ac_count -gt 10 && break
13356  done
13357  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13358esac
13359
13360      $ac_path_GREP_found && break 3
13361    done
13362  done
13363  done
13364IFS=$as_save_IFS
13365  if test -z "$ac_cv_path_GREP"; then
13366    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13367  fi
13368else
13369  ac_cv_path_GREP=$GREP
13370fi
13371
13372fi
13373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13374$as_echo "$ac_cv_path_GREP" >&6; }
13375 GREP="$ac_cv_path_GREP"
13376
13377
13378  else
13379    # The variable is set, but is it from the command line or the environment?
13380
13381    # Try to remove the string !GREP! from our list.
13382    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
13383    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13384      # If it failed, the variable was not from the command line. Ignore it,
13385      # but warn the user (except for BASH, which is always set by the calling BASH).
13386      if test "xGREP" != xBASH; then
13387        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
13388$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
13389      fi
13390      # Try to locate tool using the code snippet
13391      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13392$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13393if ${ac_cv_path_GREP+:} false; then :
13394  $as_echo_n "(cached) " >&6
13395else
13396  if test -z "$GREP"; then
13397  ac_path_GREP_found=false
13398  # Loop through the user's path and test for each of PROGNAME-LIST
13399  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13400for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13401do
13402  IFS=$as_save_IFS
13403  test -z "$as_dir" && as_dir=.
13404    for ac_prog in grep ggrep; do
13405    for ac_exec_ext in '' $ac_executable_extensions; do
13406      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13407      as_fn_executable_p "$ac_path_GREP" || continue
13408# Check for GNU ac_path_GREP and select it if it is found.
13409  # Check for GNU $ac_path_GREP
13410case `"$ac_path_GREP" --version 2>&1` in
13411*GNU*)
13412  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13413*)
13414  ac_count=0
13415  $as_echo_n 0123456789 >"conftest.in"
13416  while :
13417  do
13418    cat "conftest.in" "conftest.in" >"conftest.tmp"
13419    mv "conftest.tmp" "conftest.in"
13420    cp "conftest.in" "conftest.nl"
13421    $as_echo 'GREP' >> "conftest.nl"
13422    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13423    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13424    as_fn_arith $ac_count + 1 && ac_count=$as_val
13425    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13426      # Best one so far, save it but keep looking for a better one
13427      ac_cv_path_GREP="$ac_path_GREP"
13428      ac_path_GREP_max=$ac_count
13429    fi
13430    # 10*(2^10) chars as input seems more than enough
13431    test $ac_count -gt 10 && break
13432  done
13433  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13434esac
13435
13436      $ac_path_GREP_found && break 3
13437    done
13438  done
13439  done
13440IFS=$as_save_IFS
13441  if test -z "$ac_cv_path_GREP"; then
13442    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13443  fi
13444else
13445  ac_cv_path_GREP=$GREP
13446fi
13447
13448fi
13449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13450$as_echo "$ac_cv_path_GREP" >&6; }
13451 GREP="$ac_cv_path_GREP"
13452
13453
13454    else
13455      # If it succeeded, then it was overridden by the user. We will use it
13456      # for the tool.
13457
13458      # First remove it from the list of overridden variables, so we can test
13459      # for unknown variables in the end.
13460      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13461
13462      # Check if we try to supply an empty value
13463      if test "x$GREP" = x; then
13464        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13465$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13466        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13467$as_echo_n "checking for GREP... " >&6; }
13468        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13469$as_echo "disabled" >&6; }
13470      else
13471        # Check if the provided tool contains a complete path.
13472        tool_specified="$GREP"
13473        tool_basename="${tool_specified##*/}"
13474        if test "x$tool_basename" = "x$tool_specified"; then
13475          # A command without a complete path is provided, search $PATH.
13476          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13477$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13478          # Extract the first word of "$tool_basename", so it can be a program name with args.
13479set dummy $tool_basename; ac_word=$2
13480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13481$as_echo_n "checking for $ac_word... " >&6; }
13482if ${ac_cv_path_GREP+:} false; then :
13483  $as_echo_n "(cached) " >&6
13484else
13485  case $GREP in
13486  [\\/]* | ?:[\\/]*)
13487  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13488  ;;
13489  *)
13490  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13491for as_dir in $PATH
13492do
13493  IFS=$as_save_IFS
13494  test -z "$as_dir" && as_dir=.
13495    for ac_exec_ext in '' $ac_executable_extensions; do
13496  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13497    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13498    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13499    break 2
13500  fi
13501done
13502  done
13503IFS=$as_save_IFS
13504
13505  ;;
13506esac
13507fi
13508GREP=$ac_cv_path_GREP
13509if test -n "$GREP"; then
13510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13511$as_echo "$GREP" >&6; }
13512else
13513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13514$as_echo "no" >&6; }
13515fi
13516
13517
13518          if test "x$GREP" = x; then
13519            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13520          fi
13521        else
13522          # Otherwise we believe it is a complete path. Use it as it is.
13523          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13524$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13525          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13526$as_echo_n "checking for GREP... " >&6; }
13527          if test ! -x "$tool_specified"; then
13528            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13529$as_echo "not found" >&6; }
13530            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13531          fi
13532          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13533$as_echo "$tool_specified" >&6; }
13534        fi
13535      fi
13536    fi
13537
13538  fi
13539
13540
13541  if test "x$GREP" = x; then
13542    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13543  fi
13544
13545
13546
13547
13548  # Publish this variable in the help.
13549
13550
13551  if [ -z "${EGREP+x}" ]; then
13552    # The variable is not set by user, try to locate tool using the code snippet
13553    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13554$as_echo_n "checking for egrep... " >&6; }
13555if ${ac_cv_path_EGREP+:} false; then :
13556  $as_echo_n "(cached) " >&6
13557else
13558  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13559   then ac_cv_path_EGREP="$GREP -E"
13560   else
13561     if test -z "$EGREP"; then
13562  ac_path_EGREP_found=false
13563  # Loop through the user's path and test for each of PROGNAME-LIST
13564  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13565for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13566do
13567  IFS=$as_save_IFS
13568  test -z "$as_dir" && as_dir=.
13569    for ac_prog in egrep; do
13570    for ac_exec_ext in '' $ac_executable_extensions; do
13571      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13572      as_fn_executable_p "$ac_path_EGREP" || continue
13573# Check for GNU ac_path_EGREP and select it if it is found.
13574  # Check for GNU $ac_path_EGREP
13575case `"$ac_path_EGREP" --version 2>&1` in
13576*GNU*)
13577  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13578*)
13579  ac_count=0
13580  $as_echo_n 0123456789 >"conftest.in"
13581  while :
13582  do
13583    cat "conftest.in" "conftest.in" >"conftest.tmp"
13584    mv "conftest.tmp" "conftest.in"
13585    cp "conftest.in" "conftest.nl"
13586    $as_echo 'EGREP' >> "conftest.nl"
13587    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13588    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13589    as_fn_arith $ac_count + 1 && ac_count=$as_val
13590    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13591      # Best one so far, save it but keep looking for a better one
13592      ac_cv_path_EGREP="$ac_path_EGREP"
13593      ac_path_EGREP_max=$ac_count
13594    fi
13595    # 10*(2^10) chars as input seems more than enough
13596    test $ac_count -gt 10 && break
13597  done
13598  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13599esac
13600
13601      $ac_path_EGREP_found && break 3
13602    done
13603  done
13604  done
13605IFS=$as_save_IFS
13606  if test -z "$ac_cv_path_EGREP"; then
13607    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13608  fi
13609else
13610  ac_cv_path_EGREP=$EGREP
13611fi
13612
13613   fi
13614fi
13615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13616$as_echo "$ac_cv_path_EGREP" >&6; }
13617 EGREP="$ac_cv_path_EGREP"
13618
13619
13620  else
13621    # The variable is set, but is it from the command line or the environment?
13622
13623    # Try to remove the string !EGREP! from our list.
13624    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13625    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13626      # If it failed, the variable was not from the command line. Ignore it,
13627      # but warn the user (except for BASH, which is always set by the calling BASH).
13628      if test "xEGREP" != xBASH; then
13629        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13630$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13631      fi
13632      # Try to locate tool using the code snippet
13633      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13634$as_echo_n "checking for egrep... " >&6; }
13635if ${ac_cv_path_EGREP+:} false; then :
13636  $as_echo_n "(cached) " >&6
13637else
13638  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13639   then ac_cv_path_EGREP="$GREP -E"
13640   else
13641     if test -z "$EGREP"; then
13642  ac_path_EGREP_found=false
13643  # Loop through the user's path and test for each of PROGNAME-LIST
13644  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13645for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13646do
13647  IFS=$as_save_IFS
13648  test -z "$as_dir" && as_dir=.
13649    for ac_prog in egrep; do
13650    for ac_exec_ext in '' $ac_executable_extensions; do
13651      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13652      as_fn_executable_p "$ac_path_EGREP" || continue
13653# Check for GNU ac_path_EGREP and select it if it is found.
13654  # Check for GNU $ac_path_EGREP
13655case `"$ac_path_EGREP" --version 2>&1` in
13656*GNU*)
13657  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13658*)
13659  ac_count=0
13660  $as_echo_n 0123456789 >"conftest.in"
13661  while :
13662  do
13663    cat "conftest.in" "conftest.in" >"conftest.tmp"
13664    mv "conftest.tmp" "conftest.in"
13665    cp "conftest.in" "conftest.nl"
13666    $as_echo 'EGREP' >> "conftest.nl"
13667    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13668    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13669    as_fn_arith $ac_count + 1 && ac_count=$as_val
13670    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13671      # Best one so far, save it but keep looking for a better one
13672      ac_cv_path_EGREP="$ac_path_EGREP"
13673      ac_path_EGREP_max=$ac_count
13674    fi
13675    # 10*(2^10) chars as input seems more than enough
13676    test $ac_count -gt 10 && break
13677  done
13678  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13679esac
13680
13681      $ac_path_EGREP_found && break 3
13682    done
13683  done
13684  done
13685IFS=$as_save_IFS
13686  if test -z "$ac_cv_path_EGREP"; then
13687    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13688  fi
13689else
13690  ac_cv_path_EGREP=$EGREP
13691fi
13692
13693   fi
13694fi
13695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13696$as_echo "$ac_cv_path_EGREP" >&6; }
13697 EGREP="$ac_cv_path_EGREP"
13698
13699
13700    else
13701      # If it succeeded, then it was overridden by the user. We will use it
13702      # for the tool.
13703
13704      # First remove it from the list of overridden variables, so we can test
13705      # for unknown variables in the end.
13706      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13707
13708      # Check if we try to supply an empty value
13709      if test "x$EGREP" = x; then
13710        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13711$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13712        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13713$as_echo_n "checking for EGREP... " >&6; }
13714        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13715$as_echo "disabled" >&6; }
13716      else
13717        # Check if the provided tool contains a complete path.
13718        tool_specified="$EGREP"
13719        tool_basename="${tool_specified##*/}"
13720        if test "x$tool_basename" = "x$tool_specified"; then
13721          # A command without a complete path is provided, search $PATH.
13722          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13723$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13724          # Extract the first word of "$tool_basename", so it can be a program name with args.
13725set dummy $tool_basename; ac_word=$2
13726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13727$as_echo_n "checking for $ac_word... " >&6; }
13728if ${ac_cv_path_EGREP+:} false; then :
13729  $as_echo_n "(cached) " >&6
13730else
13731  case $EGREP in
13732  [\\/]* | ?:[\\/]*)
13733  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13734  ;;
13735  *)
13736  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13737for as_dir in $PATH
13738do
13739  IFS=$as_save_IFS
13740  test -z "$as_dir" && as_dir=.
13741    for ac_exec_ext in '' $ac_executable_extensions; do
13742  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13743    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13744    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13745    break 2
13746  fi
13747done
13748  done
13749IFS=$as_save_IFS
13750
13751  ;;
13752esac
13753fi
13754EGREP=$ac_cv_path_EGREP
13755if test -n "$EGREP"; then
13756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13757$as_echo "$EGREP" >&6; }
13758else
13759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13760$as_echo "no" >&6; }
13761fi
13762
13763
13764          if test "x$EGREP" = x; then
13765            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13766          fi
13767        else
13768          # Otherwise we believe it is a complete path. Use it as it is.
13769          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13770$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13771          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13772$as_echo_n "checking for EGREP... " >&6; }
13773          if test ! -x "$tool_specified"; then
13774            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13775$as_echo "not found" >&6; }
13776            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13777          fi
13778          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13779$as_echo "$tool_specified" >&6; }
13780        fi
13781      fi
13782    fi
13783
13784  fi
13785
13786
13787  if test "x$EGREP" = x; then
13788    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13789  fi
13790
13791
13792
13793
13794  # Publish this variable in the help.
13795
13796
13797  if [ -z "${FGREP+x}" ]; then
13798    # The variable is not set by user, try to locate tool using the code snippet
13799    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13800$as_echo_n "checking for fgrep... " >&6; }
13801if ${ac_cv_path_FGREP+:} false; then :
13802  $as_echo_n "(cached) " >&6
13803else
13804  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13805   then ac_cv_path_FGREP="$GREP -F"
13806   else
13807     if test -z "$FGREP"; then
13808  ac_path_FGREP_found=false
13809  # Loop through the user's path and test for each of PROGNAME-LIST
13810  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13811for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13812do
13813  IFS=$as_save_IFS
13814  test -z "$as_dir" && as_dir=.
13815    for ac_prog in fgrep; do
13816    for ac_exec_ext in '' $ac_executable_extensions; do
13817      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13818      as_fn_executable_p "$ac_path_FGREP" || continue
13819# Check for GNU ac_path_FGREP and select it if it is found.
13820  # Check for GNU $ac_path_FGREP
13821case `"$ac_path_FGREP" --version 2>&1` in
13822*GNU*)
13823  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13824*)
13825  ac_count=0
13826  $as_echo_n 0123456789 >"conftest.in"
13827  while :
13828  do
13829    cat "conftest.in" "conftest.in" >"conftest.tmp"
13830    mv "conftest.tmp" "conftest.in"
13831    cp "conftest.in" "conftest.nl"
13832    $as_echo 'FGREP' >> "conftest.nl"
13833    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13834    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13835    as_fn_arith $ac_count + 1 && ac_count=$as_val
13836    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13837      # Best one so far, save it but keep looking for a better one
13838      ac_cv_path_FGREP="$ac_path_FGREP"
13839      ac_path_FGREP_max=$ac_count
13840    fi
13841    # 10*(2^10) chars as input seems more than enough
13842    test $ac_count -gt 10 && break
13843  done
13844  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13845esac
13846
13847      $ac_path_FGREP_found && break 3
13848    done
13849  done
13850  done
13851IFS=$as_save_IFS
13852  if test -z "$ac_cv_path_FGREP"; then
13853    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13854  fi
13855else
13856  ac_cv_path_FGREP=$FGREP
13857fi
13858
13859   fi
13860fi
13861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13862$as_echo "$ac_cv_path_FGREP" >&6; }
13863 FGREP="$ac_cv_path_FGREP"
13864
13865
13866  else
13867    # The variable is set, but is it from the command line or the environment?
13868
13869    # Try to remove the string !FGREP! from our list.
13870    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13871    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13872      # If it failed, the variable was not from the command line. Ignore it,
13873      # but warn the user (except for BASH, which is always set by the calling BASH).
13874      if test "xFGREP" != xBASH; then
13875        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13876$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13877      fi
13878      # Try to locate tool using the code snippet
13879      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13880$as_echo_n "checking for fgrep... " >&6; }
13881if ${ac_cv_path_FGREP+:} false; then :
13882  $as_echo_n "(cached) " >&6
13883else
13884  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13885   then ac_cv_path_FGREP="$GREP -F"
13886   else
13887     if test -z "$FGREP"; then
13888  ac_path_FGREP_found=false
13889  # Loop through the user's path and test for each of PROGNAME-LIST
13890  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13891for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13892do
13893  IFS=$as_save_IFS
13894  test -z "$as_dir" && as_dir=.
13895    for ac_prog in fgrep; do
13896    for ac_exec_ext in '' $ac_executable_extensions; do
13897      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13898      as_fn_executable_p "$ac_path_FGREP" || continue
13899# Check for GNU ac_path_FGREP and select it if it is found.
13900  # Check for GNU $ac_path_FGREP
13901case `"$ac_path_FGREP" --version 2>&1` in
13902*GNU*)
13903  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13904*)
13905  ac_count=0
13906  $as_echo_n 0123456789 >"conftest.in"
13907  while :
13908  do
13909    cat "conftest.in" "conftest.in" >"conftest.tmp"
13910    mv "conftest.tmp" "conftest.in"
13911    cp "conftest.in" "conftest.nl"
13912    $as_echo 'FGREP' >> "conftest.nl"
13913    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13914    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13915    as_fn_arith $ac_count + 1 && ac_count=$as_val
13916    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13917      # Best one so far, save it but keep looking for a better one
13918      ac_cv_path_FGREP="$ac_path_FGREP"
13919      ac_path_FGREP_max=$ac_count
13920    fi
13921    # 10*(2^10) chars as input seems more than enough
13922    test $ac_count -gt 10 && break
13923  done
13924  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13925esac
13926
13927      $ac_path_FGREP_found && break 3
13928    done
13929  done
13930  done
13931IFS=$as_save_IFS
13932  if test -z "$ac_cv_path_FGREP"; then
13933    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13934  fi
13935else
13936  ac_cv_path_FGREP=$FGREP
13937fi
13938
13939   fi
13940fi
13941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13942$as_echo "$ac_cv_path_FGREP" >&6; }
13943 FGREP="$ac_cv_path_FGREP"
13944
13945
13946    else
13947      # If it succeeded, then it was overridden by the user. We will use it
13948      # for the tool.
13949
13950      # First remove it from the list of overridden variables, so we can test
13951      # for unknown variables in the end.
13952      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13953
13954      # Check if we try to supply an empty value
13955      if test "x$FGREP" = x; then
13956        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13957$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13958        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13959$as_echo_n "checking for FGREP... " >&6; }
13960        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13961$as_echo "disabled" >&6; }
13962      else
13963        # Check if the provided tool contains a complete path.
13964        tool_specified="$FGREP"
13965        tool_basename="${tool_specified##*/}"
13966        if test "x$tool_basename" = "x$tool_specified"; then
13967          # A command without a complete path is provided, search $PATH.
13968          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13969$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13970          # Extract the first word of "$tool_basename", so it can be a program name with args.
13971set dummy $tool_basename; ac_word=$2
13972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13973$as_echo_n "checking for $ac_word... " >&6; }
13974if ${ac_cv_path_FGREP+:} false; then :
13975  $as_echo_n "(cached) " >&6
13976else
13977  case $FGREP in
13978  [\\/]* | ?:[\\/]*)
13979  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
13980  ;;
13981  *)
13982  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13983for as_dir in $PATH
13984do
13985  IFS=$as_save_IFS
13986  test -z "$as_dir" && as_dir=.
13987    for ac_exec_ext in '' $ac_executable_extensions; do
13988  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13989    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
13990    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13991    break 2
13992  fi
13993done
13994  done
13995IFS=$as_save_IFS
13996
13997  ;;
13998esac
13999fi
14000FGREP=$ac_cv_path_FGREP
14001if test -n "$FGREP"; then
14002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
14003$as_echo "$FGREP" >&6; }
14004else
14005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14006$as_echo "no" >&6; }
14007fi
14008
14009
14010          if test "x$FGREP" = x; then
14011            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14012          fi
14013        else
14014          # Otherwise we believe it is a complete path. Use it as it is.
14015          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
14016$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
14017          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14018$as_echo_n "checking for FGREP... " >&6; }
14019          if test ! -x "$tool_specified"; then
14020            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14021$as_echo "not found" >&6; }
14022            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
14023          fi
14024          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14025$as_echo "$tool_specified" >&6; }
14026        fi
14027      fi
14028    fi
14029
14030  fi
14031
14032
14033  if test "x$FGREP" = x; then
14034    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
14035  fi
14036
14037
14038
14039
14040  # Publish this variable in the help.
14041
14042
14043  if [ -z "${SED+x}" ]; then
14044    # The variable is not set by user, try to locate tool using the code snippet
14045    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14046$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14047if ${ac_cv_path_SED+:} false; then :
14048  $as_echo_n "(cached) " >&6
14049else
14050            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14051     for ac_i in 1 2 3 4 5 6 7; do
14052       ac_script="$ac_script$as_nl$ac_script"
14053     done
14054     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14055     { ac_script=; unset ac_script;}
14056     if test -z "$SED"; then
14057  ac_path_SED_found=false
14058  # Loop through the user's path and test for each of PROGNAME-LIST
14059  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14060for as_dir in $PATH
14061do
14062  IFS=$as_save_IFS
14063  test -z "$as_dir" && as_dir=.
14064    for ac_prog in sed gsed; do
14065    for ac_exec_ext in '' $ac_executable_extensions; do
14066      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14067      as_fn_executable_p "$ac_path_SED" || continue
14068# Check for GNU ac_path_SED and select it if it is found.
14069  # Check for GNU $ac_path_SED
14070case `"$ac_path_SED" --version 2>&1` in
14071*GNU*)
14072  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14073*)
14074  ac_count=0
14075  $as_echo_n 0123456789 >"conftest.in"
14076  while :
14077  do
14078    cat "conftest.in" "conftest.in" >"conftest.tmp"
14079    mv "conftest.tmp" "conftest.in"
14080    cp "conftest.in" "conftest.nl"
14081    $as_echo '' >> "conftest.nl"
14082    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14083    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14084    as_fn_arith $ac_count + 1 && ac_count=$as_val
14085    if test $ac_count -gt ${ac_path_SED_max-0}; then
14086      # Best one so far, save it but keep looking for a better one
14087      ac_cv_path_SED="$ac_path_SED"
14088      ac_path_SED_max=$ac_count
14089    fi
14090    # 10*(2^10) chars as input seems more than enough
14091    test $ac_count -gt 10 && break
14092  done
14093  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14094esac
14095
14096      $ac_path_SED_found && break 3
14097    done
14098  done
14099  done
14100IFS=$as_save_IFS
14101  if test -z "$ac_cv_path_SED"; then
14102    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14103  fi
14104else
14105  ac_cv_path_SED=$SED
14106fi
14107
14108fi
14109{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14110$as_echo "$ac_cv_path_SED" >&6; }
14111 SED="$ac_cv_path_SED"
14112  rm -f conftest.sed
14113
14114  else
14115    # The variable is set, but is it from the command line or the environment?
14116
14117    # Try to remove the string !SED! from our list.
14118    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
14119    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14120      # If it failed, the variable was not from the command line. Ignore it,
14121      # but warn the user (except for BASH, which is always set by the calling BASH).
14122      if test "xSED" != xBASH; then
14123        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
14124$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
14125      fi
14126      # Try to locate tool using the code snippet
14127      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14128$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14129if ${ac_cv_path_SED+:} false; then :
14130  $as_echo_n "(cached) " >&6
14131else
14132            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14133     for ac_i in 1 2 3 4 5 6 7; do
14134       ac_script="$ac_script$as_nl$ac_script"
14135     done
14136     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14137     { ac_script=; unset ac_script;}
14138     if test -z "$SED"; then
14139  ac_path_SED_found=false
14140  # Loop through the user's path and test for each of PROGNAME-LIST
14141  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14142for as_dir in $PATH
14143do
14144  IFS=$as_save_IFS
14145  test -z "$as_dir" && as_dir=.
14146    for ac_prog in sed gsed; do
14147    for ac_exec_ext in '' $ac_executable_extensions; do
14148      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14149      as_fn_executable_p "$ac_path_SED" || continue
14150# Check for GNU ac_path_SED and select it if it is found.
14151  # Check for GNU $ac_path_SED
14152case `"$ac_path_SED" --version 2>&1` in
14153*GNU*)
14154  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14155*)
14156  ac_count=0
14157  $as_echo_n 0123456789 >"conftest.in"
14158  while :
14159  do
14160    cat "conftest.in" "conftest.in" >"conftest.tmp"
14161    mv "conftest.tmp" "conftest.in"
14162    cp "conftest.in" "conftest.nl"
14163    $as_echo '' >> "conftest.nl"
14164    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14165    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14166    as_fn_arith $ac_count + 1 && ac_count=$as_val
14167    if test $ac_count -gt ${ac_path_SED_max-0}; then
14168      # Best one so far, save it but keep looking for a better one
14169      ac_cv_path_SED="$ac_path_SED"
14170      ac_path_SED_max=$ac_count
14171    fi
14172    # 10*(2^10) chars as input seems more than enough
14173    test $ac_count -gt 10 && break
14174  done
14175  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14176esac
14177
14178      $ac_path_SED_found && break 3
14179    done
14180  done
14181  done
14182IFS=$as_save_IFS
14183  if test -z "$ac_cv_path_SED"; then
14184    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14185  fi
14186else
14187  ac_cv_path_SED=$SED
14188fi
14189
14190fi
14191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14192$as_echo "$ac_cv_path_SED" >&6; }
14193 SED="$ac_cv_path_SED"
14194  rm -f conftest.sed
14195
14196    else
14197      # If it succeeded, then it was overridden by the user. We will use it
14198      # for the tool.
14199
14200      # First remove it from the list of overridden variables, so we can test
14201      # for unknown variables in the end.
14202      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14203
14204      # Check if we try to supply an empty value
14205      if test "x$SED" = x; then
14206        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
14207$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
14208        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14209$as_echo_n "checking for SED... " >&6; }
14210        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14211$as_echo "disabled" >&6; }
14212      else
14213        # Check if the provided tool contains a complete path.
14214        tool_specified="$SED"
14215        tool_basename="${tool_specified##*/}"
14216        if test "x$tool_basename" = "x$tool_specified"; then
14217          # A command without a complete path is provided, search $PATH.
14218          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
14219$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
14220          # Extract the first word of "$tool_basename", so it can be a program name with args.
14221set dummy $tool_basename; ac_word=$2
14222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14223$as_echo_n "checking for $ac_word... " >&6; }
14224if ${ac_cv_path_SED+:} false; then :
14225  $as_echo_n "(cached) " >&6
14226else
14227  case $SED in
14228  [\\/]* | ?:[\\/]*)
14229  ac_cv_path_SED="$SED" # Let the user override the test with a path.
14230  ;;
14231  *)
14232  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14233for as_dir in $PATH
14234do
14235  IFS=$as_save_IFS
14236  test -z "$as_dir" && as_dir=.
14237    for ac_exec_ext in '' $ac_executable_extensions; do
14238  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14239    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
14240    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14241    break 2
14242  fi
14243done
14244  done
14245IFS=$as_save_IFS
14246
14247  ;;
14248esac
14249fi
14250SED=$ac_cv_path_SED
14251if test -n "$SED"; then
14252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
14253$as_echo "$SED" >&6; }
14254else
14255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14256$as_echo "no" >&6; }
14257fi
14258
14259
14260          if test "x$SED" = x; then
14261            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14262          fi
14263        else
14264          # Otherwise we believe it is a complete path. Use it as it is.
14265          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
14266$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
14267          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14268$as_echo_n "checking for SED... " >&6; }
14269          if test ! -x "$tool_specified"; then
14270            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14271$as_echo "not found" >&6; }
14272            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
14273          fi
14274          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14275$as_echo "$tool_specified" >&6; }
14276        fi
14277      fi
14278    fi
14279
14280  fi
14281
14282
14283  if test "x$SED" = x; then
14284    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
14285  fi
14286
14287
14288
14289  # Always force rm.
14290  RM="$RM -f"
14291
14292  # pwd behaves differently on various platforms and some don't support the -L flag.
14293  # Always use the bash builtin pwd to get uniform behavior.
14294  THEPWDCMD=pwd
14295
14296  # These are not required on all platforms
14297
14298
14299  # Publish this variable in the help.
14300
14301
14302  if [ -z "${CYGPATH+x}" ]; then
14303    # The variable is not set by user, try to locate tool using the code snippet
14304    for ac_prog in cygpath
14305do
14306  # Extract the first word of "$ac_prog", so it can be a program name with args.
14307set dummy $ac_prog; ac_word=$2
14308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14309$as_echo_n "checking for $ac_word... " >&6; }
14310if ${ac_cv_path_CYGPATH+:} false; then :
14311  $as_echo_n "(cached) " >&6
14312else
14313  case $CYGPATH in
14314  [\\/]* | ?:[\\/]*)
14315  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14316  ;;
14317  *)
14318  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14319for as_dir in $PATH
14320do
14321  IFS=$as_save_IFS
14322  test -z "$as_dir" && as_dir=.
14323    for ac_exec_ext in '' $ac_executable_extensions; do
14324  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14325    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14326    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14327    break 2
14328  fi
14329done
14330  done
14331IFS=$as_save_IFS
14332
14333  ;;
14334esac
14335fi
14336CYGPATH=$ac_cv_path_CYGPATH
14337if test -n "$CYGPATH"; then
14338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14339$as_echo "$CYGPATH" >&6; }
14340else
14341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14342$as_echo "no" >&6; }
14343fi
14344
14345
14346  test -n "$CYGPATH" && break
14347done
14348
14349  else
14350    # The variable is set, but is it from the command line or the environment?
14351
14352    # Try to remove the string !CYGPATH! from our list.
14353    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
14354    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14355      # If it failed, the variable was not from the command line. Ignore it,
14356      # but warn the user (except for BASH, which is always set by the calling BASH).
14357      if test "xCYGPATH" != xBASH; then
14358        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
14359$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
14360      fi
14361      # Try to locate tool using the code snippet
14362      for ac_prog in cygpath
14363do
14364  # Extract the first word of "$ac_prog", so it can be a program name with args.
14365set dummy $ac_prog; ac_word=$2
14366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14367$as_echo_n "checking for $ac_word... " >&6; }
14368if ${ac_cv_path_CYGPATH+:} false; then :
14369  $as_echo_n "(cached) " >&6
14370else
14371  case $CYGPATH in
14372  [\\/]* | ?:[\\/]*)
14373  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14374  ;;
14375  *)
14376  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14377for as_dir in $PATH
14378do
14379  IFS=$as_save_IFS
14380  test -z "$as_dir" && as_dir=.
14381    for ac_exec_ext in '' $ac_executable_extensions; do
14382  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14383    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14384    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14385    break 2
14386  fi
14387done
14388  done
14389IFS=$as_save_IFS
14390
14391  ;;
14392esac
14393fi
14394CYGPATH=$ac_cv_path_CYGPATH
14395if test -n "$CYGPATH"; then
14396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14397$as_echo "$CYGPATH" >&6; }
14398else
14399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14400$as_echo "no" >&6; }
14401fi
14402
14403
14404  test -n "$CYGPATH" && break
14405done
14406
14407    else
14408      # If it succeeded, then it was overridden by the user. We will use it
14409      # for the tool.
14410
14411      # First remove it from the list of overridden variables, so we can test
14412      # for unknown variables in the end.
14413      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14414
14415      # Check if we try to supply an empty value
14416      if test "x$CYGPATH" = x; then
14417        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
14418$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
14419        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14420$as_echo_n "checking for CYGPATH... " >&6; }
14421        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14422$as_echo "disabled" >&6; }
14423      else
14424        # Check if the provided tool contains a complete path.
14425        tool_specified="$CYGPATH"
14426        tool_basename="${tool_specified##*/}"
14427        if test "x$tool_basename" = "x$tool_specified"; then
14428          # A command without a complete path is provided, search $PATH.
14429          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
14430$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
14431          # Extract the first word of "$tool_basename", so it can be a program name with args.
14432set dummy $tool_basename; ac_word=$2
14433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14434$as_echo_n "checking for $ac_word... " >&6; }
14435if ${ac_cv_path_CYGPATH+:} false; then :
14436  $as_echo_n "(cached) " >&6
14437else
14438  case $CYGPATH in
14439  [\\/]* | ?:[\\/]*)
14440  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14441  ;;
14442  *)
14443  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14444for as_dir in $PATH
14445do
14446  IFS=$as_save_IFS
14447  test -z "$as_dir" && as_dir=.
14448    for ac_exec_ext in '' $ac_executable_extensions; do
14449  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14450    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14451    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14452    break 2
14453  fi
14454done
14455  done
14456IFS=$as_save_IFS
14457
14458  ;;
14459esac
14460fi
14461CYGPATH=$ac_cv_path_CYGPATH
14462if test -n "$CYGPATH"; then
14463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14464$as_echo "$CYGPATH" >&6; }
14465else
14466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14467$as_echo "no" >&6; }
14468fi
14469
14470
14471          if test "x$CYGPATH" = x; then
14472            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14473          fi
14474        else
14475          # Otherwise we believe it is a complete path. Use it as it is.
14476          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14477$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14478          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14479$as_echo_n "checking for CYGPATH... " >&6; }
14480          if test ! -x "$tool_specified"; then
14481            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14482$as_echo "not found" >&6; }
14483            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14484          fi
14485          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14486$as_echo "$tool_specified" >&6; }
14487        fi
14488      fi
14489    fi
14490
14491  fi
14492
14493
14494
14495
14496  # Publish this variable in the help.
14497
14498
14499  if [ -z "${READLINK+x}" ]; then
14500    # The variable is not set by user, try to locate tool using the code snippet
14501    for ac_prog in greadlink readlink
14502do
14503  # Extract the first word of "$ac_prog", so it can be a program name with args.
14504set dummy $ac_prog; ac_word=$2
14505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14506$as_echo_n "checking for $ac_word... " >&6; }
14507if ${ac_cv_path_READLINK+:} false; then :
14508  $as_echo_n "(cached) " >&6
14509else
14510  case $READLINK in
14511  [\\/]* | ?:[\\/]*)
14512  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14513  ;;
14514  *)
14515  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14516for as_dir in $PATH
14517do
14518  IFS=$as_save_IFS
14519  test -z "$as_dir" && as_dir=.
14520    for ac_exec_ext in '' $ac_executable_extensions; do
14521  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14522    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14523    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14524    break 2
14525  fi
14526done
14527  done
14528IFS=$as_save_IFS
14529
14530  ;;
14531esac
14532fi
14533READLINK=$ac_cv_path_READLINK
14534if test -n "$READLINK"; then
14535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14536$as_echo "$READLINK" >&6; }
14537else
14538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14539$as_echo "no" >&6; }
14540fi
14541
14542
14543  test -n "$READLINK" && break
14544done
14545
14546  else
14547    # The variable is set, but is it from the command line or the environment?
14548
14549    # Try to remove the string !READLINK! from our list.
14550    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14551    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14552      # If it failed, the variable was not from the command line. Ignore it,
14553      # but warn the user (except for BASH, which is always set by the calling BASH).
14554      if test "xREADLINK" != xBASH; then
14555        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14556$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14557      fi
14558      # Try to locate tool using the code snippet
14559      for ac_prog in greadlink readlink
14560do
14561  # Extract the first word of "$ac_prog", so it can be a program name with args.
14562set dummy $ac_prog; ac_word=$2
14563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14564$as_echo_n "checking for $ac_word... " >&6; }
14565if ${ac_cv_path_READLINK+:} false; then :
14566  $as_echo_n "(cached) " >&6
14567else
14568  case $READLINK in
14569  [\\/]* | ?:[\\/]*)
14570  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14571  ;;
14572  *)
14573  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14574for as_dir in $PATH
14575do
14576  IFS=$as_save_IFS
14577  test -z "$as_dir" && as_dir=.
14578    for ac_exec_ext in '' $ac_executable_extensions; do
14579  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14580    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14581    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14582    break 2
14583  fi
14584done
14585  done
14586IFS=$as_save_IFS
14587
14588  ;;
14589esac
14590fi
14591READLINK=$ac_cv_path_READLINK
14592if test -n "$READLINK"; then
14593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14594$as_echo "$READLINK" >&6; }
14595else
14596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14597$as_echo "no" >&6; }
14598fi
14599
14600
14601  test -n "$READLINK" && break
14602done
14603
14604    else
14605      # If it succeeded, then it was overridden by the user. We will use it
14606      # for the tool.
14607
14608      # First remove it from the list of overridden variables, so we can test
14609      # for unknown variables in the end.
14610      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14611
14612      # Check if we try to supply an empty value
14613      if test "x$READLINK" = x; then
14614        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14615$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14616        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14617$as_echo_n "checking for READLINK... " >&6; }
14618        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14619$as_echo "disabled" >&6; }
14620      else
14621        # Check if the provided tool contains a complete path.
14622        tool_specified="$READLINK"
14623        tool_basename="${tool_specified##*/}"
14624        if test "x$tool_basename" = "x$tool_specified"; then
14625          # A command without a complete path is provided, search $PATH.
14626          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14627$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14628          # Extract the first word of "$tool_basename", so it can be a program name with args.
14629set dummy $tool_basename; ac_word=$2
14630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14631$as_echo_n "checking for $ac_word... " >&6; }
14632if ${ac_cv_path_READLINK+:} false; then :
14633  $as_echo_n "(cached) " >&6
14634else
14635  case $READLINK in
14636  [\\/]* | ?:[\\/]*)
14637  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14638  ;;
14639  *)
14640  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14641for as_dir in $PATH
14642do
14643  IFS=$as_save_IFS
14644  test -z "$as_dir" && as_dir=.
14645    for ac_exec_ext in '' $ac_executable_extensions; do
14646  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14647    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14648    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14649    break 2
14650  fi
14651done
14652  done
14653IFS=$as_save_IFS
14654
14655  ;;
14656esac
14657fi
14658READLINK=$ac_cv_path_READLINK
14659if test -n "$READLINK"; then
14660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14661$as_echo "$READLINK" >&6; }
14662else
14663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14664$as_echo "no" >&6; }
14665fi
14666
14667
14668          if test "x$READLINK" = x; then
14669            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14670          fi
14671        else
14672          # Otherwise we believe it is a complete path. Use it as it is.
14673          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14674$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14675          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14676$as_echo_n "checking for READLINK... " >&6; }
14677          if test ! -x "$tool_specified"; then
14678            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14679$as_echo "not found" >&6; }
14680            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14681          fi
14682          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14683$as_echo "$tool_specified" >&6; }
14684        fi
14685      fi
14686    fi
14687
14688  fi
14689
14690
14691
14692
14693  # Publish this variable in the help.
14694
14695
14696  if [ -z "${DF+x}" ]; then
14697    # The variable is not set by user, try to locate tool using the code snippet
14698    for ac_prog in df
14699do
14700  # Extract the first word of "$ac_prog", so it can be a program name with args.
14701set dummy $ac_prog; ac_word=$2
14702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14703$as_echo_n "checking for $ac_word... " >&6; }
14704if ${ac_cv_path_DF+:} false; then :
14705  $as_echo_n "(cached) " >&6
14706else
14707  case $DF in
14708  [\\/]* | ?:[\\/]*)
14709  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14710  ;;
14711  *)
14712  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14713for as_dir in $PATH
14714do
14715  IFS=$as_save_IFS
14716  test -z "$as_dir" && as_dir=.
14717    for ac_exec_ext in '' $ac_executable_extensions; do
14718  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14719    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14720    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14721    break 2
14722  fi
14723done
14724  done
14725IFS=$as_save_IFS
14726
14727  ;;
14728esac
14729fi
14730DF=$ac_cv_path_DF
14731if test -n "$DF"; then
14732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14733$as_echo "$DF" >&6; }
14734else
14735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14736$as_echo "no" >&6; }
14737fi
14738
14739
14740  test -n "$DF" && break
14741done
14742
14743  else
14744    # The variable is set, but is it from the command line or the environment?
14745
14746    # Try to remove the string !DF! from our list.
14747    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14748    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14749      # If it failed, the variable was not from the command line. Ignore it,
14750      # but warn the user (except for BASH, which is always set by the calling BASH).
14751      if test "xDF" != xBASH; then
14752        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14753$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14754      fi
14755      # Try to locate tool using the code snippet
14756      for ac_prog in df
14757do
14758  # Extract the first word of "$ac_prog", so it can be a program name with args.
14759set dummy $ac_prog; ac_word=$2
14760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14761$as_echo_n "checking for $ac_word... " >&6; }
14762if ${ac_cv_path_DF+:} false; then :
14763  $as_echo_n "(cached) " >&6
14764else
14765  case $DF in
14766  [\\/]* | ?:[\\/]*)
14767  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14768  ;;
14769  *)
14770  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14771for as_dir in $PATH
14772do
14773  IFS=$as_save_IFS
14774  test -z "$as_dir" && as_dir=.
14775    for ac_exec_ext in '' $ac_executable_extensions; do
14776  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14777    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14778    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14779    break 2
14780  fi
14781done
14782  done
14783IFS=$as_save_IFS
14784
14785  ;;
14786esac
14787fi
14788DF=$ac_cv_path_DF
14789if test -n "$DF"; then
14790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14791$as_echo "$DF" >&6; }
14792else
14793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14794$as_echo "no" >&6; }
14795fi
14796
14797
14798  test -n "$DF" && break
14799done
14800
14801    else
14802      # If it succeeded, then it was overridden by the user. We will use it
14803      # for the tool.
14804
14805      # First remove it from the list of overridden variables, so we can test
14806      # for unknown variables in the end.
14807      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14808
14809      # Check if we try to supply an empty value
14810      if test "x$DF" = x; then
14811        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14812$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14813        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14814$as_echo_n "checking for DF... " >&6; }
14815        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14816$as_echo "disabled" >&6; }
14817      else
14818        # Check if the provided tool contains a complete path.
14819        tool_specified="$DF"
14820        tool_basename="${tool_specified##*/}"
14821        if test "x$tool_basename" = "x$tool_specified"; then
14822          # A command without a complete path is provided, search $PATH.
14823          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14824$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14825          # Extract the first word of "$tool_basename", so it can be a program name with args.
14826set dummy $tool_basename; ac_word=$2
14827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14828$as_echo_n "checking for $ac_word... " >&6; }
14829if ${ac_cv_path_DF+:} false; then :
14830  $as_echo_n "(cached) " >&6
14831else
14832  case $DF in
14833  [\\/]* | ?:[\\/]*)
14834  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14835  ;;
14836  *)
14837  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14838for as_dir in $PATH
14839do
14840  IFS=$as_save_IFS
14841  test -z "$as_dir" && as_dir=.
14842    for ac_exec_ext in '' $ac_executable_extensions; do
14843  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14844    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14845    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14846    break 2
14847  fi
14848done
14849  done
14850IFS=$as_save_IFS
14851
14852  ;;
14853esac
14854fi
14855DF=$ac_cv_path_DF
14856if test -n "$DF"; then
14857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14858$as_echo "$DF" >&6; }
14859else
14860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14861$as_echo "no" >&6; }
14862fi
14863
14864
14865          if test "x$DF" = x; then
14866            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14867          fi
14868        else
14869          # Otherwise we believe it is a complete path. Use it as it is.
14870          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14871$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14872          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14873$as_echo_n "checking for DF... " >&6; }
14874          if test ! -x "$tool_specified"; then
14875            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14876$as_echo "not found" >&6; }
14877            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14878          fi
14879          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14880$as_echo "$tool_specified" >&6; }
14881        fi
14882      fi
14883    fi
14884
14885  fi
14886
14887
14888
14889
14890  # Publish this variable in the help.
14891
14892
14893  if [ -z "${CPIO+x}" ]; then
14894    # The variable is not set by user, try to locate tool using the code snippet
14895    for ac_prog in cpio bsdcpio
14896do
14897  # Extract the first word of "$ac_prog", so it can be a program name with args.
14898set dummy $ac_prog; ac_word=$2
14899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14900$as_echo_n "checking for $ac_word... " >&6; }
14901if ${ac_cv_path_CPIO+:} false; then :
14902  $as_echo_n "(cached) " >&6
14903else
14904  case $CPIO in
14905  [\\/]* | ?:[\\/]*)
14906  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14907  ;;
14908  *)
14909  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14910for as_dir in $PATH
14911do
14912  IFS=$as_save_IFS
14913  test -z "$as_dir" && as_dir=.
14914    for ac_exec_ext in '' $ac_executable_extensions; do
14915  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14916    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14917    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14918    break 2
14919  fi
14920done
14921  done
14922IFS=$as_save_IFS
14923
14924  ;;
14925esac
14926fi
14927CPIO=$ac_cv_path_CPIO
14928if test -n "$CPIO"; then
14929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14930$as_echo "$CPIO" >&6; }
14931else
14932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14933$as_echo "no" >&6; }
14934fi
14935
14936
14937  test -n "$CPIO" && break
14938done
14939
14940  else
14941    # The variable is set, but is it from the command line or the environment?
14942
14943    # Try to remove the string !CPIO! from our list.
14944    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14945    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14946      # If it failed, the variable was not from the command line. Ignore it,
14947      # but warn the user (except for BASH, which is always set by the calling BASH).
14948      if test "xCPIO" != xBASH; then
14949        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14950$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14951      fi
14952      # Try to locate tool using the code snippet
14953      for ac_prog in cpio bsdcpio
14954do
14955  # Extract the first word of "$ac_prog", so it can be a program name with args.
14956set dummy $ac_prog; ac_word=$2
14957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14958$as_echo_n "checking for $ac_word... " >&6; }
14959if ${ac_cv_path_CPIO+:} false; then :
14960  $as_echo_n "(cached) " >&6
14961else
14962  case $CPIO in
14963  [\\/]* | ?:[\\/]*)
14964  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14965  ;;
14966  *)
14967  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14968for as_dir in $PATH
14969do
14970  IFS=$as_save_IFS
14971  test -z "$as_dir" && as_dir=.
14972    for ac_exec_ext in '' $ac_executable_extensions; do
14973  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14974    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14975    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14976    break 2
14977  fi
14978done
14979  done
14980IFS=$as_save_IFS
14981
14982  ;;
14983esac
14984fi
14985CPIO=$ac_cv_path_CPIO
14986if test -n "$CPIO"; then
14987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14988$as_echo "$CPIO" >&6; }
14989else
14990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14991$as_echo "no" >&6; }
14992fi
14993
14994
14995  test -n "$CPIO" && break
14996done
14997
14998    else
14999      # If it succeeded, then it was overridden by the user. We will use it
15000      # for the tool.
15001
15002      # First remove it from the list of overridden variables, so we can test
15003      # for unknown variables in the end.
15004      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15005
15006      # Check if we try to supply an empty value
15007      if test "x$CPIO" = x; then
15008        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
15009$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
15010        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15011$as_echo_n "checking for CPIO... " >&6; }
15012        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15013$as_echo "disabled" >&6; }
15014      else
15015        # Check if the provided tool contains a complete path.
15016        tool_specified="$CPIO"
15017        tool_basename="${tool_specified##*/}"
15018        if test "x$tool_basename" = "x$tool_specified"; then
15019          # A command without a complete path is provided, search $PATH.
15020          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
15021$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
15022          # Extract the first word of "$tool_basename", so it can be a program name with args.
15023set dummy $tool_basename; ac_word=$2
15024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15025$as_echo_n "checking for $ac_word... " >&6; }
15026if ${ac_cv_path_CPIO+:} false; then :
15027  $as_echo_n "(cached) " >&6
15028else
15029  case $CPIO in
15030  [\\/]* | ?:[\\/]*)
15031  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15032  ;;
15033  *)
15034  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15035for as_dir in $PATH
15036do
15037  IFS=$as_save_IFS
15038  test -z "$as_dir" && as_dir=.
15039    for ac_exec_ext in '' $ac_executable_extensions; do
15040  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15041    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15042    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15043    break 2
15044  fi
15045done
15046  done
15047IFS=$as_save_IFS
15048
15049  ;;
15050esac
15051fi
15052CPIO=$ac_cv_path_CPIO
15053if test -n "$CPIO"; then
15054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15055$as_echo "$CPIO" >&6; }
15056else
15057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15058$as_echo "no" >&6; }
15059fi
15060
15061
15062          if test "x$CPIO" = x; then
15063            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15064          fi
15065        else
15066          # Otherwise we believe it is a complete path. Use it as it is.
15067          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
15068$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
15069          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15070$as_echo_n "checking for CPIO... " >&6; }
15071          if test ! -x "$tool_specified"; then
15072            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15073$as_echo "not found" >&6; }
15074            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
15075          fi
15076          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15077$as_echo "$tool_specified" >&6; }
15078        fi
15079      fi
15080    fi
15081
15082  fi
15083
15084
15085
15086
15087  # Publish this variable in the help.
15088
15089
15090  if [ -z "${NICE+x}" ]; then
15091    # The variable is not set by user, try to locate tool using the code snippet
15092    for ac_prog in nice
15093do
15094  # Extract the first word of "$ac_prog", so it can be a program name with args.
15095set dummy $ac_prog; ac_word=$2
15096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15097$as_echo_n "checking for $ac_word... " >&6; }
15098if ${ac_cv_path_NICE+:} false; then :
15099  $as_echo_n "(cached) " >&6
15100else
15101  case $NICE in
15102  [\\/]* | ?:[\\/]*)
15103  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15104  ;;
15105  *)
15106  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15107for as_dir in $PATH
15108do
15109  IFS=$as_save_IFS
15110  test -z "$as_dir" && as_dir=.
15111    for ac_exec_ext in '' $ac_executable_extensions; do
15112  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15113    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15114    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15115    break 2
15116  fi
15117done
15118  done
15119IFS=$as_save_IFS
15120
15121  ;;
15122esac
15123fi
15124NICE=$ac_cv_path_NICE
15125if test -n "$NICE"; then
15126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15127$as_echo "$NICE" >&6; }
15128else
15129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15130$as_echo "no" >&6; }
15131fi
15132
15133
15134  test -n "$NICE" && break
15135done
15136
15137  else
15138    # The variable is set, but is it from the command line or the environment?
15139
15140    # Try to remove the string !NICE! from our list.
15141    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
15142    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15143      # If it failed, the variable was not from the command line. Ignore it,
15144      # but warn the user (except for BASH, which is always set by the calling BASH).
15145      if test "xNICE" != xBASH; then
15146        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
15147$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
15148      fi
15149      # Try to locate tool using the code snippet
15150      for ac_prog in nice
15151do
15152  # Extract the first word of "$ac_prog", so it can be a program name with args.
15153set dummy $ac_prog; ac_word=$2
15154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15155$as_echo_n "checking for $ac_word... " >&6; }
15156if ${ac_cv_path_NICE+:} false; then :
15157  $as_echo_n "(cached) " >&6
15158else
15159  case $NICE in
15160  [\\/]* | ?:[\\/]*)
15161  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15162  ;;
15163  *)
15164  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15165for as_dir in $PATH
15166do
15167  IFS=$as_save_IFS
15168  test -z "$as_dir" && as_dir=.
15169    for ac_exec_ext in '' $ac_executable_extensions; do
15170  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15171    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15172    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15173    break 2
15174  fi
15175done
15176  done
15177IFS=$as_save_IFS
15178
15179  ;;
15180esac
15181fi
15182NICE=$ac_cv_path_NICE
15183if test -n "$NICE"; then
15184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15185$as_echo "$NICE" >&6; }
15186else
15187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15188$as_echo "no" >&6; }
15189fi
15190
15191
15192  test -n "$NICE" && break
15193done
15194
15195    else
15196      # If it succeeded, then it was overridden by the user. We will use it
15197      # for the tool.
15198
15199      # First remove it from the list of overridden variables, so we can test
15200      # for unknown variables in the end.
15201      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15202
15203      # Check if we try to supply an empty value
15204      if test "x$NICE" = x; then
15205        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
15206$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
15207        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15208$as_echo_n "checking for NICE... " >&6; }
15209        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15210$as_echo "disabled" >&6; }
15211      else
15212        # Check if the provided tool contains a complete path.
15213        tool_specified="$NICE"
15214        tool_basename="${tool_specified##*/}"
15215        if test "x$tool_basename" = "x$tool_specified"; then
15216          # A command without a complete path is provided, search $PATH.
15217          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
15218$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
15219          # Extract the first word of "$tool_basename", so it can be a program name with args.
15220set dummy $tool_basename; ac_word=$2
15221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15222$as_echo_n "checking for $ac_word... " >&6; }
15223if ${ac_cv_path_NICE+:} false; then :
15224  $as_echo_n "(cached) " >&6
15225else
15226  case $NICE in
15227  [\\/]* | ?:[\\/]*)
15228  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15229  ;;
15230  *)
15231  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15232for as_dir in $PATH
15233do
15234  IFS=$as_save_IFS
15235  test -z "$as_dir" && as_dir=.
15236    for ac_exec_ext in '' $ac_executable_extensions; do
15237  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15238    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15239    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15240    break 2
15241  fi
15242done
15243  done
15244IFS=$as_save_IFS
15245
15246  ;;
15247esac
15248fi
15249NICE=$ac_cv_path_NICE
15250if test -n "$NICE"; then
15251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15252$as_echo "$NICE" >&6; }
15253else
15254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15255$as_echo "no" >&6; }
15256fi
15257
15258
15259          if test "x$NICE" = x; then
15260            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15261          fi
15262        else
15263          # Otherwise we believe it is a complete path. Use it as it is.
15264          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
15265$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
15266          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15267$as_echo_n "checking for NICE... " >&6; }
15268          if test ! -x "$tool_specified"; then
15269            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15270$as_echo "not found" >&6; }
15271            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
15272          fi
15273          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15274$as_echo "$tool_specified" >&6; }
15275        fi
15276      fi
15277    fi
15278
15279  fi
15280
15281
15282
15283
15284# Now we can determine OpenJDK build and target platforms. This is required to
15285# have early on.
15286# Make sure we can run config.sub.
15287$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
15288  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
15289
15290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
15291$as_echo_n "checking build system type... " >&6; }
15292if ${ac_cv_build+:} false; then :
15293  $as_echo_n "(cached) " >&6
15294else
15295  ac_build_alias=$build_alias
15296test "x$ac_build_alias" = x &&
15297  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
15298test "x$ac_build_alias" = x &&
15299  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
15300ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
15301  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
15302
15303fi
15304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
15305$as_echo "$ac_cv_build" >&6; }
15306case $ac_cv_build in
15307*-*-*) ;;
15308*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
15309esac
15310build=$ac_cv_build
15311ac_save_IFS=$IFS; IFS='-'
15312set x $ac_cv_build
15313shift
15314build_cpu=$1
15315build_vendor=$2
15316shift; shift
15317# Remember, the first character of IFS is used to create $*,
15318# except with old shells:
15319build_os=$*
15320IFS=$ac_save_IFS
15321case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
15322
15323
15324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
15325$as_echo_n "checking host system type... " >&6; }
15326if ${ac_cv_host+:} false; then :
15327  $as_echo_n "(cached) " >&6
15328else
15329  if test "x$host_alias" = x; then
15330  ac_cv_host=$ac_cv_build
15331else
15332  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
15333    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
15334fi
15335
15336fi
15337{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
15338$as_echo "$ac_cv_host" >&6; }
15339case $ac_cv_host in
15340*-*-*) ;;
15341*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
15342esac
15343host=$ac_cv_host
15344ac_save_IFS=$IFS; IFS='-'
15345set x $ac_cv_host
15346shift
15347host_cpu=$1
15348host_vendor=$2
15349shift; shift
15350# Remember, the first character of IFS is used to create $*,
15351# except with old shells:
15352host_os=$*
15353IFS=$ac_save_IFS
15354case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
15355
15356
15357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
15358$as_echo_n "checking target system type... " >&6; }
15359if ${ac_cv_target+:} false; then :
15360  $as_echo_n "(cached) " >&6
15361else
15362  if test "x$target_alias" = x; then
15363  ac_cv_target=$ac_cv_host
15364else
15365  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
15366    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
15367fi
15368
15369fi
15370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
15371$as_echo "$ac_cv_target" >&6; }
15372case $ac_cv_target in
15373*-*-*) ;;
15374*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
15375esac
15376target=$ac_cv_target
15377ac_save_IFS=$IFS; IFS='-'
15378set x $ac_cv_target
15379shift
15380target_cpu=$1
15381target_vendor=$2
15382shift; shift
15383# Remember, the first character of IFS is used to create $*,
15384# except with old shells:
15385target_os=$*
15386IFS=$ac_save_IFS
15387case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
15388
15389
15390# The aliases save the names the user supplied, while $host etc.
15391# will get canonicalized.
15392test -n "$target_alias" &&
15393  test "$program_prefix$program_suffix$program_transform_name" = \
15394    NONENONEs,x,x, &&
15395  program_prefix=${target_alias}-
15396
15397  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
15398  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
15399  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
15400  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
15401  # to use the configure naming style.
15402
15403
15404
15405
15406
15407  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
15408  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
15409  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
15410  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
15411  OPENJDK_TARGET_AUTOCONF_NAME="$host"
15412  OPENJDK_BUILD_AUTOCONF_NAME="$build"
15413
15414
15415
15416  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15417
15418  case "$build_os" in
15419    *linux*)
15420      VAR_OS=linux
15421      VAR_OS_TYPE=unix
15422      ;;
15423    *solaris*)
15424      VAR_OS=solaris
15425      VAR_OS_TYPE=unix
15426      ;;
15427    *darwin*)
15428      VAR_OS=macosx
15429      VAR_OS_TYPE=unix
15430      ;;
15431    *bsd*)
15432      VAR_OS=bsd
15433      VAR_OS_TYPE=unix
15434      ;;
15435    *cygwin*)
15436      VAR_OS=windows
15437      VAR_OS_ENV=windows.cygwin
15438      ;;
15439    *mingw*)
15440      VAR_OS=windows
15441      VAR_OS_ENV=windows.msys
15442      ;;
15443    *aix*)
15444      VAR_OS=aix
15445      VAR_OS_TYPE=unix
15446      ;;
15447    *)
15448      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15449      ;;
15450  esac
15451
15452
15453  # First argument is the cpu name from the trip/quad
15454  case "$build_cpu" in
15455    x86_64)
15456      VAR_CPU=x86_64
15457      VAR_CPU_ARCH=x86
15458      VAR_CPU_BITS=64
15459      VAR_CPU_ENDIAN=little
15460      ;;
15461    i?86)
15462      VAR_CPU=x86
15463      VAR_CPU_ARCH=x86
15464      VAR_CPU_BITS=32
15465      VAR_CPU_ENDIAN=little
15466      ;;
15467    arm*)
15468      VAR_CPU=arm
15469      VAR_CPU_ARCH=arm
15470      VAR_CPU_BITS=32
15471      VAR_CPU_ENDIAN=little
15472      ;;
15473    aarch64)
15474      VAR_CPU=aarch64
15475      VAR_CPU_ARCH=aarch64
15476      VAR_CPU_BITS=64
15477      VAR_CPU_ENDIAN=little
15478      ;;
15479    powerpc)
15480      VAR_CPU=ppc
15481      VAR_CPU_ARCH=ppc
15482      VAR_CPU_BITS=32
15483      VAR_CPU_ENDIAN=big
15484      ;;
15485    powerpc64)
15486      VAR_CPU=ppc64
15487      VAR_CPU_ARCH=ppc
15488      VAR_CPU_BITS=64
15489      VAR_CPU_ENDIAN=big
15490      ;;
15491    powerpc64le)
15492      VAR_CPU=ppc64le
15493      VAR_CPU_ARCH=ppc
15494      VAR_CPU_BITS=64
15495      VAR_CPU_ENDIAN=little
15496      ;;
15497    s390)
15498      VAR_CPU=s390
15499      VAR_CPU_ARCH=s390
15500      VAR_CPU_BITS=32
15501      VAR_CPU_ENDIAN=big
15502      ;;
15503    s390x)
15504      VAR_CPU=s390x
15505      VAR_CPU_ARCH=s390
15506      VAR_CPU_BITS=64
15507      VAR_CPU_ENDIAN=big
15508      ;;
15509    sparc)
15510      VAR_CPU=sparc
15511      VAR_CPU_ARCH=sparc
15512      VAR_CPU_BITS=32
15513      VAR_CPU_ENDIAN=big
15514      ;;
15515    sparcv9|sparc64)
15516      VAR_CPU=sparcv9
15517      VAR_CPU_ARCH=sparc
15518      VAR_CPU_BITS=64
15519      VAR_CPU_ENDIAN=big
15520      ;;
15521    *)
15522      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15523      ;;
15524  esac
15525
15526  # ..and setup our own variables. (Do this explicitely to facilitate searching)
15527  OPENJDK_BUILD_OS="$VAR_OS"
15528  if test "x$VAR_OS_TYPE" != x; then
15529    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15530  else
15531    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15532  fi
15533  if test "x$VAR_OS_ENV" != x; then
15534    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15535  else
15536    OPENJDK_BUILD_OS_ENV="$VAR_OS"
15537  fi
15538  OPENJDK_BUILD_CPU="$VAR_CPU"
15539  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15540  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15541  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15542
15543
15544
15545
15546
15547
15548
15549
15550  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15551$as_echo_n "checking openjdk-build os-cpu... " >&6; }
15552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15553$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15554
15555  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15556
15557  case "$host_os" in
15558    *linux*)
15559      VAR_OS=linux
15560      VAR_OS_TYPE=unix
15561      ;;
15562    *solaris*)
15563      VAR_OS=solaris
15564      VAR_OS_TYPE=unix
15565      ;;
15566    *darwin*)
15567      VAR_OS=macosx
15568      VAR_OS_TYPE=unix
15569      ;;
15570    *bsd*)
15571      VAR_OS=bsd
15572      VAR_OS_TYPE=unix
15573      ;;
15574    *cygwin*)
15575      VAR_OS=windows
15576      VAR_OS_ENV=windows.cygwin
15577      ;;
15578    *mingw*)
15579      VAR_OS=windows
15580      VAR_OS_ENV=windows.msys
15581      ;;
15582    *aix*)
15583      VAR_OS=aix
15584      VAR_OS_TYPE=unix
15585      ;;
15586    *)
15587      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15588      ;;
15589  esac
15590
15591
15592  # First argument is the cpu name from the trip/quad
15593  case "$host_cpu" in
15594    x86_64)
15595      VAR_CPU=x86_64
15596      VAR_CPU_ARCH=x86
15597      VAR_CPU_BITS=64
15598      VAR_CPU_ENDIAN=little
15599      ;;
15600    i?86)
15601      VAR_CPU=x86
15602      VAR_CPU_ARCH=x86
15603      VAR_CPU_BITS=32
15604      VAR_CPU_ENDIAN=little
15605      ;;
15606    arm*)
15607      VAR_CPU=arm
15608      VAR_CPU_ARCH=arm
15609      VAR_CPU_BITS=32
15610      VAR_CPU_ENDIAN=little
15611      ;;
15612    aarch64)
15613      VAR_CPU=aarch64
15614      VAR_CPU_ARCH=aarch64
15615      VAR_CPU_BITS=64
15616      VAR_CPU_ENDIAN=little
15617      ;;
15618    powerpc)
15619      VAR_CPU=ppc
15620      VAR_CPU_ARCH=ppc
15621      VAR_CPU_BITS=32
15622      VAR_CPU_ENDIAN=big
15623      ;;
15624    powerpc64)
15625      VAR_CPU=ppc64
15626      VAR_CPU_ARCH=ppc
15627      VAR_CPU_BITS=64
15628      VAR_CPU_ENDIAN=big
15629      ;;
15630    powerpc64le)
15631      VAR_CPU=ppc64le
15632      VAR_CPU_ARCH=ppc
15633      VAR_CPU_BITS=64
15634      VAR_CPU_ENDIAN=little
15635      ;;
15636    s390)
15637      VAR_CPU=s390
15638      VAR_CPU_ARCH=s390
15639      VAR_CPU_BITS=32
15640      VAR_CPU_ENDIAN=big
15641      ;;
15642    s390x)
15643      VAR_CPU=s390x
15644      VAR_CPU_ARCH=s390
15645      VAR_CPU_BITS=64
15646      VAR_CPU_ENDIAN=big
15647      ;;
15648    sparc)
15649      VAR_CPU=sparc
15650      VAR_CPU_ARCH=sparc
15651      VAR_CPU_BITS=32
15652      VAR_CPU_ENDIAN=big
15653      ;;
15654    sparcv9|sparc64)
15655      VAR_CPU=sparcv9
15656      VAR_CPU_ARCH=sparc
15657      VAR_CPU_BITS=64
15658      VAR_CPU_ENDIAN=big
15659      ;;
15660    *)
15661      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15662      ;;
15663  esac
15664
15665  # ... and setup our own variables. (Do this explicitely to facilitate searching)
15666  OPENJDK_TARGET_OS="$VAR_OS"
15667  if test "x$VAR_OS_TYPE" != x; then
15668    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15669  else
15670    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15671  fi
15672  if test "x$VAR_OS_ENV" != x; then
15673    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15674  else
15675    OPENJDK_TARGET_OS_ENV="$VAR_OS"
15676  fi
15677  OPENJDK_TARGET_CPU="$VAR_CPU"
15678  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15679  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15680  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15681
15682
15683
15684
15685
15686
15687
15688
15689  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15690$as_echo_n "checking openjdk-target os-cpu... " >&6; }
15691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15692$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15693
15694
15695
15696# Check whether --with-target-bits was given.
15697if test "${with_target_bits+set}" = set; then :
15698  withval=$with_target_bits;
15699fi
15700
15701
15702  # We have three types of compiles:
15703  # native  == normal compilation, target system == build system
15704  # cross   == traditional cross compilation, target system != build system; special toolchain needed
15705  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15706  #
15707  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15708    # We're doing a proper cross-compilation
15709    COMPILE_TYPE="cross"
15710  else
15711    COMPILE_TYPE="native"
15712  fi
15713
15714  if test "x$with_target_bits" != x; then
15715    if test "x$COMPILE_TYPE" = "xcross"; then
15716      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15717    fi
15718
15719    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15720      # A reduced build is requested
15721      COMPILE_TYPE="reduced"
15722      OPENJDK_TARGET_CPU_BITS=32
15723      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
15724        OPENJDK_TARGET_CPU=x86
15725      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
15726        OPENJDK_TARGET_CPU=sparc
15727      else
15728        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
15729      fi
15730    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15731      as_fn_error $? "It is not possible to use --with-target-bits=64 on a 32 bit system. Use proper cross-compilation instead." "$LINENO" 5
15732    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
15733      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
15734$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
15735    else
15736      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
15737    fi
15738  fi
15739
15740
15741  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
15742$as_echo_n "checking compilation type... " >&6; }
15743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
15744$as_echo "$COMPILE_TYPE" >&6; }
15745
15746
15747  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
15748    REQUIRED_OS_NAME=SunOS
15749    REQUIRED_OS_VERSION=5.10
15750  fi
15751  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
15752    REQUIRED_OS_NAME=Linux
15753    REQUIRED_OS_VERSION=2.6
15754  fi
15755  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15756    REQUIRED_OS_NAME=Windows
15757    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
15758      REQUIRED_OS_VERSION=5.2
15759    else
15760      REQUIRED_OS_VERSION=5.1
15761    fi
15762  fi
15763  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15764    REQUIRED_OS_NAME=Darwin
15765    REQUIRED_OS_VERSION=11.2
15766  fi
15767  if test "x$OPENJDK_TARGET_OS" = "xaix"; then
15768    REQUIRED_OS_NAME=AIX
15769    REQUIRED_OS_VERSION=7.1
15770  fi
15771
15772
15773
15774
15775
15776
15777  # Also store the legacy naming of the cpu.
15778  # Ie i586 and amd64 instead of x86 and x86_64
15779  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
15780  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15781    OPENJDK_TARGET_CPU_LEGACY="i586"
15782  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15783    # On all platforms except MacOSX replace x86_64 with amd64.
15784    OPENJDK_TARGET_CPU_LEGACY="amd64"
15785  fi
15786
15787
15788  # And the second legacy naming of the cpu.
15789  # Ie i386 and amd64 instead of x86 and x86_64.
15790  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
15791  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15792    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
15793  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15794    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
15795  fi
15796
15797
15798  # This is the name of the cpu (but using i386 and amd64 instead of
15799  # x86 and x86_64, respectively), preceeded by a /, to be used when
15800  # locating libraries. On macosx, it's empty, though.
15801  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
15802  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15803    OPENJDK_TARGET_CPU_LIBDIR=""
15804  fi
15805
15806
15807  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15808  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15809  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
15810  OPENJDK_TARGET_CPU_ISADIR=""
15811  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15812    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15813      OPENJDK_TARGET_CPU_ISADIR="/amd64"
15814    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15815      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
15816    fi
15817  fi
15818
15819
15820  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
15821  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
15822  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
15823    # On linux only, we replace x86 with i386.
15824    OPENJDK_TARGET_CPU_OSARCH="i386"
15825  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15826    # On all platforms except macosx, we replace x86_64 with amd64.
15827    OPENJDK_TARGET_CPU_OSARCH="amd64"
15828  fi
15829
15830
15831  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
15832  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15833    OPENJDK_TARGET_CPU_JLI="i386"
15834  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15835    # On all platforms except macosx, we replace x86_64 with amd64.
15836    OPENJDK_TARGET_CPU_JLI="amd64"
15837  fi
15838  # Now setup the -D flags for building libjli.
15839  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
15840  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15841    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
15842      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
15843    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
15844      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
15845    fi
15846  fi
15847
15848
15849  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15850      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
15851  else
15852      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
15853  fi
15854
15855
15856  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
15857  # Macosx is osx and x86_64 is x64
15858  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15859    OPENJDK_TARGET_OS_BUNDLE="osx"
15860  else
15861    OPENJDK_TARGET_OS_BUNDLE="$OPENJDK_TARGET_OS"
15862  fi
15863  if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15864    OPENJDK_TARGET_CPU_BUNDLE="x64"
15865  else
15866    OPENJDK_TARGET_CPU_BUNDLE="$OPENJDK_TARGET_CPU"
15867  fi
15868  OPENJDK_TARGET_BUNDLE_PLATFORM="${OPENJDK_TARGET_OS_BUNDLE}-${OPENJDK_TARGET_CPU_BUNDLE}"
15869
15870
15871
15872
15873  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15874    A_LP64="LP64:="
15875    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15876    # unpack200.exe
15877    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
15878      OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
15879    fi
15880  fi
15881  LP64=$A_LP64
15882
15883
15884  if test "x$COMPILE_TYPE" = "xcross"; then
15885    # FIXME: ... or should this include reduced builds..?
15886    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
15887  else
15888    DEFINE_CROSS_COMPILE_ARCH=""
15889  fi
15890
15891
15892  # Convert openjdk platform names to hotspot names
15893
15894  HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
15895  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15896    HOTSPOT_TARGET_OS=bsd
15897  fi
15898
15899
15900  HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
15901  if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
15902    HOTSPOT_TARGET_OS_TYPE=posix
15903  fi
15904
15905
15906  HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
15907  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15908    HOTSPOT_TARGET_CPU=x86_32
15909  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15910    HOTSPOT_TARGET_CPU=sparc
15911  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15912    HOTSPOT_TARGET_CPU=ppc_64
15913  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15914    HOTSPOT_TARGET_CPU=ppc_64
15915  fi
15916
15917
15918  # This is identical with OPENJDK_*, but define anyway for consistency.
15919  HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
15920
15921
15922  # Setup HOTSPOT_TARGET_CPU_DEFINE
15923  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15924    HOTSPOT_TARGET_CPU_DEFINE=IA32
15925  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15926    HOTSPOT_TARGET_CPU_DEFINE=AMD64
15927  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15928    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15929  elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15930    HOTSPOT_TARGET_CPU_DEFINE=AARCH64
15931  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15932    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15933  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15934    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15935
15936  # The cpu defines below are for zero, we don't support them directly.
15937  elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
15938    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15939  elif test "x$OPENJDK_TARGET_CPU" = xppc; then
15940    HOTSPOT_TARGET_CPU_DEFINE=PPC32
15941  elif test "x$OPENJDK_TARGET_CPU" = xs390; then
15942    HOTSPOT_TARGET_CPU_DEFINE=S390
15943  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
15944    HOTSPOT_TARGET_CPU_DEFINE=S390
15945  elif test "x$OPENJDK_TARGET_CPU" != x; then
15946    HOTSPOT_TARGET_CPU_DEFINE=$(echo $OPENJDK_TARGET_CPU | tr a-z A-Z)
15947  fi
15948
15949
15950
15951
15952  # Also store the legacy naming of the cpu.
15953  # Ie i586 and amd64 instead of x86 and x86_64
15954  OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
15955  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15956    OPENJDK_BUILD_CPU_LEGACY="i586"
15957  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15958    # On all platforms except MacOSX replace x86_64 with amd64.
15959    OPENJDK_BUILD_CPU_LEGACY="amd64"
15960  fi
15961
15962
15963  # And the second legacy naming of the cpu.
15964  # Ie i386 and amd64 instead of x86 and x86_64.
15965  OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
15966  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15967    OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
15968  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15969    OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
15970  fi
15971
15972
15973  # This is the name of the cpu (but using i386 and amd64 instead of
15974  # x86 and x86_64, respectively), preceeded by a /, to be used when
15975  # locating libraries. On macosx, it's empty, though.
15976  OPENJDK_BUILD_CPU_LIBDIR="/$OPENJDK_BUILD_CPU_LEGACY_LIB"
15977  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
15978    OPENJDK_BUILD_CPU_LIBDIR=""
15979  fi
15980
15981
15982  # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15983  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15984  # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
15985  OPENJDK_BUILD_CPU_ISADIR=""
15986  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
15987    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15988      OPENJDK_BUILD_CPU_ISADIR="/amd64"
15989    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
15990      OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
15991    fi
15992  fi
15993
15994
15995  # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
15996  OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
15997  if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
15998    # On linux only, we replace x86 with i386.
15999    OPENJDK_BUILD_CPU_OSARCH="i386"
16000  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16001    # On all platforms except macosx, we replace x86_64 with amd64.
16002    OPENJDK_BUILD_CPU_OSARCH="amd64"
16003  fi
16004
16005
16006  OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
16007  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16008    OPENJDK_BUILD_CPU_JLI="i386"
16009  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16010    # On all platforms except macosx, we replace x86_64 with amd64.
16011    OPENJDK_BUILD_CPU_JLI="amd64"
16012  fi
16013  # Now setup the -D flags for building libjli.
16014  OPENJDK_BUILD_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_BUILD_CPU_JLI\"'"
16015  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
16016    if test "x$OPENJDK_BUILD_CPU_ARCH" = xsparc; then
16017      OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
16018    elif test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
16019      OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
16020    fi
16021  fi
16022
16023
16024  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16025      OPENJDK_BUILD_OS_EXPORT_DIR=macosx
16026  else
16027      OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
16028  fi
16029
16030
16031  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16032  # Macosx is osx and x86_64 is x64
16033  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16034    OPENJDK_BUILD_OS_BUNDLE="osx"
16035  else
16036    OPENJDK_BUILD_OS_BUNDLE="$OPENJDK_TARGET_OS"
16037  fi
16038  if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16039    OPENJDK_BUILD_CPU_BUNDLE="x64"
16040  else
16041    OPENJDK_BUILD_CPU_BUNDLE="$OPENJDK_BUILD_CPU"
16042  fi
16043  OPENJDK_BUILD_BUNDLE_PLATFORM="${OPENJDK_BUILD_OS_BUNDLE}-${OPENJDK_BUILD_CPU_BUNDLE}"
16044
16045
16046
16047
16048  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
16049    A_LP64="LP64:="
16050    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16051    # unpack200.exe
16052    if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
16053      OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
16054    fi
16055  fi
16056  LP64=$A_LP64
16057
16058
16059  if test "x$COMPILE_TYPE" = "xcross"; then
16060    # FIXME: ... or should this include reduced builds..?
16061    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
16062  else
16063    DEFINE_CROSS_COMPILE_ARCH=""
16064  fi
16065
16066
16067  # Convert openjdk platform names to hotspot names
16068
16069  HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
16070  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16071    HOTSPOT_BUILD_OS=bsd
16072  fi
16073
16074
16075  HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
16076  if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
16077    HOTSPOT_BUILD_OS_TYPE=posix
16078  fi
16079
16080
16081  HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
16082  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16083    HOTSPOT_BUILD_CPU=x86_32
16084  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16085    HOTSPOT_BUILD_CPU=sparc
16086  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16087    HOTSPOT_BUILD_CPU=ppc_64
16088  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16089    HOTSPOT_BUILD_CPU=ppc_64
16090  fi
16091
16092
16093  # This is identical with OPENJDK_*, but define anyway for consistency.
16094  HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
16095
16096
16097  # Setup HOTSPOT_BUILD_CPU_DEFINE
16098  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16099    HOTSPOT_BUILD_CPU_DEFINE=IA32
16100  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16101    HOTSPOT_BUILD_CPU_DEFINE=AMD64
16102  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16103    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16104  elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
16105    HOTSPOT_BUILD_CPU_DEFINE=AARCH64
16106  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16107    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16108  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16109    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16110
16111  # The cpu defines below are for zero, we don't support them directly.
16112  elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
16113    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16114  elif test "x$OPENJDK_BUILD_CPU" = xppc; then
16115    HOTSPOT_BUILD_CPU_DEFINE=PPC32
16116  elif test "x$OPENJDK_BUILD_CPU" = xs390; then
16117    HOTSPOT_BUILD_CPU_DEFINE=S390
16118  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
16119    HOTSPOT_BUILD_CPU_DEFINE=S390
16120  elif test "x$OPENJDK_BUILD_CPU" != x; then
16121    HOTSPOT_BUILD_CPU_DEFINE=$(echo $OPENJDK_BUILD_CPU | tr a-z A-Z)
16122  fi
16123
16124
16125
16126
16127  # ZERO_ARCHDEF is used to enable architecture-specific code.
16128  # This is used in legacy hotspot build.
16129  ZERO_ARCHDEF="$HOTSPOT_TARGET_CPU_DEFINE"
16130
16131
16132
16133
16134
16135# Continue setting up basic stuff. Most remaining code require fundamental tools.
16136
16137  # Save the current directory this script was started from
16138  CURDIR="$PWD"
16139
16140  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
16141  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
16142  # was not available at that time.
16143  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
16144  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
16145    ORIGINAL_PATH="$REWRITTEN_PATH"
16146    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
16147$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
16148  fi
16149
16150  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16151    PATH_SEP=";"
16152
16153  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
16154  if test $SRC_ROOT_LENGTH -gt 100; then
16155    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
16156  fi
16157
16158  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16159    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
16160$as_echo_n "checking cygwin release... " >&6; }
16161    CYGWIN_VERSION=`$UNAME -r`
16162    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
16163$as_echo "$CYGWIN_VERSION" >&6; }
16164    WINDOWS_ENV_VENDOR='cygwin'
16165    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
16166
16167    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
16168    if test "x$CYGWIN_VERSION_OLD" != x; then
16169      { $as_echo "$as_me:${as_lineno-$LINENO}: Your cygwin is too old. You are running $CYGWIN_VERSION, but at least cygwin 1.7 is required. Please upgrade." >&5
16170$as_echo "$as_me: Your cygwin is too old. You are running $CYGWIN_VERSION, but at least cygwin 1.7 is required. Please upgrade." >&6;}
16171      as_fn_error $? "Cannot continue" "$LINENO" 5
16172    fi
16173    if test "x$CYGPATH" = x; then
16174      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
16175    fi
16176    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
16177$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
16178    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16179    cygwin_winpath_root=`cd / ; cmd /c cd | $GREP ".*"`
16180    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
16181    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
16182    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
16183$as_echo "$CYGWIN_ROOT_PATH" >&6; }
16184    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
16185    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
16186    if test "x$test_cygdrive_prefix" = x; then
16187      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
16188    fi
16189  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16190    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
16191$as_echo_n "checking msys release... " >&6; }
16192    MSYS_VERSION=`$UNAME -r`
16193    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
16194$as_echo "$MSYS_VERSION" >&6; }
16195
16196    WINDOWS_ENV_VENDOR='msys'
16197    WINDOWS_ENV_VERSION="$MSYS_VERSION"
16198
16199    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
16200$as_echo_n "checking msys root directory as unix-style path... " >&6; }
16201    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16202    MSYS_ROOT_PATH=`cd / ; cmd /c cd | $GREP ".*"`
16203
16204  windows_path="$MSYS_ROOT_PATH"
16205  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16206    unix_path=`$CYGPATH -u "$windows_path"`
16207    MSYS_ROOT_PATH="$unix_path"
16208  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16209    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16210    MSYS_ROOT_PATH="$unix_path"
16211  fi
16212
16213    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
16214$as_echo "$MSYS_ROOT_PATH" >&6; }
16215    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
16216  else
16217    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
16218  fi
16219
16220  # Test if windows or unix (cygwin/msys) find is first in path.
16221  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
16222$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
16223  FIND_BINARY_OUTPUT=`find --version 2>&1`
16224  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
16225    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
16226$as_echo "unix style" >&6; }
16227  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
16228    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
16229$as_echo "Windows" >&6; }
16230    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
16231$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
16232    { $as_echo "$as_me:${as_lineno-$LINENO}: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&5
16233$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
16234    as_fn_error $? "Cannot continue" "$LINENO" 5
16235  else
16236    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
16237$as_echo "unknown" >&6; }
16238    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
16239$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
16240  fi
16241
16242  else
16243    PATH_SEP=":"
16244  fi
16245
16246
16247  # We get the top-level directory from the supporting wrappers.
16248  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
16249$as_echo_n "checking for top-level directory... " >&6; }
16250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
16251$as_echo "$TOPDIR" >&6; }
16252
16253
16254  # Save the original version of TOPDIR for string comparisons
16255  ORIGINAL_TOPDIR="$TOPDIR"
16256
16257
16258  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
16259
16260  # Only process if variable expands to non-empty
16261
16262  if test "x$CURDIR" != x; then
16263    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16264
16265  # Input might be given as Windows format, start by converting to
16266  # unix format.
16267  path="$CURDIR"
16268  new_path=`$CYGPATH -u "$path"`
16269
16270  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16271  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16272  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16273  # "foo.exe" is OK but "foo" is an error.
16274  #
16275  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16276  # It is also a way to make sure we got the proper file name for the real test later on.
16277  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16278  if test "x$test_shortpath" = x; then
16279    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16280$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16281    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
16282  fi
16283
16284  # Call helper function which possibly converts this using DOS-style short mode.
16285  # If so, the updated path is stored in $new_path.
16286
16287  input_path="$new_path"
16288  # Check if we need to convert this using DOS-style short mode. If the path
16289  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16290  # take no chances and rewrite it.
16291  # Note: m4 eats our [], so we need to use [ and ] instead.
16292  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16293  if test "x$has_forbidden_chars" != x; then
16294    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16295    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16296    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16297    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16298      # Going to short mode and back again did indeed matter. Since short mode is
16299      # case insensitive, let's make it lowercase to improve readability.
16300      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16301      # Now convert it back to Unix-style (cygpath)
16302      input_path=`$CYGPATH -u "$shortmode_path"`
16303      new_path="$input_path"
16304    fi
16305  fi
16306
16307  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16308  if test "x$test_cygdrive_prefix" = x; then
16309    # As a simple fix, exclude /usr/bin since it's not a real path.
16310    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16311      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16312      # a path prefixed by /cygdrive for fixpath to work.
16313      new_path="$CYGWIN_ROOT_PATH$input_path"
16314    fi
16315  fi
16316
16317
16318  if test "x$path" != "x$new_path"; then
16319    CURDIR="$new_path"
16320    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16321$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16322  fi
16323
16324    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16325
16326  path="$CURDIR"
16327  has_colon=`$ECHO $path | $GREP ^.:`
16328  new_path="$path"
16329  if test "x$has_colon" = x; then
16330    # Not in mixed or Windows style, start by that.
16331    new_path=`cmd //c echo $path`
16332  fi
16333
16334
16335  input_path="$new_path"
16336  # Check if we need to convert this using DOS-style short mode. If the path
16337  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16338  # take no chances and rewrite it.
16339  # Note: m4 eats our [], so we need to use [ and ] instead.
16340  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16341  if test "x$has_forbidden_chars" != x; then
16342    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16343    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16344  fi
16345
16346
16347  windows_path="$new_path"
16348  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16349    unix_path=`$CYGPATH -u "$windows_path"`
16350    new_path="$unix_path"
16351  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16352    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16353    new_path="$unix_path"
16354  fi
16355
16356  if test "x$path" != "x$new_path"; then
16357    CURDIR="$new_path"
16358    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16359$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16360  fi
16361
16362  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16363  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16364
16365    else
16366      # We're on a unix platform. Hooray! :)
16367      path="$CURDIR"
16368      has_space=`$ECHO "$path" | $GREP " "`
16369      if test "x$has_space" != x; then
16370        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16371$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16372        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16373      fi
16374
16375      # Use eval to expand a potential ~
16376      eval path="$path"
16377      if test ! -f "$path" && test ! -d "$path"; then
16378        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16379      fi
16380
16381      if test -d "$path"; then
16382        CURDIR="`cd "$path"; $THEPWDCMD -L`"
16383      else
16384        dir="`$DIRNAME "$path"`"
16385        base="`$BASENAME "$path"`"
16386        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16387      fi
16388    fi
16389  fi
16390
16391
16392  # Only process if variable expands to non-empty
16393
16394  if test "x$TOPDIR" != x; then
16395    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16396
16397  # Input might be given as Windows format, start by converting to
16398  # unix format.
16399  path="$TOPDIR"
16400  new_path=`$CYGPATH -u "$path"`
16401
16402  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16403  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16404  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16405  # "foo.exe" is OK but "foo" is an error.
16406  #
16407  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16408  # It is also a way to make sure we got the proper file name for the real test later on.
16409  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16410  if test "x$test_shortpath" = x; then
16411    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16412$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16413    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
16414  fi
16415
16416  # Call helper function which possibly converts this using DOS-style short mode.
16417  # If so, the updated path is stored in $new_path.
16418
16419  input_path="$new_path"
16420  # Check if we need to convert this using DOS-style short mode. If the path
16421  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16422  # take no chances and rewrite it.
16423  # Note: m4 eats our [], so we need to use [ and ] instead.
16424  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16425  if test "x$has_forbidden_chars" != x; then
16426    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16427    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16428    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16429    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16430      # Going to short mode and back again did indeed matter. Since short mode is
16431      # case insensitive, let's make it lowercase to improve readability.
16432      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16433      # Now convert it back to Unix-style (cygpath)
16434      input_path=`$CYGPATH -u "$shortmode_path"`
16435      new_path="$input_path"
16436    fi
16437  fi
16438
16439  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16440  if test "x$test_cygdrive_prefix" = x; then
16441    # As a simple fix, exclude /usr/bin since it's not a real path.
16442    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16443      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16444      # a path prefixed by /cygdrive for fixpath to work.
16445      new_path="$CYGWIN_ROOT_PATH$input_path"
16446    fi
16447  fi
16448
16449
16450  if test "x$path" != "x$new_path"; then
16451    TOPDIR="$new_path"
16452    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16453$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16454  fi
16455
16456    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16457
16458  path="$TOPDIR"
16459  has_colon=`$ECHO $path | $GREP ^.:`
16460  new_path="$path"
16461  if test "x$has_colon" = x; then
16462    # Not in mixed or Windows style, start by that.
16463    new_path=`cmd //c echo $path`
16464  fi
16465
16466
16467  input_path="$new_path"
16468  # Check if we need to convert this using DOS-style short mode. If the path
16469  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16470  # take no chances and rewrite it.
16471  # Note: m4 eats our [], so we need to use [ and ] instead.
16472  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16473  if test "x$has_forbidden_chars" != x; then
16474    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16475    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16476  fi
16477
16478
16479  windows_path="$new_path"
16480  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16481    unix_path=`$CYGPATH -u "$windows_path"`
16482    new_path="$unix_path"
16483  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16484    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16485    new_path="$unix_path"
16486  fi
16487
16488  if test "x$path" != "x$new_path"; then
16489    TOPDIR="$new_path"
16490    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16491$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16492  fi
16493
16494  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16495  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16496
16497    else
16498      # We're on a unix platform. Hooray! :)
16499      path="$TOPDIR"
16500      has_space=`$ECHO "$path" | $GREP " "`
16501      if test "x$has_space" != x; then
16502        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16503$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16504        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16505      fi
16506
16507      # Use eval to expand a potential ~
16508      eval path="$path"
16509      if test ! -f "$path" && test ! -d "$path"; then
16510        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16511      fi
16512
16513      if test -d "$path"; then
16514        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16515      else
16516        dir="`$DIRNAME "$path"`"
16517        base="`$BASENAME "$path"`"
16518        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16519      fi
16520    fi
16521  fi
16522
16523  # SRC_ROOT is a traditional alias for TOPDIR.
16524  SRC_ROOT=$TOPDIR
16525
16526  # Calculate a canonical version of TOPDIR for string comparisons
16527  CANONICAL_TOPDIR=$TOPDIR
16528
16529  if test "x$OPENJDK_BUILD_OS" != xwindows; then
16530    # Follow a chain of symbolic links. Use readlink
16531    # where it exists, else fall back to horribly
16532    # complicated shell code.
16533    if test "x$READLINK_TESTED" != yes; then
16534      # On MacOSX there is a readlink tool with a different
16535      # purpose than the GNU readlink tool. Check the found readlink.
16536      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16537      if test "x$ISGNU" = x; then
16538        # A readlink that we do not know how to use.
16539        # Are there other non-GNU readlinks out there?
16540        READLINK_TESTED=yes
16541        READLINK=
16542      fi
16543    fi
16544
16545    if test "x$READLINK" != x; then
16546      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16547    else
16548      # Save the current directory for restoring afterwards
16549      STARTDIR=$PWD
16550      COUNTER=0
16551      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16552      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16553      cd $sym_link_dir
16554      # Use -P flag to resolve symlinks in directories.
16555      cd `$THEPWDCMD -P`
16556      sym_link_dir=`$THEPWDCMD -P`
16557      # Resolve file symlinks
16558      while test $COUNTER -lt 20; do
16559        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16560        if test "x$ISLINK" == x; then
16561          # This is not a symbolic link! We are done!
16562          break
16563        fi
16564        # Again resolve directory symlinks since the target of the just found
16565        # link could be in a different directory
16566        cd `$DIRNAME $ISLINK`
16567        sym_link_dir=`$THEPWDCMD -P`
16568        sym_link_file=`$BASENAME $ISLINK`
16569        let COUNTER=COUNTER+1
16570      done
16571      cd $STARTDIR
16572      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16573    fi
16574  fi
16575
16576
16577
16578  # Locate the directory of this script.
16579  AUTOCONF_DIR=$TOPDIR/common/autoconf
16580
16581  # Setup username (for use in adhoc version strings etc)
16582  # Outer [ ] to quote m4.
16583   USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16584
16585
16586
16587# Check if it's a pure open build or if custom sources are to be used.
16588
16589  # Check whether --enable-openjdk-only was given.
16590if test "${enable_openjdk_only+set}" = set; then :
16591  enableval=$enable_openjdk_only;
16592else
16593  enable_openjdk_only="no"
16594fi
16595
16596
16597  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if custom source is suppressed (openjdk-only)" >&5
16598$as_echo_n "checking if custom source is suppressed (openjdk-only)... " >&6; }
16599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_openjdk_only" >&5
16600$as_echo "$enable_openjdk_only" >&6; }
16601  if test "x$enable_openjdk_only" = "xyes"; then
16602    SUPPRESS_CUSTOM_EXTENSIONS="true"
16603  elif test "x$enable_openjdk_only" = "xno"; then
16604    SUPPRESS_CUSTOM_EXTENSIONS="false"
16605  else
16606    as_fn_error $? "Invalid value for --enable-openjdk-only: $enable_openjdk_only" "$LINENO" 5
16607  fi
16608
16609  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16610  # the IncludeCustomExtension macro.
16611
16612
16613# Check whether --with-custom-make-dir was given.
16614if test "${with_custom_make_dir+set}" = set; then :
16615  withval=$with_custom_make_dir; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&5
16616$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16617fi
16618
16619
16620
16621
16622# These are needed to be able to create a configuration name (and thus the output directory)
16623
16624  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16625$as_echo_n "checking which variant of the JDK to build... " >&6; }
16626
16627# Check whether --with-jdk-variant was given.
16628if test "${with_jdk_variant+set}" = set; then :
16629  withval=$with_jdk_variant;
16630fi
16631
16632
16633  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16634    JDK_VARIANT="normal"
16635  else
16636    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16637  fi
16638
16639
16640
16641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16642$as_echo "$JDK_VARIANT" >&6; }
16643
16644
16645  DEBUG_LEVEL="release"
16646  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16647$as_echo_n "checking which debug level to use... " >&6; }
16648  # Check whether --enable-debug was given.
16649if test "${enable_debug+set}" = set; then :
16650  enableval=$enable_debug;
16651        ENABLE_DEBUG="${enableval}"
16652        DEBUG_LEVEL="fastdebug"
16653
16654else
16655  ENABLE_DEBUG="no"
16656fi
16657
16658
16659
16660# Check whether --with-debug-level was given.
16661if test "${with_debug_level+set}" = set; then :
16662  withval=$with_debug_level;
16663        DEBUG_LEVEL="${withval}"
16664        if test "x$ENABLE_DEBUG" = xyes; then
16665          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16666        fi
16667
16668fi
16669
16670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16671$as_echo "$DEBUG_LEVEL" >&6; }
16672
16673  if test "x$DEBUG_LEVEL" != xrelease && \
16674      test "x$DEBUG_LEVEL" != xoptimized && \
16675      test "x$DEBUG_LEVEL" != xfastdebug && \
16676      test "x$DEBUG_LEVEL" != xslowdebug; then
16677    as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16678  fi
16679
16680  # Translate DEBUG_LEVEL to debug level used by Hotspot
16681  HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16682  if test "x$DEBUG_LEVEL" = xrelease; then
16683    HOTSPOT_DEBUG_LEVEL="product"
16684  elif test "x$DEBUG_LEVEL" = xslowdebug; then
16685    HOTSPOT_DEBUG_LEVEL="debug"
16686  fi
16687
16688  if test "x$DEBUG_LEVEL" = xoptimized; then
16689    # The debug level 'optimized' is a little special because it is currently only
16690    # applicable to the HotSpot build where it means to build a completely
16691    # optimized version of the VM without any debugging code (like for the
16692    # 'release' debug level which is called 'product' in the HotSpot build) but
16693    # with the exception that it can contain additional code which is otherwise
16694    # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16695    # test new and/or experimental features which are not intended for customer
16696    # shipment. Because these new features need to be tested and benchmarked in
16697    # real world scenarios, we want to build the containing JDK at the 'release'
16698    # debug level.
16699    DEBUG_LEVEL="release"
16700  fi
16701
16702
16703
16704
16705
16706
16707# Check whether --with-jvm-variants was given.
16708if test "${with_jvm_variants+set}" = set; then :
16709  withval=$with_jvm_variants;
16710fi
16711
16712
16713  if test "x$with_jvm_variants" = x; then
16714    with_jvm_variants="server"
16715  fi
16716  JVM_VARIANTS_OPT="$with_jvm_variants"
16717
16718  # Has the user listed more than one variant?
16719  # Additional [] needed to keep m4 from mangling shell constructs.
16720  if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
16721    BUILDING_MULTIPLE_JVM_VARIANTS=true
16722  else
16723    BUILDING_MULTIPLE_JVM_VARIANTS=false
16724  fi
16725  # Replace the commas with AND for use in the build directory name.
16726  JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
16727
16728  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
16729$as_echo_n "checking which variants of the JVM to build... " >&6; }
16730  # JVM_VARIANTS is a space-separated list.
16731  # Also use minimal, not minimal1 (which is kept for backwards compatibility).
16732  JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
16733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
16734$as_echo "$JVM_VARIANTS" >&6; }
16735
16736  # Check that the selected variants are valid
16737
16738  # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
16739  # Notice that the original variant failes on SLES 10 and 11
16740  NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
16741  STACK=${JVM_VARIANTS// /$'\n'}
16742  INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16743  if test "x$INVALID_VARIANTS" != x; then
16744    { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
16745$as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
16746    as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
16747  fi
16748
16749  # All "special" variants share the same output directory ("server")
16750  VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
16751  NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
16752  STACK=${JVM_VARIANTS// /$'\n'}
16753  INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16754  if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
16755    as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
16756  fi
16757
16758
16759
16760
16761  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
16762    # zero behaves as a platform and rewrites these values. This is really weird. :(
16763    # We are guaranteed that we do not build any other variants when building zero.
16764    HOTSPOT_TARGET_CPU=zero
16765    HOTSPOT_TARGET_CPU_ARCH=zero
16766  fi
16767
16768
16769# With basic setup done, call the custom early hook.
16770
16771
16772# Check if we have devkits, extra paths or sysroot set.
16773
16774
16775# Check whether --with-devkit was given.
16776if test "${with_devkit+set}" = set; then :
16777  withval=$with_devkit;
16778
16779  # Only process if variable expands to non-empty
16780
16781  if test "x$with_devkit" != x; then
16782    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16783
16784  # Input might be given as Windows format, start by converting to
16785  # unix format.
16786  path="$with_devkit"
16787  new_path=`$CYGPATH -u "$path"`
16788
16789  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16790  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16791  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16792  # "foo.exe" is OK but "foo" is an error.
16793  #
16794  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16795  # It is also a way to make sure we got the proper file name for the real test later on.
16796  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16797  if test "x$test_shortpath" = x; then
16798    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16799$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16800    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
16801  fi
16802
16803  # Call helper function which possibly converts this using DOS-style short mode.
16804  # If so, the updated path is stored in $new_path.
16805
16806  input_path="$new_path"
16807  # Check if we need to convert this using DOS-style short mode. If the path
16808  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16809  # take no chances and rewrite it.
16810  # Note: m4 eats our [], so we need to use [ and ] instead.
16811  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16812  if test "x$has_forbidden_chars" != x; then
16813    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16814    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16815    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16816    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16817      # Going to short mode and back again did indeed matter. Since short mode is
16818      # case insensitive, let's make it lowercase to improve readability.
16819      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16820      # Now convert it back to Unix-style (cygpath)
16821      input_path=`$CYGPATH -u "$shortmode_path"`
16822      new_path="$input_path"
16823    fi
16824  fi
16825
16826  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16827  if test "x$test_cygdrive_prefix" = x; then
16828    # As a simple fix, exclude /usr/bin since it's not a real path.
16829    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16830      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16831      # a path prefixed by /cygdrive for fixpath to work.
16832      new_path="$CYGWIN_ROOT_PATH$input_path"
16833    fi
16834  fi
16835
16836
16837  if test "x$path" != "x$new_path"; then
16838    with_devkit="$new_path"
16839    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16840$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16841  fi
16842
16843    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16844
16845  path="$with_devkit"
16846  has_colon=`$ECHO $path | $GREP ^.:`
16847  new_path="$path"
16848  if test "x$has_colon" = x; then
16849    # Not in mixed or Windows style, start by that.
16850    new_path=`cmd //c echo $path`
16851  fi
16852
16853
16854  input_path="$new_path"
16855  # Check if we need to convert this using DOS-style short mode. If the path
16856  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16857  # take no chances and rewrite it.
16858  # Note: m4 eats our [], so we need to use [ and ] instead.
16859  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16860  if test "x$has_forbidden_chars" != x; then
16861    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16862    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16863  fi
16864
16865
16866  windows_path="$new_path"
16867  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16868    unix_path=`$CYGPATH -u "$windows_path"`
16869    new_path="$unix_path"
16870  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16871    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16872    new_path="$unix_path"
16873  fi
16874
16875  if test "x$path" != "x$new_path"; then
16876    with_devkit="$new_path"
16877    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16878$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16879  fi
16880
16881  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16882  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16883
16884    else
16885      # We're on a unix platform. Hooray! :)
16886      path="$with_devkit"
16887      has_space=`$ECHO "$path" | $GREP " "`
16888      if test "x$has_space" != x; then
16889        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16890$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16891        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16892      fi
16893
16894      # Use eval to expand a potential ~
16895      eval path="$path"
16896      if test ! -f "$path" && test ! -d "$path"; then
16897        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
16898      fi
16899
16900      if test -d "$path"; then
16901        with_devkit="`cd "$path"; $THEPWDCMD -L`"
16902      else
16903        dir="`$DIRNAME "$path"`"
16904        base="`$BASENAME "$path"`"
16905        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
16906      fi
16907    fi
16908  fi
16909
16910        DEVKIT_ROOT="$with_devkit"
16911        # Check for a meta data info file in the root of the devkit
16912        if test -f "$DEVKIT_ROOT/devkit.info"; then
16913          . $DEVKIT_ROOT/devkit.info
16914          # This potentially sets the following:
16915          # A descriptive name of the devkit
16916
16917  if test "x$DEVKIT_NAME" = x; then
16918    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
16919  fi
16920
16921          # Corresponds to --with-extra-path
16922
16923  if test "x$DEVKIT_EXTRA_PATH" = x; then
16924    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
16925  fi
16926
16927          # Corresponds to --with-toolchain-path
16928
16929  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16930    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
16931  fi
16932
16933          # Corresponds to --with-sysroot
16934
16935  if test "x$DEVKIT_SYSROOT" = x; then
16936    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
16937  fi
16938
16939
16940          # Identifies the Visual Studio version in the devkit
16941
16942  if test "x$DEVKIT_VS_VERSION" = x; then
16943    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
16944  fi
16945
16946          # The Visual Studio include environment variable
16947
16948  if test "x$DEVKIT_VS_INCLUDE" = x; then
16949    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
16950  fi
16951
16952          # The Visual Studio lib environment variable
16953
16954  if test "x$DEVKIT_VS_LIB" = x; then
16955    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
16956  fi
16957
16958          # Corresponds to --with-msvcr-dll
16959
16960  if test "x$DEVKIT_MSVCR_DLL" = x; then
16961    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
16962  fi
16963
16964          # Corresponds to --with-msvcp-dll
16965
16966  if test "x$DEVKIT_MSVCP_DLL" = x; then
16967    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
16968  fi
16969
16970        fi
16971
16972        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
16973$as_echo_n "checking for devkit... " >&6; }
16974        if test "x$DEVKIT_NAME" != x; then
16975          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
16976$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
16977        else
16978          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
16979$as_echo "$DEVKIT_ROOT" >&6; }
16980        fi
16981
16982
16983  if test "x$DEVKIT_EXTRA_PATH" != x; then
16984    if test "x$EXTRA_PATH" = x; then
16985      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
16986    else
16987      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
16988    fi
16989  fi
16990
16991
16992        # Fallback default of just /bin if DEVKIT_PATH is not defined
16993        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16994          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
16995        fi
16996
16997  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
16998    if test "x$TOOLCHAIN_PATH" = x; then
16999      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
17000    else
17001      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
17002    fi
17003  fi
17004
17005
17006        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
17007        # places for backwards compatiblity.
17008        if test "x$DEVKIT_SYSROOT" != x; then
17009          SYSROOT="$DEVKIT_SYSROOT"
17010        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
17011          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
17012        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
17013          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
17014        fi
17015
17016
17017fi
17018
17019
17020  # You can force the sysroot if the sysroot encoded into the compiler tools
17021  # is not correct.
17022
17023# Check whether --with-sys-root was given.
17024if test "${with_sys_root+set}" = set; then :
17025  withval=$with_sys_root; SYSROOT=$with_sys_root
17026
17027fi
17028
17029
17030
17031# Check whether --with-sysroot was given.
17032if test "${with_sysroot+set}" = set; then :
17033  withval=$with_sysroot; SYSROOT=$with_sysroot
17034
17035fi
17036
17037
17038
17039# Check whether --with-tools-dir was given.
17040if test "${with_tools_dir+set}" = set; then :
17041  withval=$with_tools_dir;
17042  if test "x$with_tools_dir" != x; then
17043    if test "x$TOOLCHAIN_PATH" = x; then
17044      TOOLCHAIN_PATH="$with_tools_dir"
17045    else
17046      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
17047    fi
17048  fi
17049
17050
17051fi
17052
17053
17054
17055# Check whether --with-toolchain-path was given.
17056if test "${with_toolchain_path+set}" = set; then :
17057  withval=$with_toolchain_path;
17058  if test "x$with_toolchain_path" != x; then
17059    if test "x$TOOLCHAIN_PATH" = x; then
17060      TOOLCHAIN_PATH="$with_toolchain_path"
17061    else
17062      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
17063    fi
17064  fi
17065
17066
17067fi
17068
17069
17070
17071# Check whether --with-extra-path was given.
17072if test "${with_extra_path+set}" = set; then :
17073  withval=$with_extra_path;
17074  if test "x$with_extra_path" != x; then
17075    if test "x$EXTRA_PATH" = x; then
17076      EXTRA_PATH="$with_extra_path"
17077    else
17078      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
17079    fi
17080  fi
17081
17082
17083fi
17084
17085
17086  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
17087    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
17088    # If not, detect if Xcode is installed by running xcodebuild -version
17089    # if no Xcode installed, xcodebuild exits with 1
17090    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
17091    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
17092      # We need to use xcodebuild in the toolchain dir provided by the user, this will
17093      # fall back on the stub binary in /usr/bin/xcodebuild
17094      # Extract the first word of "xcodebuild", so it can be a program name with args.
17095set dummy xcodebuild; ac_word=$2
17096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17097$as_echo_n "checking for $ac_word... " >&6; }
17098if ${ac_cv_path_XCODEBUILD+:} false; then :
17099  $as_echo_n "(cached) " >&6
17100else
17101  case $XCODEBUILD in
17102  [\\/]* | ?:[\\/]*)
17103  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
17104  ;;
17105  *)
17106  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17107for as_dir in $TOOLCHAIN_PATH
17108do
17109  IFS=$as_save_IFS
17110  test -z "$as_dir" && as_dir=.
17111    for ac_exec_ext in '' $ac_executable_extensions; do
17112  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17113    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
17114    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17115    break 2
17116  fi
17117done
17118  done
17119IFS=$as_save_IFS
17120
17121  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
17122  ;;
17123esac
17124fi
17125XCODEBUILD=$ac_cv_path_XCODEBUILD
17126if test -n "$XCODEBUILD"; then
17127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
17128$as_echo "$XCODEBUILD" >&6; }
17129else
17130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17131$as_echo "no" >&6; }
17132fi
17133
17134
17135    else
17136      # this should result in SYSROOT being empty, unless --with-sysroot is provided
17137      # when only the command line tools are installed there are no SDKs, so headers
17138      # are copied into the system frameworks
17139      XCODEBUILD=
17140
17141    fi
17142
17143    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
17144$as_echo_n "checking for sdk name... " >&6; }
17145
17146# Check whether --with-sdk-name was given.
17147if test "${with_sdk_name+set}" = set; then :
17148  withval=$with_sdk_name; SDKNAME=$with_sdk_name
17149
17150fi
17151
17152    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
17153$as_echo "$SDKNAME" >&6; }
17154
17155    # if toolchain path is specified then don't rely on system headers, they may not compile
17156    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
17157    test -z "$TOOLCHAIN_PATH" && \
17158      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
17159
17160    if test -z "$SYSROOT"; then
17161      if test -n "$XCODEBUILD"; then
17162        # if we don't have system headers, use default SDK name (last resort)
17163        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17164          SDKNAME=${SDKNAME:-macosx}
17165        fi
17166
17167        if test -n "$SDKNAME"; then
17168          # Call xcodebuild to determine SYSROOT
17169          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | $GREP '^Path: ' | $SED 's/Path: //'`
17170        fi
17171      else
17172        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17173          as_fn_error $? "No xcodebuild tool and no system framework headers found, use --with-sysroot or --with-sdk-name to provide a path to a valid SDK" "$LINENO" 5
17174        fi
17175      fi
17176    else
17177      # warn user if --with-sdk-name was also set
17178      if test -n "$with_sdk_name"; then
17179        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
17180$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
17181      fi
17182    fi
17183
17184    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
17185      # If no system framework headers, then SYSROOT must be set, or we won't build
17186      as_fn_error $? "Unable to determine SYSROOT and no headers found in /System/Library/Frameworks. Check Xcode configuration, --with-sysroot or --with-sdk-name arguments." "$LINENO" 5
17187    fi
17188
17189    # Perform a basic sanity test
17190    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
17191      if test -z "$SYSROOT"; then
17192        as_fn_error $? "Unable to find required framework headers, provide a path to an SDK via --with-sysroot or --with-sdk-name and be sure Xcode is installed properly" "$LINENO" 5
17193      else
17194        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
17195      fi
17196    fi
17197
17198    # set SDKROOT too, Xcode tools will pick it up
17199    SDKROOT=$SYSROOT
17200
17201  fi
17202
17203  # Prepend the extra path to the global path
17204
17205  if test "x$EXTRA_PATH" != x; then
17206    if test "x$PATH" = x; then
17207      PATH="$EXTRA_PATH"
17208    else
17209      PATH="$EXTRA_PATH:$PATH"
17210    fi
17211  fi
17212
17213
17214  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
17215$as_echo_n "checking for sysroot... " >&6; }
17216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
17217$as_echo "$SYSROOT" >&6; }
17218  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
17219$as_echo_n "checking for toolchain path... " >&6; }
17220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
17221$as_echo "$TOOLCHAIN_PATH" >&6; }
17222  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
17223$as_echo_n "checking for extra path... " >&6; }
17224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
17225$as_echo "$EXTRA_PATH" >&6; }
17226
17227
17228# To properly create a configuration name, we need to have the OpenJDK target
17229# and options (variants and debug level) parsed.
17230
17231
17232
17233# Check whether --with-conf-name was given.
17234if test "${with_conf_name+set}" = set; then :
17235  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
17236fi
17237
17238
17239  # Test from where we are running configure, in or outside of src root.
17240  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
17241$as_echo_n "checking where to store configuration... " >&6; }
17242  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
17243      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
17244      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
17245    # We are running configure from the src root.
17246    # Create a default ./build/target-variant-debuglevel output root.
17247    if test "x${CONF_NAME}" = x; then
17248      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
17249$as_echo "in default location" >&6; }
17250      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
17251    else
17252      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
17253$as_echo "in build directory with custom name" >&6; }
17254    fi
17255    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
17256    $MKDIR -p "$OUTPUT_ROOT"
17257    if test ! -d "$OUTPUT_ROOT"; then
17258      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
17259    fi
17260  else
17261    # We are running configure from outside of the src dir.
17262    # Then use the current directory as output dir!
17263    # If configuration is situated in normal build directory, just use the build
17264    # directory name as configuration name, otherwise use the complete path.
17265    if test "x${CONF_NAME}" = x; then
17266      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
17267    fi
17268    OUTPUT_ROOT="$CURDIR"
17269    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
17270$as_echo "in current directory" >&6; }
17271
17272    # WARNING: This might be a bad thing to do. You need to be sure you want to
17273    # have a configuration in this directory. Do some sanity checks!
17274
17275    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
17276      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
17277      # other files
17278      files_present=`$LS $OUTPUT_ROOT`
17279      # Configure has already touched config.log and confdefs.h in the current dir when this check
17280      # is performed.
17281      filtered_files=`$ECHO "$files_present" \
17282          | $SED -e 's/config.log//g' \
17283              -e 's/configure.log//g' \
17284              -e 's/confdefs.h//g' \
17285              -e 's/ //g' \
17286          | $TR -d '\n'`
17287      if test "x$filtered_files" != x; then
17288        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
17289$as_echo "$as_me: Current directory is $CURDIR." >&6;}
17290        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
17291$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
17292        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
17293$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
17294        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
17295$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
17296        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
17297$as_echo "$as_me: seriously mess up just about everything." >&6;}
17298        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
17299$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
17300        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
17301$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
17302        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
17303      fi
17304    fi
17305  fi
17306  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
17307$as_echo_n "checking what configuration name to use... " >&6; }
17308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
17309$as_echo "$CONF_NAME" >&6; }
17310
17311
17312  # Only process if variable expands to non-empty
17313
17314  if test "x$OUTPUT_ROOT" != x; then
17315    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17316
17317  # Input might be given as Windows format, start by converting to
17318  # unix format.
17319  path="$OUTPUT_ROOT"
17320  new_path=`$CYGPATH -u "$path"`
17321
17322  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17323  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17324  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17325  # "foo.exe" is OK but "foo" is an error.
17326  #
17327  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17328  # It is also a way to make sure we got the proper file name for the real test later on.
17329  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17330  if test "x$test_shortpath" = x; then
17331    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17332$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17333    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
17334  fi
17335
17336  # Call helper function which possibly converts this using DOS-style short mode.
17337  # If so, the updated path is stored in $new_path.
17338
17339  input_path="$new_path"
17340  # Check if we need to convert this using DOS-style short mode. If the path
17341  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17342  # take no chances and rewrite it.
17343  # Note: m4 eats our [], so we need to use [ and ] instead.
17344  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17345  if test "x$has_forbidden_chars" != x; then
17346    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17347    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17348    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17349    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17350      # Going to short mode and back again did indeed matter. Since short mode is
17351      # case insensitive, let's make it lowercase to improve readability.
17352      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17353      # Now convert it back to Unix-style (cygpath)
17354      input_path=`$CYGPATH -u "$shortmode_path"`
17355      new_path="$input_path"
17356    fi
17357  fi
17358
17359  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17360  if test "x$test_cygdrive_prefix" = x; then
17361    # As a simple fix, exclude /usr/bin since it's not a real path.
17362    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17363      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17364      # a path prefixed by /cygdrive for fixpath to work.
17365      new_path="$CYGWIN_ROOT_PATH$input_path"
17366    fi
17367  fi
17368
17369
17370  if test "x$path" != "x$new_path"; then
17371    OUTPUT_ROOT="$new_path"
17372    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17373$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17374  fi
17375
17376    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17377
17378  path="$OUTPUT_ROOT"
17379  has_colon=`$ECHO $path | $GREP ^.:`
17380  new_path="$path"
17381  if test "x$has_colon" = x; then
17382    # Not in mixed or Windows style, start by that.
17383    new_path=`cmd //c echo $path`
17384  fi
17385
17386
17387  input_path="$new_path"
17388  # Check if we need to convert this using DOS-style short mode. If the path
17389  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17390  # take no chances and rewrite it.
17391  # Note: m4 eats our [], so we need to use [ and ] instead.
17392  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17393  if test "x$has_forbidden_chars" != x; then
17394    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17395    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17396  fi
17397
17398
17399  windows_path="$new_path"
17400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17401    unix_path=`$CYGPATH -u "$windows_path"`
17402    new_path="$unix_path"
17403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17404    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17405    new_path="$unix_path"
17406  fi
17407
17408  if test "x$path" != "x$new_path"; then
17409    OUTPUT_ROOT="$new_path"
17410    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17411$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17412  fi
17413
17414  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17415  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17416
17417    else
17418      # We're on a unix platform. Hooray! :)
17419      path="$OUTPUT_ROOT"
17420      has_space=`$ECHO "$path" | $GREP " "`
17421      if test "x$has_space" != x; then
17422        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17423$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17424        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17425      fi
17426
17427      # Use eval to expand a potential ~
17428      eval path="$path"
17429      if test ! -f "$path" && test ! -d "$path"; then
17430        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
17431      fi
17432
17433      if test -d "$path"; then
17434        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
17435      else
17436        dir="`$DIRNAME "$path"`"
17437        base="`$BASENAME "$path"`"
17438        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
17439      fi
17440    fi
17441  fi
17442
17443
17444  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
17445  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
17446
17447  SPEC=$OUTPUT_ROOT/spec.gmk
17448
17449  CONF_NAME=$CONF_NAME
17450
17451  OUTPUT_ROOT=$OUTPUT_ROOT
17452
17453
17454
17455  # The spec.gmk file contains all variables for the make system.
17456  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17457
17458  # The bootcycle-spec.gmk file contains support for boot cycle builds.
17459  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17460
17461  # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17462  ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17463
17464  # The compare.sh is used to compare the build output to other builds.
17465  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17466
17467  # The generated Makefile knows where the spec.gmk is and where the source is.
17468  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17469  # which will look for generated configurations
17470  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17471
17472
17473
17474# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17475
17476  for ac_prog in apt-get yum port pkgutil pkgadd
17477do
17478  # Extract the first word of "$ac_prog", so it can be a program name with args.
17479set dummy $ac_prog; ac_word=$2
17480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17481$as_echo_n "checking for $ac_word... " >&6; }
17482if ${ac_cv_prog_PKGHANDLER+:} false; then :
17483  $as_echo_n "(cached) " >&6
17484else
17485  if test -n "$PKGHANDLER"; then
17486  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17487else
17488as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17489for as_dir in $PATH
17490do
17491  IFS=$as_save_IFS
17492  test -z "$as_dir" && as_dir=.
17493    for ac_exec_ext in '' $ac_executable_extensions; do
17494  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17495    ac_cv_prog_PKGHANDLER="$ac_prog"
17496    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17497    break 2
17498  fi
17499done
17500  done
17501IFS=$as_save_IFS
17502
17503fi
17504fi
17505PKGHANDLER=$ac_cv_prog_PKGHANDLER
17506if test -n "$PKGHANDLER"; then
17507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17508$as_echo "$PKGHANDLER" >&6; }
17509else
17510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17511$as_echo "no" >&6; }
17512fi
17513
17514
17515  test -n "$PKGHANDLER" && break
17516done
17517
17518
17519
17520# Setup tools that requires more complex handling, or that is not needed by the configure script.
17521
17522
17523
17524  # Publish this variable in the help.
17525
17526
17527  if [ -z "${MAKE+x}" ]; then
17528    # The variable is not set by user, try to locate tool using the code snippet
17529
17530    # Try our hardest to locate a correct version of GNU make
17531    for ac_prog in gmake
17532do
17533  # Extract the first word of "$ac_prog", so it can be a program name with args.
17534set dummy $ac_prog; ac_word=$2
17535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17536$as_echo_n "checking for $ac_word... " >&6; }
17537if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17538  $as_echo_n "(cached) " >&6
17539else
17540  case $CHECK_GMAKE in
17541  [\\/]* | ?:[\\/]*)
17542  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17543  ;;
17544  *)
17545  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17546for as_dir in $PATH
17547do
17548  IFS=$as_save_IFS
17549  test -z "$as_dir" && as_dir=.
17550    for ac_exec_ext in '' $ac_executable_extensions; do
17551  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17552    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17553    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17554    break 2
17555  fi
17556done
17557  done
17558IFS=$as_save_IFS
17559
17560  ;;
17561esac
17562fi
17563CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17564if test -n "$CHECK_GMAKE"; then
17565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17566$as_echo "$CHECK_GMAKE" >&6; }
17567else
17568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17569$as_echo "no" >&6; }
17570fi
17571
17572
17573  test -n "$CHECK_GMAKE" && break
17574done
17575
17576
17577  MAKE_CANDIDATE=""$CHECK_GMAKE""
17578  DESCRIPTION="gmake in PATH"
17579
17580  # On Cygwin, we require a newer version of make than on other platforms
17581  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17582    MAKE_VERSION_EXPR="-e 4\."
17583    MAKE_REQUIRED_VERSION="4.0"
17584   else
17585    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17586    MAKE_REQUIRED_VERSION="3.81"
17587  fi
17588
17589  if test "x$MAKE_CANDIDATE" != x; then
17590    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17591$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17592    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17593    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17594    if test "x$IS_GNU_MAKE" = x; then
17595      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17596$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17597    else
17598      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17599      if test "x$IS_MODERN_MAKE" = x; then
17600        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
17601$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
17602      else
17603        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17604          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17605            MAKE_EXPECTED_ENV='cygwin'
17606          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17607            MAKE_EXPECTED_ENV='msys'
17608          else
17609            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17610          fi
17611          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17612          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17613        else
17614          # Not relevant for non-Windows
17615          IS_MAKE_CORRECT_ENV=true
17616        fi
17617        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17618          { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5
17619$as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;}
17620        else
17621          FOUND_MAKE=$MAKE_CANDIDATE
17622
17623  # Only process if variable expands to non-empty
17624
17625  if test "x$FOUND_MAKE" != x; then
17626    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17627
17628  # First separate the path from the arguments. This will split at the first
17629  # space.
17630  complete="$FOUND_MAKE"
17631  path="${complete%% *}"
17632  tmp="$complete EOL"
17633  arguments="${tmp#* }"
17634
17635  # Input might be given as Windows format, start by converting to
17636  # unix format.
17637  new_path=`$CYGPATH -u "$path"`
17638
17639  # Now try to locate executable using which
17640  new_path=`$WHICH "$new_path" 2> /dev/null`
17641  # bat and cmd files are not always considered executable in cygwin causing which
17642  # to not find them
17643  if test "x$new_path" = x \
17644      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17645      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17646    new_path=`$CYGPATH -u "$path"`
17647  fi
17648  if test "x$new_path" = x; then
17649    # Oops. Which didn't find the executable.
17650    # The splitting of arguments from the executable at a space might have been incorrect,
17651    # since paths with space are more likely in Windows. Give it another try with the whole
17652    # argument.
17653    path="$complete"
17654    arguments="EOL"
17655    new_path=`$CYGPATH -u "$path"`
17656    new_path=`$WHICH "$new_path" 2> /dev/null`
17657    # bat and cmd files are not always considered executable in cygwin causing which
17658    # to not find them
17659    if test "x$new_path" = x \
17660        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17661        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17662      new_path=`$CYGPATH -u "$path"`
17663    fi
17664    if test "x$new_path" = x; then
17665      # It's still not found. Now this is an unrecoverable error.
17666      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17667$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17668      has_space=`$ECHO "$complete" | $GREP " "`
17669      if test "x$has_space" != x; then
17670        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17671$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17672      fi
17673      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17674    fi
17675  fi
17676
17677  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17678  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17679  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17680  # "foo.exe" is OK but "foo" is an error.
17681  #
17682  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17683  # It is also a way to make sure we got the proper file name for the real test later on.
17684  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17685  if test "x$test_shortpath" = x; then
17686    # Short path failed, file does not exist as specified.
17687    # Try adding .exe or .cmd
17688    if test -f "${new_path}.exe"; then
17689      input_to_shortpath="${new_path}.exe"
17690    elif test -f "${new_path}.cmd"; then
17691      input_to_shortpath="${new_path}.cmd"
17692    else
17693      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17694$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17695      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17696$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17697      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17698    fi
17699  else
17700    input_to_shortpath="$new_path"
17701  fi
17702
17703  # Call helper function which possibly converts this using DOS-style short mode.
17704  # If so, the updated path is stored in $new_path.
17705  new_path="$input_to_shortpath"
17706
17707  input_path="$input_to_shortpath"
17708  # Check if we need to convert this using DOS-style short mode. If the path
17709  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17710  # take no chances and rewrite it.
17711  # Note: m4 eats our [], so we need to use [ and ] instead.
17712  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17713  if test "x$has_forbidden_chars" != x; then
17714    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17715    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17716    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17717    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17718      # Going to short mode and back again did indeed matter. Since short mode is
17719      # case insensitive, let's make it lowercase to improve readability.
17720      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17721      # Now convert it back to Unix-style (cygpath)
17722      input_path=`$CYGPATH -u "$shortmode_path"`
17723      new_path="$input_path"
17724    fi
17725  fi
17726
17727  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17728  if test "x$test_cygdrive_prefix" = x; then
17729    # As a simple fix, exclude /usr/bin since it's not a real path.
17730    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17731      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17732      # a path prefixed by /cygdrive for fixpath to work.
17733      new_path="$CYGWIN_ROOT_PATH$input_path"
17734    fi
17735  fi
17736
17737  # remove trailing .exe if any
17738  new_path="${new_path/%.exe/}"
17739
17740    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17741
17742  # First separate the path from the arguments. This will split at the first
17743  # space.
17744  complete="$FOUND_MAKE"
17745  path="${complete%% *}"
17746  tmp="$complete EOL"
17747  arguments="${tmp#* }"
17748
17749  # Input might be given as Windows format, start by converting to
17750  # unix format.
17751  new_path="$path"
17752
17753  windows_path="$new_path"
17754  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17755    unix_path=`$CYGPATH -u "$windows_path"`
17756    new_path="$unix_path"
17757  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17758    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17759    new_path="$unix_path"
17760  fi
17761
17762
17763  # Now try to locate executable using which
17764  new_path=`$WHICH "$new_path" 2> /dev/null`
17765
17766  if test "x$new_path" = x; then
17767    # Oops. Which didn't find the executable.
17768    # The splitting of arguments from the executable at a space might have been incorrect,
17769    # since paths with space are more likely in Windows. Give it another try with the whole
17770    # argument.
17771    path="$complete"
17772    arguments="EOL"
17773    new_path="$path"
17774
17775  windows_path="$new_path"
17776  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17777    unix_path=`$CYGPATH -u "$windows_path"`
17778    new_path="$unix_path"
17779  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17780    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17781    new_path="$unix_path"
17782  fi
17783
17784
17785    new_path=`$WHICH "$new_path" 2> /dev/null`
17786    # bat and cmd files are not always considered executable in MSYS causing which
17787    # to not find them
17788    if test "x$new_path" = x \
17789        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17790        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17791      new_path="$path"
17792
17793  windows_path="$new_path"
17794  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17795    unix_path=`$CYGPATH -u "$windows_path"`
17796    new_path="$unix_path"
17797  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17798    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17799    new_path="$unix_path"
17800  fi
17801
17802    fi
17803
17804    if test "x$new_path" = x; then
17805      # It's still not found. Now this is an unrecoverable error.
17806      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17807$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17808      has_space=`$ECHO "$complete" | $GREP " "`
17809      if test "x$has_space" != x; then
17810        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17811$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17812      fi
17813      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17814    fi
17815  fi
17816
17817  # Now new_path has a complete unix path to the binary
17818  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17819    # Keep paths in /bin as-is, but remove trailing .exe if any
17820    new_path="${new_path/%.exe/}"
17821    # Do not save /bin paths to all_fixpath_prefixes!
17822  else
17823    # Not in mixed or Windows style, start by that.
17824    new_path=`cmd //c echo $new_path`
17825
17826  input_path="$new_path"
17827  # Check if we need to convert this using DOS-style short mode. If the path
17828  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17829  # take no chances and rewrite it.
17830  # Note: m4 eats our [], so we need to use [ and ] instead.
17831  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17832  if test "x$has_forbidden_chars" != x; then
17833    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17834    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17835  fi
17836
17837    # Output is in $new_path
17838
17839  windows_path="$new_path"
17840  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17841    unix_path=`$CYGPATH -u "$windows_path"`
17842    new_path="$unix_path"
17843  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17844    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17845    new_path="$unix_path"
17846  fi
17847
17848    # remove trailing .exe if any
17849    new_path="${new_path/%.exe/}"
17850
17851    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17852    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17853  fi
17854
17855    else
17856      # We're on a unix platform. Hooray! :)
17857      # First separate the path from the arguments. This will split at the first
17858      # space.
17859      complete="$FOUND_MAKE"
17860      path="${complete%% *}"
17861      tmp="$complete EOL"
17862      arguments="${tmp#* }"
17863
17864      # Cannot rely on the command "which" here since it doesn't always work.
17865      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17866      if test -z "$is_absolute_path"; then
17867        # Path to executable is not absolute. Find it.
17868        IFS_save="$IFS"
17869        IFS=:
17870        for p in $PATH; do
17871          if test -f "$p/$path" && test -x "$p/$path"; then
17872            new_path="$p/$path"
17873            break
17874          fi
17875        done
17876        IFS="$IFS_save"
17877      else
17878        # This is an absolute path, we can use it without further modifications.
17879        new_path="$path"
17880      fi
17881
17882      if test "x$new_path" = x; then
17883        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17884$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17885        has_space=`$ECHO "$complete" | $GREP " "`
17886        if test "x$has_space" != x; then
17887          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17888$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17889        fi
17890        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17891      fi
17892    fi
17893
17894    # Now join together the path and the arguments once again
17895    if test "x$arguments" != xEOL; then
17896      new_complete="$new_path ${arguments% *}"
17897    else
17898      new_complete="$new_path"
17899    fi
17900
17901    if test "x$complete" != "x$new_complete"; then
17902      FOUND_MAKE="$new_complete"
17903      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17904$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17905    fi
17906  fi
17907
17908        fi
17909      fi
17910    fi
17911  fi
17912
17913
17914    if test "x$FOUND_MAKE" = x; then
17915      for ac_prog in make
17916do
17917  # Extract the first word of "$ac_prog", so it can be a program name with args.
17918set dummy $ac_prog; ac_word=$2
17919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17920$as_echo_n "checking for $ac_word... " >&6; }
17921if ${ac_cv_path_CHECK_MAKE+:} false; then :
17922  $as_echo_n "(cached) " >&6
17923else
17924  case $CHECK_MAKE in
17925  [\\/]* | ?:[\\/]*)
17926  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
17927  ;;
17928  *)
17929  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17930for as_dir in $PATH
17931do
17932  IFS=$as_save_IFS
17933  test -z "$as_dir" && as_dir=.
17934    for ac_exec_ext in '' $ac_executable_extensions; do
17935  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17936    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
17937    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17938    break 2
17939  fi
17940done
17941  done
17942IFS=$as_save_IFS
17943
17944  ;;
17945esac
17946fi
17947CHECK_MAKE=$ac_cv_path_CHECK_MAKE
17948if test -n "$CHECK_MAKE"; then
17949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
17950$as_echo "$CHECK_MAKE" >&6; }
17951else
17952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17953$as_echo "no" >&6; }
17954fi
17955
17956
17957  test -n "$CHECK_MAKE" && break
17958done
17959
17960
17961  MAKE_CANDIDATE=""$CHECK_MAKE""
17962  DESCRIPTION="make in PATH"
17963
17964  # On Cygwin, we require a newer version of make than on other platforms
17965  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17966    MAKE_VERSION_EXPR="-e 4\."
17967    MAKE_REQUIRED_VERSION="4.0"
17968   else
17969    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17970    MAKE_REQUIRED_VERSION="3.81"
17971  fi
17972
17973  if test "x$MAKE_CANDIDATE" != x; then
17974    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17975$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17976    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17977    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17978    if test "x$IS_GNU_MAKE" = x; then
17979      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17980$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17981    else
17982      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17983      if test "x$IS_MODERN_MAKE" = x; then
17984        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
17985$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
17986      else
17987        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17988          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17989            MAKE_EXPECTED_ENV='cygwin'
17990          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17991            MAKE_EXPECTED_ENV='msys'
17992          else
17993            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17994          fi
17995          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17996          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17997        else
17998          # Not relevant for non-Windows
17999          IS_MAKE_CORRECT_ENV=true
18000        fi
18001        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18002          { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5
18003$as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;}
18004        else
18005          FOUND_MAKE=$MAKE_CANDIDATE
18006
18007  # Only process if variable expands to non-empty
18008
18009  if test "x$FOUND_MAKE" != x; then
18010    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18011
18012  # First separate the path from the arguments. This will split at the first
18013  # space.
18014  complete="$FOUND_MAKE"
18015  path="${complete%% *}"
18016  tmp="$complete EOL"
18017  arguments="${tmp#* }"
18018
18019  # Input might be given as Windows format, start by converting to
18020  # unix format.
18021  new_path=`$CYGPATH -u "$path"`
18022
18023  # Now try to locate executable using which
18024  new_path=`$WHICH "$new_path" 2> /dev/null`
18025  # bat and cmd files are not always considered executable in cygwin causing which
18026  # to not find them
18027  if test "x$new_path" = x \
18028      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18029      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18030    new_path=`$CYGPATH -u "$path"`
18031  fi
18032  if test "x$new_path" = x; then
18033    # Oops. Which didn't find the executable.
18034    # The splitting of arguments from the executable at a space might have been incorrect,
18035    # since paths with space are more likely in Windows. Give it another try with the whole
18036    # argument.
18037    path="$complete"
18038    arguments="EOL"
18039    new_path=`$CYGPATH -u "$path"`
18040    new_path=`$WHICH "$new_path" 2> /dev/null`
18041    # bat and cmd files are not always considered executable in cygwin causing which
18042    # to not find them
18043    if test "x$new_path" = x \
18044        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18045        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18046      new_path=`$CYGPATH -u "$path"`
18047    fi
18048    if test "x$new_path" = x; then
18049      # It's still not found. Now this is an unrecoverable error.
18050      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18051$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18052      has_space=`$ECHO "$complete" | $GREP " "`
18053      if test "x$has_space" != x; then
18054        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18055$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18056      fi
18057      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18058    fi
18059  fi
18060
18061  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18062  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18063  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18064  # "foo.exe" is OK but "foo" is an error.
18065  #
18066  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18067  # It is also a way to make sure we got the proper file name for the real test later on.
18068  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18069  if test "x$test_shortpath" = x; then
18070    # Short path failed, file does not exist as specified.
18071    # Try adding .exe or .cmd
18072    if test -f "${new_path}.exe"; then
18073      input_to_shortpath="${new_path}.exe"
18074    elif test -f "${new_path}.cmd"; then
18075      input_to_shortpath="${new_path}.cmd"
18076    else
18077      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18078$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18079      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18080$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18081      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18082    fi
18083  else
18084    input_to_shortpath="$new_path"
18085  fi
18086
18087  # Call helper function which possibly converts this using DOS-style short mode.
18088  # If so, the updated path is stored in $new_path.
18089  new_path="$input_to_shortpath"
18090
18091  input_path="$input_to_shortpath"
18092  # Check if we need to convert this using DOS-style short mode. If the path
18093  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18094  # take no chances and rewrite it.
18095  # Note: m4 eats our [], so we need to use [ and ] instead.
18096  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18097  if test "x$has_forbidden_chars" != x; then
18098    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18099    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18100    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18101    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18102      # Going to short mode and back again did indeed matter. Since short mode is
18103      # case insensitive, let's make it lowercase to improve readability.
18104      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18105      # Now convert it back to Unix-style (cygpath)
18106      input_path=`$CYGPATH -u "$shortmode_path"`
18107      new_path="$input_path"
18108    fi
18109  fi
18110
18111  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18112  if test "x$test_cygdrive_prefix" = x; then
18113    # As a simple fix, exclude /usr/bin since it's not a real path.
18114    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18115      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18116      # a path prefixed by /cygdrive for fixpath to work.
18117      new_path="$CYGWIN_ROOT_PATH$input_path"
18118    fi
18119  fi
18120
18121  # remove trailing .exe if any
18122  new_path="${new_path/%.exe/}"
18123
18124    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18125
18126  # First separate the path from the arguments. This will split at the first
18127  # space.
18128  complete="$FOUND_MAKE"
18129  path="${complete%% *}"
18130  tmp="$complete EOL"
18131  arguments="${tmp#* }"
18132
18133  # Input might be given as Windows format, start by converting to
18134  # unix format.
18135  new_path="$path"
18136
18137  windows_path="$new_path"
18138  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18139    unix_path=`$CYGPATH -u "$windows_path"`
18140    new_path="$unix_path"
18141  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18142    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18143    new_path="$unix_path"
18144  fi
18145
18146
18147  # Now try to locate executable using which
18148  new_path=`$WHICH "$new_path" 2> /dev/null`
18149
18150  if test "x$new_path" = x; then
18151    # Oops. Which didn't find the executable.
18152    # The splitting of arguments from the executable at a space might have been incorrect,
18153    # since paths with space are more likely in Windows. Give it another try with the whole
18154    # argument.
18155    path="$complete"
18156    arguments="EOL"
18157    new_path="$path"
18158
18159  windows_path="$new_path"
18160  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18161    unix_path=`$CYGPATH -u "$windows_path"`
18162    new_path="$unix_path"
18163  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18164    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18165    new_path="$unix_path"
18166  fi
18167
18168
18169    new_path=`$WHICH "$new_path" 2> /dev/null`
18170    # bat and cmd files are not always considered executable in MSYS causing which
18171    # to not find them
18172    if test "x$new_path" = x \
18173        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18174        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18175      new_path="$path"
18176
18177  windows_path="$new_path"
18178  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18179    unix_path=`$CYGPATH -u "$windows_path"`
18180    new_path="$unix_path"
18181  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18182    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18183    new_path="$unix_path"
18184  fi
18185
18186    fi
18187
18188    if test "x$new_path" = x; then
18189      # It's still not found. Now this is an unrecoverable error.
18190      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18191$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18192      has_space=`$ECHO "$complete" | $GREP " "`
18193      if test "x$has_space" != x; then
18194        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18195$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18196      fi
18197      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18198    fi
18199  fi
18200
18201  # Now new_path has a complete unix path to the binary
18202  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18203    # Keep paths in /bin as-is, but remove trailing .exe if any
18204    new_path="${new_path/%.exe/}"
18205    # Do not save /bin paths to all_fixpath_prefixes!
18206  else
18207    # Not in mixed or Windows style, start by that.
18208    new_path=`cmd //c echo $new_path`
18209
18210  input_path="$new_path"
18211  # Check if we need to convert this using DOS-style short mode. If the path
18212  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18213  # take no chances and rewrite it.
18214  # Note: m4 eats our [], so we need to use [ and ] instead.
18215  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18216  if test "x$has_forbidden_chars" != x; then
18217    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18218    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18219  fi
18220
18221    # Output is in $new_path
18222
18223  windows_path="$new_path"
18224  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18225    unix_path=`$CYGPATH -u "$windows_path"`
18226    new_path="$unix_path"
18227  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18228    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18229    new_path="$unix_path"
18230  fi
18231
18232    # remove trailing .exe if any
18233    new_path="${new_path/%.exe/}"
18234
18235    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18236    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18237  fi
18238
18239    else
18240      # We're on a unix platform. Hooray! :)
18241      # First separate the path from the arguments. This will split at the first
18242      # space.
18243      complete="$FOUND_MAKE"
18244      path="${complete%% *}"
18245      tmp="$complete EOL"
18246      arguments="${tmp#* }"
18247
18248      # Cannot rely on the command "which" here since it doesn't always work.
18249      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18250      if test -z "$is_absolute_path"; then
18251        # Path to executable is not absolute. Find it.
18252        IFS_save="$IFS"
18253        IFS=:
18254        for p in $PATH; do
18255          if test -f "$p/$path" && test -x "$p/$path"; then
18256            new_path="$p/$path"
18257            break
18258          fi
18259        done
18260        IFS="$IFS_save"
18261      else
18262        # This is an absolute path, we can use it without further modifications.
18263        new_path="$path"
18264      fi
18265
18266      if test "x$new_path" = x; then
18267        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18268$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18269        has_space=`$ECHO "$complete" | $GREP " "`
18270        if test "x$has_space" != x; then
18271          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18272$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18273        fi
18274        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18275      fi
18276    fi
18277
18278    # Now join together the path and the arguments once again
18279    if test "x$arguments" != xEOL; then
18280      new_complete="$new_path ${arguments% *}"
18281    else
18282      new_complete="$new_path"
18283    fi
18284
18285    if test "x$complete" != "x$new_complete"; then
18286      FOUND_MAKE="$new_complete"
18287      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18288$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18289    fi
18290  fi
18291
18292        fi
18293      fi
18294    fi
18295  fi
18296
18297    fi
18298
18299    if test "x$FOUND_MAKE" = x; then
18300      if test "x$TOOLCHAIN_PATH" != x; then
18301        # We have a toolchain path, check that as well before giving up.
18302        OLD_PATH=$PATH
18303        PATH=$TOOLCHAIN_PATH:$PATH
18304        for ac_prog in gmake
18305do
18306  # Extract the first word of "$ac_prog", so it can be a program name with args.
18307set dummy $ac_prog; ac_word=$2
18308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18309$as_echo_n "checking for $ac_word... " >&6; }
18310if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18311  $as_echo_n "(cached) " >&6
18312else
18313  case $CHECK_TOOLSDIR_GMAKE in
18314  [\\/]* | ?:[\\/]*)
18315  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18316  ;;
18317  *)
18318  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18319for as_dir in $PATH
18320do
18321  IFS=$as_save_IFS
18322  test -z "$as_dir" && as_dir=.
18323    for ac_exec_ext in '' $ac_executable_extensions; do
18324  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18325    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18326    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18327    break 2
18328  fi
18329done
18330  done
18331IFS=$as_save_IFS
18332
18333  ;;
18334esac
18335fi
18336CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18337if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18339$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18340else
18341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18342$as_echo "no" >&6; }
18343fi
18344
18345
18346  test -n "$CHECK_TOOLSDIR_GMAKE" && break
18347done
18348
18349
18350  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18351  DESCRIPTION="gmake in tools-dir"
18352
18353  # On Cygwin, we require a newer version of make than on other platforms
18354  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18355    MAKE_VERSION_EXPR="-e 4\."
18356    MAKE_REQUIRED_VERSION="4.0"
18357   else
18358    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18359    MAKE_REQUIRED_VERSION="3.81"
18360  fi
18361
18362  if test "x$MAKE_CANDIDATE" != x; then
18363    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18364$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18365    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18366    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18367    if test "x$IS_GNU_MAKE" = x; then
18368      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18369$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18370    else
18371      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18372      if test "x$IS_MODERN_MAKE" = x; then
18373        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
18374$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
18375      else
18376        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18377          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18378            MAKE_EXPECTED_ENV='cygwin'
18379          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18380            MAKE_EXPECTED_ENV='msys'
18381          else
18382            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18383          fi
18384          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18385          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18386        else
18387          # Not relevant for non-Windows
18388          IS_MAKE_CORRECT_ENV=true
18389        fi
18390        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18391          { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5
18392$as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;}
18393        else
18394          FOUND_MAKE=$MAKE_CANDIDATE
18395
18396  # Only process if variable expands to non-empty
18397
18398  if test "x$FOUND_MAKE" != x; then
18399    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18400
18401  # First separate the path from the arguments. This will split at the first
18402  # space.
18403  complete="$FOUND_MAKE"
18404  path="${complete%% *}"
18405  tmp="$complete EOL"
18406  arguments="${tmp#* }"
18407
18408  # Input might be given as Windows format, start by converting to
18409  # unix format.
18410  new_path=`$CYGPATH -u "$path"`
18411
18412  # Now try to locate executable using which
18413  new_path=`$WHICH "$new_path" 2> /dev/null`
18414  # bat and cmd files are not always considered executable in cygwin causing which
18415  # to not find them
18416  if test "x$new_path" = x \
18417      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18418      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18419    new_path=`$CYGPATH -u "$path"`
18420  fi
18421  if test "x$new_path" = x; then
18422    # Oops. Which didn't find the executable.
18423    # The splitting of arguments from the executable at a space might have been incorrect,
18424    # since paths with space are more likely in Windows. Give it another try with the whole
18425    # argument.
18426    path="$complete"
18427    arguments="EOL"
18428    new_path=`$CYGPATH -u "$path"`
18429    new_path=`$WHICH "$new_path" 2> /dev/null`
18430    # bat and cmd files are not always considered executable in cygwin causing which
18431    # to not find them
18432    if test "x$new_path" = x \
18433        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18434        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18435      new_path=`$CYGPATH -u "$path"`
18436    fi
18437    if test "x$new_path" = x; then
18438      # It's still not found. Now this is an unrecoverable error.
18439      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18440$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18441      has_space=`$ECHO "$complete" | $GREP " "`
18442      if test "x$has_space" != x; then
18443        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18444$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18445      fi
18446      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18447    fi
18448  fi
18449
18450  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18451  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18452  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18453  # "foo.exe" is OK but "foo" is an error.
18454  #
18455  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18456  # It is also a way to make sure we got the proper file name for the real test later on.
18457  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18458  if test "x$test_shortpath" = x; then
18459    # Short path failed, file does not exist as specified.
18460    # Try adding .exe or .cmd
18461    if test -f "${new_path}.exe"; then
18462      input_to_shortpath="${new_path}.exe"
18463    elif test -f "${new_path}.cmd"; then
18464      input_to_shortpath="${new_path}.cmd"
18465    else
18466      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18467$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18468      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18469$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18470      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18471    fi
18472  else
18473    input_to_shortpath="$new_path"
18474  fi
18475
18476  # Call helper function which possibly converts this using DOS-style short mode.
18477  # If so, the updated path is stored in $new_path.
18478  new_path="$input_to_shortpath"
18479
18480  input_path="$input_to_shortpath"
18481  # Check if we need to convert this using DOS-style short mode. If the path
18482  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18483  # take no chances and rewrite it.
18484  # Note: m4 eats our [], so we need to use [ and ] instead.
18485  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18486  if test "x$has_forbidden_chars" != x; then
18487    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18488    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18489    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18490    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18491      # Going to short mode and back again did indeed matter. Since short mode is
18492      # case insensitive, let's make it lowercase to improve readability.
18493      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18494      # Now convert it back to Unix-style (cygpath)
18495      input_path=`$CYGPATH -u "$shortmode_path"`
18496      new_path="$input_path"
18497    fi
18498  fi
18499
18500  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18501  if test "x$test_cygdrive_prefix" = x; then
18502    # As a simple fix, exclude /usr/bin since it's not a real path.
18503    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18504      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18505      # a path prefixed by /cygdrive for fixpath to work.
18506      new_path="$CYGWIN_ROOT_PATH$input_path"
18507    fi
18508  fi
18509
18510  # remove trailing .exe if any
18511  new_path="${new_path/%.exe/}"
18512
18513    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18514
18515  # First separate the path from the arguments. This will split at the first
18516  # space.
18517  complete="$FOUND_MAKE"
18518  path="${complete%% *}"
18519  tmp="$complete EOL"
18520  arguments="${tmp#* }"
18521
18522  # Input might be given as Windows format, start by converting to
18523  # unix format.
18524  new_path="$path"
18525
18526  windows_path="$new_path"
18527  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18528    unix_path=`$CYGPATH -u "$windows_path"`
18529    new_path="$unix_path"
18530  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18531    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18532    new_path="$unix_path"
18533  fi
18534
18535
18536  # Now try to locate executable using which
18537  new_path=`$WHICH "$new_path" 2> /dev/null`
18538
18539  if test "x$new_path" = x; then
18540    # Oops. Which didn't find the executable.
18541    # The splitting of arguments from the executable at a space might have been incorrect,
18542    # since paths with space are more likely in Windows. Give it another try with the whole
18543    # argument.
18544    path="$complete"
18545    arguments="EOL"
18546    new_path="$path"
18547
18548  windows_path="$new_path"
18549  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18550    unix_path=`$CYGPATH -u "$windows_path"`
18551    new_path="$unix_path"
18552  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18553    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18554    new_path="$unix_path"
18555  fi
18556
18557
18558    new_path=`$WHICH "$new_path" 2> /dev/null`
18559    # bat and cmd files are not always considered executable in MSYS causing which
18560    # to not find them
18561    if test "x$new_path" = x \
18562        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18563        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18564      new_path="$path"
18565
18566  windows_path="$new_path"
18567  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18568    unix_path=`$CYGPATH -u "$windows_path"`
18569    new_path="$unix_path"
18570  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18571    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18572    new_path="$unix_path"
18573  fi
18574
18575    fi
18576
18577    if test "x$new_path" = x; then
18578      # It's still not found. Now this is an unrecoverable error.
18579      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18580$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18581      has_space=`$ECHO "$complete" | $GREP " "`
18582      if test "x$has_space" != x; then
18583        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18584$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18585      fi
18586      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18587    fi
18588  fi
18589
18590  # Now new_path has a complete unix path to the binary
18591  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18592    # Keep paths in /bin as-is, but remove trailing .exe if any
18593    new_path="${new_path/%.exe/}"
18594    # Do not save /bin paths to all_fixpath_prefixes!
18595  else
18596    # Not in mixed or Windows style, start by that.
18597    new_path=`cmd //c echo $new_path`
18598
18599  input_path="$new_path"
18600  # Check if we need to convert this using DOS-style short mode. If the path
18601  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18602  # take no chances and rewrite it.
18603  # Note: m4 eats our [], so we need to use [ and ] instead.
18604  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18605  if test "x$has_forbidden_chars" != x; then
18606    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18607    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18608  fi
18609
18610    # Output is in $new_path
18611
18612  windows_path="$new_path"
18613  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18614    unix_path=`$CYGPATH -u "$windows_path"`
18615    new_path="$unix_path"
18616  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18617    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18618    new_path="$unix_path"
18619  fi
18620
18621    # remove trailing .exe if any
18622    new_path="${new_path/%.exe/}"
18623
18624    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18625    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18626  fi
18627
18628    else
18629      # We're on a unix platform. Hooray! :)
18630      # First separate the path from the arguments. This will split at the first
18631      # space.
18632      complete="$FOUND_MAKE"
18633      path="${complete%% *}"
18634      tmp="$complete EOL"
18635      arguments="${tmp#* }"
18636
18637      # Cannot rely on the command "which" here since it doesn't always work.
18638      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18639      if test -z "$is_absolute_path"; then
18640        # Path to executable is not absolute. Find it.
18641        IFS_save="$IFS"
18642        IFS=:
18643        for p in $PATH; do
18644          if test -f "$p/$path" && test -x "$p/$path"; then
18645            new_path="$p/$path"
18646            break
18647          fi
18648        done
18649        IFS="$IFS_save"
18650      else
18651        # This is an absolute path, we can use it without further modifications.
18652        new_path="$path"
18653      fi
18654
18655      if test "x$new_path" = x; then
18656        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18657$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18658        has_space=`$ECHO "$complete" | $GREP " "`
18659        if test "x$has_space" != x; then
18660          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18661$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18662        fi
18663        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18664      fi
18665    fi
18666
18667    # Now join together the path and the arguments once again
18668    if test "x$arguments" != xEOL; then
18669      new_complete="$new_path ${arguments% *}"
18670    else
18671      new_complete="$new_path"
18672    fi
18673
18674    if test "x$complete" != "x$new_complete"; then
18675      FOUND_MAKE="$new_complete"
18676      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18677$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18678    fi
18679  fi
18680
18681        fi
18682      fi
18683    fi
18684  fi
18685
18686        if test "x$FOUND_MAKE" = x; then
18687          for ac_prog in make
18688do
18689  # Extract the first word of "$ac_prog", so it can be a program name with args.
18690set dummy $ac_prog; ac_word=$2
18691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18692$as_echo_n "checking for $ac_word... " >&6; }
18693if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
18694  $as_echo_n "(cached) " >&6
18695else
18696  case $CHECK_TOOLSDIR_MAKE in
18697  [\\/]* | ?:[\\/]*)
18698  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
18699  ;;
18700  *)
18701  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18702for as_dir in $PATH
18703do
18704  IFS=$as_save_IFS
18705  test -z "$as_dir" && as_dir=.
18706    for ac_exec_ext in '' $ac_executable_extensions; do
18707  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18708    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18709    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18710    break 2
18711  fi
18712done
18713  done
18714IFS=$as_save_IFS
18715
18716  ;;
18717esac
18718fi
18719CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18720if test -n "$CHECK_TOOLSDIR_MAKE"; then
18721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
18722$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
18723else
18724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18725$as_echo "no" >&6; }
18726fi
18727
18728
18729  test -n "$CHECK_TOOLSDIR_MAKE" && break
18730done
18731
18732
18733  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
18734  DESCRIPTION="make in tools-dir"
18735
18736  # On Cygwin, we require a newer version of make than on other platforms
18737  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18738    MAKE_VERSION_EXPR="-e 4\."
18739    MAKE_REQUIRED_VERSION="4.0"
18740   else
18741    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18742    MAKE_REQUIRED_VERSION="3.81"
18743  fi
18744
18745  if test "x$MAKE_CANDIDATE" != x; then
18746    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18747$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18748    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18749    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18750    if test "x$IS_GNU_MAKE" = x; then
18751      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18752$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18753    else
18754      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18755      if test "x$IS_MODERN_MAKE" = x; then
18756        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
18757$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
18758      else
18759        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18760          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18761            MAKE_EXPECTED_ENV='cygwin'
18762          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18763            MAKE_EXPECTED_ENV='msys'
18764          else
18765            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18766          fi
18767          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18768          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18769        else
18770          # Not relevant for non-Windows
18771          IS_MAKE_CORRECT_ENV=true
18772        fi
18773        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18774          { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5
18775$as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;}
18776        else
18777          FOUND_MAKE=$MAKE_CANDIDATE
18778
18779  # Only process if variable expands to non-empty
18780
18781  if test "x$FOUND_MAKE" != x; then
18782    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18783
18784  # First separate the path from the arguments. This will split at the first
18785  # space.
18786  complete="$FOUND_MAKE"
18787  path="${complete%% *}"
18788  tmp="$complete EOL"
18789  arguments="${tmp#* }"
18790
18791  # Input might be given as Windows format, start by converting to
18792  # unix format.
18793  new_path=`$CYGPATH -u "$path"`
18794
18795  # Now try to locate executable using which
18796  new_path=`$WHICH "$new_path" 2> /dev/null`
18797  # bat and cmd files are not always considered executable in cygwin causing which
18798  # to not find them
18799  if test "x$new_path" = x \
18800      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18801      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18802    new_path=`$CYGPATH -u "$path"`
18803  fi
18804  if test "x$new_path" = x; then
18805    # Oops. Which didn't find the executable.
18806    # The splitting of arguments from the executable at a space might have been incorrect,
18807    # since paths with space are more likely in Windows. Give it another try with the whole
18808    # argument.
18809    path="$complete"
18810    arguments="EOL"
18811    new_path=`$CYGPATH -u "$path"`
18812    new_path=`$WHICH "$new_path" 2> /dev/null`
18813    # bat and cmd files are not always considered executable in cygwin causing which
18814    # to not find them
18815    if test "x$new_path" = x \
18816        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18817        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18818      new_path=`$CYGPATH -u "$path"`
18819    fi
18820    if test "x$new_path" = x; then
18821      # It's still not found. Now this is an unrecoverable error.
18822      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18823$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18824      has_space=`$ECHO "$complete" | $GREP " "`
18825      if test "x$has_space" != x; then
18826        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18827$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18828      fi
18829      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18830    fi
18831  fi
18832
18833  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18834  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18835  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18836  # "foo.exe" is OK but "foo" is an error.
18837  #
18838  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18839  # It is also a way to make sure we got the proper file name for the real test later on.
18840  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18841  if test "x$test_shortpath" = x; then
18842    # Short path failed, file does not exist as specified.
18843    # Try adding .exe or .cmd
18844    if test -f "${new_path}.exe"; then
18845      input_to_shortpath="${new_path}.exe"
18846    elif test -f "${new_path}.cmd"; then
18847      input_to_shortpath="${new_path}.cmd"
18848    else
18849      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18850$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18851      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18852$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18853      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18854    fi
18855  else
18856    input_to_shortpath="$new_path"
18857  fi
18858
18859  # Call helper function which possibly converts this using DOS-style short mode.
18860  # If so, the updated path is stored in $new_path.
18861  new_path="$input_to_shortpath"
18862
18863  input_path="$input_to_shortpath"
18864  # Check if we need to convert this using DOS-style short mode. If the path
18865  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18866  # take no chances and rewrite it.
18867  # Note: m4 eats our [], so we need to use [ and ] instead.
18868  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18869  if test "x$has_forbidden_chars" != x; then
18870    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18871    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18872    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18873    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18874      # Going to short mode and back again did indeed matter. Since short mode is
18875      # case insensitive, let's make it lowercase to improve readability.
18876      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18877      # Now convert it back to Unix-style (cygpath)
18878      input_path=`$CYGPATH -u "$shortmode_path"`
18879      new_path="$input_path"
18880    fi
18881  fi
18882
18883  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18884  if test "x$test_cygdrive_prefix" = x; then
18885    # As a simple fix, exclude /usr/bin since it's not a real path.
18886    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18887      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18888      # a path prefixed by /cygdrive for fixpath to work.
18889      new_path="$CYGWIN_ROOT_PATH$input_path"
18890    fi
18891  fi
18892
18893  # remove trailing .exe if any
18894  new_path="${new_path/%.exe/}"
18895
18896    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18897
18898  # First separate the path from the arguments. This will split at the first
18899  # space.
18900  complete="$FOUND_MAKE"
18901  path="${complete%% *}"
18902  tmp="$complete EOL"
18903  arguments="${tmp#* }"
18904
18905  # Input might be given as Windows format, start by converting to
18906  # unix format.
18907  new_path="$path"
18908
18909  windows_path="$new_path"
18910  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18911    unix_path=`$CYGPATH -u "$windows_path"`
18912    new_path="$unix_path"
18913  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18914    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18915    new_path="$unix_path"
18916  fi
18917
18918
18919  # Now try to locate executable using which
18920  new_path=`$WHICH "$new_path" 2> /dev/null`
18921
18922  if test "x$new_path" = x; then
18923    # Oops. Which didn't find the executable.
18924    # The splitting of arguments from the executable at a space might have been incorrect,
18925    # since paths with space are more likely in Windows. Give it another try with the whole
18926    # argument.
18927    path="$complete"
18928    arguments="EOL"
18929    new_path="$path"
18930
18931  windows_path="$new_path"
18932  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18933    unix_path=`$CYGPATH -u "$windows_path"`
18934    new_path="$unix_path"
18935  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18936    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18937    new_path="$unix_path"
18938  fi
18939
18940
18941    new_path=`$WHICH "$new_path" 2> /dev/null`
18942    # bat and cmd files are not always considered executable in MSYS causing which
18943    # to not find them
18944    if test "x$new_path" = x \
18945        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18946        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18947      new_path="$path"
18948
18949  windows_path="$new_path"
18950  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18951    unix_path=`$CYGPATH -u "$windows_path"`
18952    new_path="$unix_path"
18953  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18954    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18955    new_path="$unix_path"
18956  fi
18957
18958    fi
18959
18960    if test "x$new_path" = x; then
18961      # It's still not found. Now this is an unrecoverable error.
18962      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18963$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18964      has_space=`$ECHO "$complete" | $GREP " "`
18965      if test "x$has_space" != x; then
18966        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18967$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18968      fi
18969      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18970    fi
18971  fi
18972
18973  # Now new_path has a complete unix path to the binary
18974  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18975    # Keep paths in /bin as-is, but remove trailing .exe if any
18976    new_path="${new_path/%.exe/}"
18977    # Do not save /bin paths to all_fixpath_prefixes!
18978  else
18979    # Not in mixed or Windows style, start by that.
18980    new_path=`cmd //c echo $new_path`
18981
18982  input_path="$new_path"
18983  # Check if we need to convert this using DOS-style short mode. If the path
18984  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18985  # take no chances and rewrite it.
18986  # Note: m4 eats our [], so we need to use [ and ] instead.
18987  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18988  if test "x$has_forbidden_chars" != x; then
18989    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18990    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18991  fi
18992
18993    # Output is in $new_path
18994
18995  windows_path="$new_path"
18996  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18997    unix_path=`$CYGPATH -u "$windows_path"`
18998    new_path="$unix_path"
18999  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19000    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19001    new_path="$unix_path"
19002  fi
19003
19004    # remove trailing .exe if any
19005    new_path="${new_path/%.exe/}"
19006
19007    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19008    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19009  fi
19010
19011    else
19012      # We're on a unix platform. Hooray! :)
19013      # First separate the path from the arguments. This will split at the first
19014      # space.
19015      complete="$FOUND_MAKE"
19016      path="${complete%% *}"
19017      tmp="$complete EOL"
19018      arguments="${tmp#* }"
19019
19020      # Cannot rely on the command "which" here since it doesn't always work.
19021      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19022      if test -z "$is_absolute_path"; then
19023        # Path to executable is not absolute. Find it.
19024        IFS_save="$IFS"
19025        IFS=:
19026        for p in $PATH; do
19027          if test -f "$p/$path" && test -x "$p/$path"; then
19028            new_path="$p/$path"
19029            break
19030          fi
19031        done
19032        IFS="$IFS_save"
19033      else
19034        # This is an absolute path, we can use it without further modifications.
19035        new_path="$path"
19036      fi
19037
19038      if test "x$new_path" = x; then
19039        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19040$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19041        has_space=`$ECHO "$complete" | $GREP " "`
19042        if test "x$has_space" != x; then
19043          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19044$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19045        fi
19046        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19047      fi
19048    fi
19049
19050    # Now join together the path and the arguments once again
19051    if test "x$arguments" != xEOL; then
19052      new_complete="$new_path ${arguments% *}"
19053    else
19054      new_complete="$new_path"
19055    fi
19056
19057    if test "x$complete" != "x$new_complete"; then
19058      FOUND_MAKE="$new_complete"
19059      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19060$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19061    fi
19062  fi
19063
19064        fi
19065      fi
19066    fi
19067  fi
19068
19069        fi
19070        PATH=$OLD_PATH
19071      fi
19072    fi
19073
19074    if test "x$FOUND_MAKE" = x; then
19075      as_fn_error $? "Cannot find GNU make $MAKE_REQUIRED_VERSION or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure." "$LINENO" 5
19076    fi
19077
19078  else
19079    # The variable is set, but is it from the command line or the environment?
19080
19081    # Try to remove the string !MAKE! from our list.
19082    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
19083    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19084      # If it failed, the variable was not from the command line. Ignore it,
19085      # but warn the user (except for BASH, which is always set by the calling BASH).
19086      if test "xMAKE" != xBASH; then
19087        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
19088$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
19089      fi
19090      # Try to locate tool using the code snippet
19091
19092    # Try our hardest to locate a correct version of GNU make
19093    for ac_prog in gmake
19094do
19095  # Extract the first word of "$ac_prog", so it can be a program name with args.
19096set dummy $ac_prog; ac_word=$2
19097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19098$as_echo_n "checking for $ac_word... " >&6; }
19099if ${ac_cv_path_CHECK_GMAKE+:} false; then :
19100  $as_echo_n "(cached) " >&6
19101else
19102  case $CHECK_GMAKE in
19103  [\\/]* | ?:[\\/]*)
19104  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
19105  ;;
19106  *)
19107  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19108for as_dir in $PATH
19109do
19110  IFS=$as_save_IFS
19111  test -z "$as_dir" && as_dir=.
19112    for ac_exec_ext in '' $ac_executable_extensions; do
19113  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19114    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19115    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19116    break 2
19117  fi
19118done
19119  done
19120IFS=$as_save_IFS
19121
19122  ;;
19123esac
19124fi
19125CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
19126if test -n "$CHECK_GMAKE"; then
19127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
19128$as_echo "$CHECK_GMAKE" >&6; }
19129else
19130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19131$as_echo "no" >&6; }
19132fi
19133
19134
19135  test -n "$CHECK_GMAKE" && break
19136done
19137
19138
19139  MAKE_CANDIDATE=""$CHECK_GMAKE""
19140  DESCRIPTION="gmake in PATH"
19141
19142  # On Cygwin, we require a newer version of make than on other platforms
19143  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19144    MAKE_VERSION_EXPR="-e 4\."
19145    MAKE_REQUIRED_VERSION="4.0"
19146   else
19147    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19148    MAKE_REQUIRED_VERSION="3.81"
19149  fi
19150
19151  if test "x$MAKE_CANDIDATE" != x; then
19152    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19153$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19154    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19155    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19156    if test "x$IS_GNU_MAKE" = x; then
19157      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19158$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19159    else
19160      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19161      if test "x$IS_MODERN_MAKE" = x; then
19162        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
19163$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
19164      else
19165        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19166          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19167            MAKE_EXPECTED_ENV='cygwin'
19168          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19169            MAKE_EXPECTED_ENV='msys'
19170          else
19171            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19172          fi
19173          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19174          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19175        else
19176          # Not relevant for non-Windows
19177          IS_MAKE_CORRECT_ENV=true
19178        fi
19179        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19180          { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5
19181$as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;}
19182        else
19183          FOUND_MAKE=$MAKE_CANDIDATE
19184
19185  # Only process if variable expands to non-empty
19186
19187  if test "x$FOUND_MAKE" != x; then
19188    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19189
19190  # First separate the path from the arguments. This will split at the first
19191  # space.
19192  complete="$FOUND_MAKE"
19193  path="${complete%% *}"
19194  tmp="$complete EOL"
19195  arguments="${tmp#* }"
19196
19197  # Input might be given as Windows format, start by converting to
19198  # unix format.
19199  new_path=`$CYGPATH -u "$path"`
19200
19201  # Now try to locate executable using which
19202  new_path=`$WHICH "$new_path" 2> /dev/null`
19203  # bat and cmd files are not always considered executable in cygwin causing which
19204  # to not find them
19205  if test "x$new_path" = x \
19206      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19207      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19208    new_path=`$CYGPATH -u "$path"`
19209  fi
19210  if test "x$new_path" = x; then
19211    # Oops. Which didn't find the executable.
19212    # The splitting of arguments from the executable at a space might have been incorrect,
19213    # since paths with space are more likely in Windows. Give it another try with the whole
19214    # argument.
19215    path="$complete"
19216    arguments="EOL"
19217    new_path=`$CYGPATH -u "$path"`
19218    new_path=`$WHICH "$new_path" 2> /dev/null`
19219    # bat and cmd files are not always considered executable in cygwin causing which
19220    # to not find them
19221    if test "x$new_path" = x \
19222        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19223        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19224      new_path=`$CYGPATH -u "$path"`
19225    fi
19226    if test "x$new_path" = x; then
19227      # It's still not found. Now this is an unrecoverable error.
19228      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19229$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19230      has_space=`$ECHO "$complete" | $GREP " "`
19231      if test "x$has_space" != x; then
19232        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19233$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19234      fi
19235      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19236    fi
19237  fi
19238
19239  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19240  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19241  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19242  # "foo.exe" is OK but "foo" is an error.
19243  #
19244  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19245  # It is also a way to make sure we got the proper file name for the real test later on.
19246  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19247  if test "x$test_shortpath" = x; then
19248    # Short path failed, file does not exist as specified.
19249    # Try adding .exe or .cmd
19250    if test -f "${new_path}.exe"; then
19251      input_to_shortpath="${new_path}.exe"
19252    elif test -f "${new_path}.cmd"; then
19253      input_to_shortpath="${new_path}.cmd"
19254    else
19255      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19256$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19257      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19258$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19259      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19260    fi
19261  else
19262    input_to_shortpath="$new_path"
19263  fi
19264
19265  # Call helper function which possibly converts this using DOS-style short mode.
19266  # If so, the updated path is stored in $new_path.
19267  new_path="$input_to_shortpath"
19268
19269  input_path="$input_to_shortpath"
19270  # Check if we need to convert this using DOS-style short mode. If the path
19271  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19272  # take no chances and rewrite it.
19273  # Note: m4 eats our [], so we need to use [ and ] instead.
19274  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19275  if test "x$has_forbidden_chars" != x; then
19276    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19277    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19278    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19279    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19280      # Going to short mode and back again did indeed matter. Since short mode is
19281      # case insensitive, let's make it lowercase to improve readability.
19282      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19283      # Now convert it back to Unix-style (cygpath)
19284      input_path=`$CYGPATH -u "$shortmode_path"`
19285      new_path="$input_path"
19286    fi
19287  fi
19288
19289  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19290  if test "x$test_cygdrive_prefix" = x; then
19291    # As a simple fix, exclude /usr/bin since it's not a real path.
19292    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19293      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19294      # a path prefixed by /cygdrive for fixpath to work.
19295      new_path="$CYGWIN_ROOT_PATH$input_path"
19296    fi
19297  fi
19298
19299  # remove trailing .exe if any
19300  new_path="${new_path/%.exe/}"
19301
19302    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19303
19304  # First separate the path from the arguments. This will split at the first
19305  # space.
19306  complete="$FOUND_MAKE"
19307  path="${complete%% *}"
19308  tmp="$complete EOL"
19309  arguments="${tmp#* }"
19310
19311  # Input might be given as Windows format, start by converting to
19312  # unix format.
19313  new_path="$path"
19314
19315  windows_path="$new_path"
19316  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19317    unix_path=`$CYGPATH -u "$windows_path"`
19318    new_path="$unix_path"
19319  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19320    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19321    new_path="$unix_path"
19322  fi
19323
19324
19325  # Now try to locate executable using which
19326  new_path=`$WHICH "$new_path" 2> /dev/null`
19327
19328  if test "x$new_path" = x; then
19329    # Oops. Which didn't find the executable.
19330    # The splitting of arguments from the executable at a space might have been incorrect,
19331    # since paths with space are more likely in Windows. Give it another try with the whole
19332    # argument.
19333    path="$complete"
19334    arguments="EOL"
19335    new_path="$path"
19336
19337  windows_path="$new_path"
19338  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19339    unix_path=`$CYGPATH -u "$windows_path"`
19340    new_path="$unix_path"
19341  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19342    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19343    new_path="$unix_path"
19344  fi
19345
19346
19347    new_path=`$WHICH "$new_path" 2> /dev/null`
19348    # bat and cmd files are not always considered executable in MSYS causing which
19349    # to not find them
19350    if test "x$new_path" = x \
19351        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19352        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19353      new_path="$path"
19354
19355  windows_path="$new_path"
19356  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19357    unix_path=`$CYGPATH -u "$windows_path"`
19358    new_path="$unix_path"
19359  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19360    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19361    new_path="$unix_path"
19362  fi
19363
19364    fi
19365
19366    if test "x$new_path" = x; then
19367      # It's still not found. Now this is an unrecoverable error.
19368      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19369$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19370      has_space=`$ECHO "$complete" | $GREP " "`
19371      if test "x$has_space" != x; then
19372        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19373$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19374      fi
19375      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19376    fi
19377  fi
19378
19379  # Now new_path has a complete unix path to the binary
19380  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19381    # Keep paths in /bin as-is, but remove trailing .exe if any
19382    new_path="${new_path/%.exe/}"
19383    # Do not save /bin paths to all_fixpath_prefixes!
19384  else
19385    # Not in mixed or Windows style, start by that.
19386    new_path=`cmd //c echo $new_path`
19387
19388  input_path="$new_path"
19389  # Check if we need to convert this using DOS-style short mode. If the path
19390  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19391  # take no chances and rewrite it.
19392  # Note: m4 eats our [], so we need to use [ and ] instead.
19393  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19394  if test "x$has_forbidden_chars" != x; then
19395    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19396    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19397  fi
19398
19399    # Output is in $new_path
19400
19401  windows_path="$new_path"
19402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19403    unix_path=`$CYGPATH -u "$windows_path"`
19404    new_path="$unix_path"
19405  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19406    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19407    new_path="$unix_path"
19408  fi
19409
19410    # remove trailing .exe if any
19411    new_path="${new_path/%.exe/}"
19412
19413    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19414    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19415  fi
19416
19417    else
19418      # We're on a unix platform. Hooray! :)
19419      # First separate the path from the arguments. This will split at the first
19420      # space.
19421      complete="$FOUND_MAKE"
19422      path="${complete%% *}"
19423      tmp="$complete EOL"
19424      arguments="${tmp#* }"
19425
19426      # Cannot rely on the command "which" here since it doesn't always work.
19427      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19428      if test -z "$is_absolute_path"; then
19429        # Path to executable is not absolute. Find it.
19430        IFS_save="$IFS"
19431        IFS=:
19432        for p in $PATH; do
19433          if test -f "$p/$path" && test -x "$p/$path"; then
19434            new_path="$p/$path"
19435            break
19436          fi
19437        done
19438        IFS="$IFS_save"
19439      else
19440        # This is an absolute path, we can use it without further modifications.
19441        new_path="$path"
19442      fi
19443
19444      if test "x$new_path" = x; then
19445        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19446$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19447        has_space=`$ECHO "$complete" | $GREP " "`
19448        if test "x$has_space" != x; then
19449          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19450$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19451        fi
19452        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19453      fi
19454    fi
19455
19456    # Now join together the path and the arguments once again
19457    if test "x$arguments" != xEOL; then
19458      new_complete="$new_path ${arguments% *}"
19459    else
19460      new_complete="$new_path"
19461    fi
19462
19463    if test "x$complete" != "x$new_complete"; then
19464      FOUND_MAKE="$new_complete"
19465      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19466$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19467    fi
19468  fi
19469
19470        fi
19471      fi
19472    fi
19473  fi
19474
19475
19476    if test "x$FOUND_MAKE" = x; then
19477      for ac_prog in make
19478do
19479  # Extract the first word of "$ac_prog", so it can be a program name with args.
19480set dummy $ac_prog; ac_word=$2
19481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19482$as_echo_n "checking for $ac_word... " >&6; }
19483if ${ac_cv_path_CHECK_MAKE+:} false; then :
19484  $as_echo_n "(cached) " >&6
19485else
19486  case $CHECK_MAKE in
19487  [\\/]* | ?:[\\/]*)
19488  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19489  ;;
19490  *)
19491  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19492for as_dir in $PATH
19493do
19494  IFS=$as_save_IFS
19495  test -z "$as_dir" && as_dir=.
19496    for ac_exec_ext in '' $ac_executable_extensions; do
19497  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19498    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19499    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19500    break 2
19501  fi
19502done
19503  done
19504IFS=$as_save_IFS
19505
19506  ;;
19507esac
19508fi
19509CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19510if test -n "$CHECK_MAKE"; then
19511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19512$as_echo "$CHECK_MAKE" >&6; }
19513else
19514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19515$as_echo "no" >&6; }
19516fi
19517
19518
19519  test -n "$CHECK_MAKE" && break
19520done
19521
19522
19523  MAKE_CANDIDATE=""$CHECK_MAKE""
19524  DESCRIPTION="make in PATH"
19525
19526  # On Cygwin, we require a newer version of make than on other platforms
19527  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19528    MAKE_VERSION_EXPR="-e 4\."
19529    MAKE_REQUIRED_VERSION="4.0"
19530   else
19531    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19532    MAKE_REQUIRED_VERSION="3.81"
19533  fi
19534
19535  if test "x$MAKE_CANDIDATE" != x; then
19536    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19537$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19538    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19539    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19540    if test "x$IS_GNU_MAKE" = x; then
19541      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19542$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19543    else
19544      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19545      if test "x$IS_MODERN_MAKE" = x; then
19546        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
19547$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
19548      else
19549        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19550          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19551            MAKE_EXPECTED_ENV='cygwin'
19552          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19553            MAKE_EXPECTED_ENV='msys'
19554          else
19555            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19556          fi
19557          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19558          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19559        else
19560          # Not relevant for non-Windows
19561          IS_MAKE_CORRECT_ENV=true
19562        fi
19563        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19564          { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5
19565$as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;}
19566        else
19567          FOUND_MAKE=$MAKE_CANDIDATE
19568
19569  # Only process if variable expands to non-empty
19570
19571  if test "x$FOUND_MAKE" != x; then
19572    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19573
19574  # First separate the path from the arguments. This will split at the first
19575  # space.
19576  complete="$FOUND_MAKE"
19577  path="${complete%% *}"
19578  tmp="$complete EOL"
19579  arguments="${tmp#* }"
19580
19581  # Input might be given as Windows format, start by converting to
19582  # unix format.
19583  new_path=`$CYGPATH -u "$path"`
19584
19585  # Now try to locate executable using which
19586  new_path=`$WHICH "$new_path" 2> /dev/null`
19587  # bat and cmd files are not always considered executable in cygwin causing which
19588  # to not find them
19589  if test "x$new_path" = x \
19590      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19591      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19592    new_path=`$CYGPATH -u "$path"`
19593  fi
19594  if test "x$new_path" = x; then
19595    # Oops. Which didn't find the executable.
19596    # The splitting of arguments from the executable at a space might have been incorrect,
19597    # since paths with space are more likely in Windows. Give it another try with the whole
19598    # argument.
19599    path="$complete"
19600    arguments="EOL"
19601    new_path=`$CYGPATH -u "$path"`
19602    new_path=`$WHICH "$new_path" 2> /dev/null`
19603    # bat and cmd files are not always considered executable in cygwin causing which
19604    # to not find them
19605    if test "x$new_path" = x \
19606        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19607        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19608      new_path=`$CYGPATH -u "$path"`
19609    fi
19610    if test "x$new_path" = x; then
19611      # It's still not found. Now this is an unrecoverable error.
19612      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19613$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19614      has_space=`$ECHO "$complete" | $GREP " "`
19615      if test "x$has_space" != x; then
19616        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19617$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19618      fi
19619      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19620    fi
19621  fi
19622
19623  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19624  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19625  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19626  # "foo.exe" is OK but "foo" is an error.
19627  #
19628  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19629  # It is also a way to make sure we got the proper file name for the real test later on.
19630  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19631  if test "x$test_shortpath" = x; then
19632    # Short path failed, file does not exist as specified.
19633    # Try adding .exe or .cmd
19634    if test -f "${new_path}.exe"; then
19635      input_to_shortpath="${new_path}.exe"
19636    elif test -f "${new_path}.cmd"; then
19637      input_to_shortpath="${new_path}.cmd"
19638    else
19639      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19640$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19641      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19642$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19643      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19644    fi
19645  else
19646    input_to_shortpath="$new_path"
19647  fi
19648
19649  # Call helper function which possibly converts this using DOS-style short mode.
19650  # If so, the updated path is stored in $new_path.
19651  new_path="$input_to_shortpath"
19652
19653  input_path="$input_to_shortpath"
19654  # Check if we need to convert this using DOS-style short mode. If the path
19655  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19656  # take no chances and rewrite it.
19657  # Note: m4 eats our [], so we need to use [ and ] instead.
19658  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19659  if test "x$has_forbidden_chars" != x; then
19660    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19661    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19662    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19663    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19664      # Going to short mode and back again did indeed matter. Since short mode is
19665      # case insensitive, let's make it lowercase to improve readability.
19666      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19667      # Now convert it back to Unix-style (cygpath)
19668      input_path=`$CYGPATH -u "$shortmode_path"`
19669      new_path="$input_path"
19670    fi
19671  fi
19672
19673  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19674  if test "x$test_cygdrive_prefix" = x; then
19675    # As a simple fix, exclude /usr/bin since it's not a real path.
19676    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19677      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19678      # a path prefixed by /cygdrive for fixpath to work.
19679      new_path="$CYGWIN_ROOT_PATH$input_path"
19680    fi
19681  fi
19682
19683  # remove trailing .exe if any
19684  new_path="${new_path/%.exe/}"
19685
19686    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19687
19688  # First separate the path from the arguments. This will split at the first
19689  # space.
19690  complete="$FOUND_MAKE"
19691  path="${complete%% *}"
19692  tmp="$complete EOL"
19693  arguments="${tmp#* }"
19694
19695  # Input might be given as Windows format, start by converting to
19696  # unix format.
19697  new_path="$path"
19698
19699  windows_path="$new_path"
19700  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19701    unix_path=`$CYGPATH -u "$windows_path"`
19702    new_path="$unix_path"
19703  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19704    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19705    new_path="$unix_path"
19706  fi
19707
19708
19709  # Now try to locate executable using which
19710  new_path=`$WHICH "$new_path" 2> /dev/null`
19711
19712  if test "x$new_path" = x; then
19713    # Oops. Which didn't find the executable.
19714    # The splitting of arguments from the executable at a space might have been incorrect,
19715    # since paths with space are more likely in Windows. Give it another try with the whole
19716    # argument.
19717    path="$complete"
19718    arguments="EOL"
19719    new_path="$path"
19720
19721  windows_path="$new_path"
19722  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19723    unix_path=`$CYGPATH -u "$windows_path"`
19724    new_path="$unix_path"
19725  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19726    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19727    new_path="$unix_path"
19728  fi
19729
19730
19731    new_path=`$WHICH "$new_path" 2> /dev/null`
19732    # bat and cmd files are not always considered executable in MSYS causing which
19733    # to not find them
19734    if test "x$new_path" = x \
19735        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19736        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19737      new_path="$path"
19738
19739  windows_path="$new_path"
19740  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19741    unix_path=`$CYGPATH -u "$windows_path"`
19742    new_path="$unix_path"
19743  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19744    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19745    new_path="$unix_path"
19746  fi
19747
19748    fi
19749
19750    if test "x$new_path" = x; then
19751      # It's still not found. Now this is an unrecoverable error.
19752      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19753$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19754      has_space=`$ECHO "$complete" | $GREP " "`
19755      if test "x$has_space" != x; then
19756        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19757$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19758      fi
19759      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19760    fi
19761  fi
19762
19763  # Now new_path has a complete unix path to the binary
19764  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19765    # Keep paths in /bin as-is, but remove trailing .exe if any
19766    new_path="${new_path/%.exe/}"
19767    # Do not save /bin paths to all_fixpath_prefixes!
19768  else
19769    # Not in mixed or Windows style, start by that.
19770    new_path=`cmd //c echo $new_path`
19771
19772  input_path="$new_path"
19773  # Check if we need to convert this using DOS-style short mode. If the path
19774  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19775  # take no chances and rewrite it.
19776  # Note: m4 eats our [], so we need to use [ and ] instead.
19777  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19778  if test "x$has_forbidden_chars" != x; then
19779    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19780    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19781  fi
19782
19783    # Output is in $new_path
19784
19785  windows_path="$new_path"
19786  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19787    unix_path=`$CYGPATH -u "$windows_path"`
19788    new_path="$unix_path"
19789  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19790    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19791    new_path="$unix_path"
19792  fi
19793
19794    # remove trailing .exe if any
19795    new_path="${new_path/%.exe/}"
19796
19797    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19798    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19799  fi
19800
19801    else
19802      # We're on a unix platform. Hooray! :)
19803      # First separate the path from the arguments. This will split at the first
19804      # space.
19805      complete="$FOUND_MAKE"
19806      path="${complete%% *}"
19807      tmp="$complete EOL"
19808      arguments="${tmp#* }"
19809
19810      # Cannot rely on the command "which" here since it doesn't always work.
19811      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19812      if test -z "$is_absolute_path"; then
19813        # Path to executable is not absolute. Find it.
19814        IFS_save="$IFS"
19815        IFS=:
19816        for p in $PATH; do
19817          if test -f "$p/$path" && test -x "$p/$path"; then
19818            new_path="$p/$path"
19819            break
19820          fi
19821        done
19822        IFS="$IFS_save"
19823      else
19824        # This is an absolute path, we can use it without further modifications.
19825        new_path="$path"
19826      fi
19827
19828      if test "x$new_path" = x; then
19829        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19830$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19831        has_space=`$ECHO "$complete" | $GREP " "`
19832        if test "x$has_space" != x; then
19833          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19834$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19835        fi
19836        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19837      fi
19838    fi
19839
19840    # Now join together the path and the arguments once again
19841    if test "x$arguments" != xEOL; then
19842      new_complete="$new_path ${arguments% *}"
19843    else
19844      new_complete="$new_path"
19845    fi
19846
19847    if test "x$complete" != "x$new_complete"; then
19848      FOUND_MAKE="$new_complete"
19849      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19850$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19851    fi
19852  fi
19853
19854        fi
19855      fi
19856    fi
19857  fi
19858
19859    fi
19860
19861    if test "x$FOUND_MAKE" = x; then
19862      if test "x$TOOLCHAIN_PATH" != x; then
19863        # We have a toolchain path, check that as well before giving up.
19864        OLD_PATH=$PATH
19865        PATH=$TOOLCHAIN_PATH:$PATH
19866        for ac_prog in gmake
19867do
19868  # Extract the first word of "$ac_prog", so it can be a program name with args.
19869set dummy $ac_prog; ac_word=$2
19870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19871$as_echo_n "checking for $ac_word... " >&6; }
19872if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
19873  $as_echo_n "(cached) " >&6
19874else
19875  case $CHECK_TOOLSDIR_GMAKE in
19876  [\\/]* | ?:[\\/]*)
19877  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
19878  ;;
19879  *)
19880  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19881for as_dir in $PATH
19882do
19883  IFS=$as_save_IFS
19884  test -z "$as_dir" && as_dir=.
19885    for ac_exec_ext in '' $ac_executable_extensions; do
19886  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19887    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19888    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19889    break 2
19890  fi
19891done
19892  done
19893IFS=$as_save_IFS
19894
19895  ;;
19896esac
19897fi
19898CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
19899if test -n "$CHECK_TOOLSDIR_GMAKE"; then
19900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
19901$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
19902else
19903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19904$as_echo "no" >&6; }
19905fi
19906
19907
19908  test -n "$CHECK_TOOLSDIR_GMAKE" && break
19909done
19910
19911
19912  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
19913  DESCRIPTION="gmake in tools-dir"
19914
19915  # On Cygwin, we require a newer version of make than on other platforms
19916  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19917    MAKE_VERSION_EXPR="-e 4\."
19918    MAKE_REQUIRED_VERSION="4.0"
19919   else
19920    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19921    MAKE_REQUIRED_VERSION="3.81"
19922  fi
19923
19924  if test "x$MAKE_CANDIDATE" != x; then
19925    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19926$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19927    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19928    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19929    if test "x$IS_GNU_MAKE" = x; then
19930      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19931$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19932    else
19933      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19934      if test "x$IS_MODERN_MAKE" = x; then
19935        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
19936$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
19937      else
19938        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19939          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19940            MAKE_EXPECTED_ENV='cygwin'
19941          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19942            MAKE_EXPECTED_ENV='msys'
19943          else
19944            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19945          fi
19946          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19947          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19948        else
19949          # Not relevant for non-Windows
19950          IS_MAKE_CORRECT_ENV=true
19951        fi
19952        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19953          { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5
19954$as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;}
19955        else
19956          FOUND_MAKE=$MAKE_CANDIDATE
19957
19958  # Only process if variable expands to non-empty
19959
19960  if test "x$FOUND_MAKE" != x; then
19961    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19962
19963  # First separate the path from the arguments. This will split at the first
19964  # space.
19965  complete="$FOUND_MAKE"
19966  path="${complete%% *}"
19967  tmp="$complete EOL"
19968  arguments="${tmp#* }"
19969
19970  # Input might be given as Windows format, start by converting to
19971  # unix format.
19972  new_path=`$CYGPATH -u "$path"`
19973
19974  # Now try to locate executable using which
19975  new_path=`$WHICH "$new_path" 2> /dev/null`
19976  # bat and cmd files are not always considered executable in cygwin causing which
19977  # to not find them
19978  if test "x$new_path" = x \
19979      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19980      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19981    new_path=`$CYGPATH -u "$path"`
19982  fi
19983  if test "x$new_path" = x; then
19984    # Oops. Which didn't find the executable.
19985    # The splitting of arguments from the executable at a space might have been incorrect,
19986    # since paths with space are more likely in Windows. Give it another try with the whole
19987    # argument.
19988    path="$complete"
19989    arguments="EOL"
19990    new_path=`$CYGPATH -u "$path"`
19991    new_path=`$WHICH "$new_path" 2> /dev/null`
19992    # bat and cmd files are not always considered executable in cygwin causing which
19993    # to not find them
19994    if test "x$new_path" = x \
19995        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19996        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19997      new_path=`$CYGPATH -u "$path"`
19998    fi
19999    if test "x$new_path" = x; then
20000      # It's still not found. Now this is an unrecoverable error.
20001      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20002$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20003      has_space=`$ECHO "$complete" | $GREP " "`
20004      if test "x$has_space" != x; then
20005        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20006$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20007      fi
20008      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20009    fi
20010  fi
20011
20012  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20013  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20014  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20015  # "foo.exe" is OK but "foo" is an error.
20016  #
20017  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20018  # It is also a way to make sure we got the proper file name for the real test later on.
20019  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20020  if test "x$test_shortpath" = x; then
20021    # Short path failed, file does not exist as specified.
20022    # Try adding .exe or .cmd
20023    if test -f "${new_path}.exe"; then
20024      input_to_shortpath="${new_path}.exe"
20025    elif test -f "${new_path}.cmd"; then
20026      input_to_shortpath="${new_path}.cmd"
20027    else
20028      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20029$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20030      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20031$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20032      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20033    fi
20034  else
20035    input_to_shortpath="$new_path"
20036  fi
20037
20038  # Call helper function which possibly converts this using DOS-style short mode.
20039  # If so, the updated path is stored in $new_path.
20040  new_path="$input_to_shortpath"
20041
20042  input_path="$input_to_shortpath"
20043  # Check if we need to convert this using DOS-style short mode. If the path
20044  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20045  # take no chances and rewrite it.
20046  # Note: m4 eats our [], so we need to use [ and ] instead.
20047  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20048  if test "x$has_forbidden_chars" != x; then
20049    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20050    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20051    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20052    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20053      # Going to short mode and back again did indeed matter. Since short mode is
20054      # case insensitive, let's make it lowercase to improve readability.
20055      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20056      # Now convert it back to Unix-style (cygpath)
20057      input_path=`$CYGPATH -u "$shortmode_path"`
20058      new_path="$input_path"
20059    fi
20060  fi
20061
20062  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20063  if test "x$test_cygdrive_prefix" = x; then
20064    # As a simple fix, exclude /usr/bin since it's not a real path.
20065    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20066      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20067      # a path prefixed by /cygdrive for fixpath to work.
20068      new_path="$CYGWIN_ROOT_PATH$input_path"
20069    fi
20070  fi
20071
20072  # remove trailing .exe if any
20073  new_path="${new_path/%.exe/}"
20074
20075    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20076
20077  # First separate the path from the arguments. This will split at the first
20078  # space.
20079  complete="$FOUND_MAKE"
20080  path="${complete%% *}"
20081  tmp="$complete EOL"
20082  arguments="${tmp#* }"
20083
20084  # Input might be given as Windows format, start by converting to
20085  # unix format.
20086  new_path="$path"
20087
20088  windows_path="$new_path"
20089  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20090    unix_path=`$CYGPATH -u "$windows_path"`
20091    new_path="$unix_path"
20092  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20093    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20094    new_path="$unix_path"
20095  fi
20096
20097
20098  # Now try to locate executable using which
20099  new_path=`$WHICH "$new_path" 2> /dev/null`
20100
20101  if test "x$new_path" = x; then
20102    # Oops. Which didn't find the executable.
20103    # The splitting of arguments from the executable at a space might have been incorrect,
20104    # since paths with space are more likely in Windows. Give it another try with the whole
20105    # argument.
20106    path="$complete"
20107    arguments="EOL"
20108    new_path="$path"
20109
20110  windows_path="$new_path"
20111  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20112    unix_path=`$CYGPATH -u "$windows_path"`
20113    new_path="$unix_path"
20114  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20115    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20116    new_path="$unix_path"
20117  fi
20118
20119
20120    new_path=`$WHICH "$new_path" 2> /dev/null`
20121    # bat and cmd files are not always considered executable in MSYS causing which
20122    # to not find them
20123    if test "x$new_path" = x \
20124        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20125        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20126      new_path="$path"
20127
20128  windows_path="$new_path"
20129  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20130    unix_path=`$CYGPATH -u "$windows_path"`
20131    new_path="$unix_path"
20132  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20133    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20134    new_path="$unix_path"
20135  fi
20136
20137    fi
20138
20139    if test "x$new_path" = x; then
20140      # It's still not found. Now this is an unrecoverable error.
20141      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20142$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20143      has_space=`$ECHO "$complete" | $GREP " "`
20144      if test "x$has_space" != x; then
20145        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20146$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20147      fi
20148      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20149    fi
20150  fi
20151
20152  # Now new_path has a complete unix path to the binary
20153  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20154    # Keep paths in /bin as-is, but remove trailing .exe if any
20155    new_path="${new_path/%.exe/}"
20156    # Do not save /bin paths to all_fixpath_prefixes!
20157  else
20158    # Not in mixed or Windows style, start by that.
20159    new_path=`cmd //c echo $new_path`
20160
20161  input_path="$new_path"
20162  # Check if we need to convert this using DOS-style short mode. If the path
20163  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20164  # take no chances and rewrite it.
20165  # Note: m4 eats our [], so we need to use [ and ] instead.
20166  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20167  if test "x$has_forbidden_chars" != x; then
20168    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20169    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20170  fi
20171
20172    # Output is in $new_path
20173
20174  windows_path="$new_path"
20175  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20176    unix_path=`$CYGPATH -u "$windows_path"`
20177    new_path="$unix_path"
20178  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20179    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20180    new_path="$unix_path"
20181  fi
20182
20183    # remove trailing .exe if any
20184    new_path="${new_path/%.exe/}"
20185
20186    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20187    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20188  fi
20189
20190    else
20191      # We're on a unix platform. Hooray! :)
20192      # First separate the path from the arguments. This will split at the first
20193      # space.
20194      complete="$FOUND_MAKE"
20195      path="${complete%% *}"
20196      tmp="$complete EOL"
20197      arguments="${tmp#* }"
20198
20199      # Cannot rely on the command "which" here since it doesn't always work.
20200      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20201      if test -z "$is_absolute_path"; then
20202        # Path to executable is not absolute. Find it.
20203        IFS_save="$IFS"
20204        IFS=:
20205        for p in $PATH; do
20206          if test -f "$p/$path" && test -x "$p/$path"; then
20207            new_path="$p/$path"
20208            break
20209          fi
20210        done
20211        IFS="$IFS_save"
20212      else
20213        # This is an absolute path, we can use it without further modifications.
20214        new_path="$path"
20215      fi
20216
20217      if test "x$new_path" = x; then
20218        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20219$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20220        has_space=`$ECHO "$complete" | $GREP " "`
20221        if test "x$has_space" != x; then
20222          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20223$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20224        fi
20225        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20226      fi
20227    fi
20228
20229    # Now join together the path and the arguments once again
20230    if test "x$arguments" != xEOL; then
20231      new_complete="$new_path ${arguments% *}"
20232    else
20233      new_complete="$new_path"
20234    fi
20235
20236    if test "x$complete" != "x$new_complete"; then
20237      FOUND_MAKE="$new_complete"
20238      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20239$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20240    fi
20241  fi
20242
20243        fi
20244      fi
20245    fi
20246  fi
20247
20248        if test "x$FOUND_MAKE" = x; then
20249          for ac_prog in make
20250do
20251  # Extract the first word of "$ac_prog", so it can be a program name with args.
20252set dummy $ac_prog; ac_word=$2
20253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20254$as_echo_n "checking for $ac_word... " >&6; }
20255if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
20256  $as_echo_n "(cached) " >&6
20257else
20258  case $CHECK_TOOLSDIR_MAKE in
20259  [\\/]* | ?:[\\/]*)
20260  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
20261  ;;
20262  *)
20263  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20264for as_dir in $PATH
20265do
20266  IFS=$as_save_IFS
20267  test -z "$as_dir" && as_dir=.
20268    for ac_exec_ext in '' $ac_executable_extensions; do
20269  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20270    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
20271    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20272    break 2
20273  fi
20274done
20275  done
20276IFS=$as_save_IFS
20277
20278  ;;
20279esac
20280fi
20281CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
20282if test -n "$CHECK_TOOLSDIR_MAKE"; then
20283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
20284$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
20285else
20286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20287$as_echo "no" >&6; }
20288fi
20289
20290
20291  test -n "$CHECK_TOOLSDIR_MAKE" && break
20292done
20293
20294
20295  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
20296  DESCRIPTION="make in tools-dir"
20297
20298  # On Cygwin, we require a newer version of make than on other platforms
20299  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20300    MAKE_VERSION_EXPR="-e 4\."
20301    MAKE_REQUIRED_VERSION="4.0"
20302   else
20303    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20304    MAKE_REQUIRED_VERSION="3.81"
20305  fi
20306
20307  if test "x$MAKE_CANDIDATE" != x; then
20308    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20309$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20310    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20311    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20312    if test "x$IS_GNU_MAKE" = x; then
20313      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20314$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20315    else
20316      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20317      if test "x$IS_MODERN_MAKE" = x; then
20318        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
20319$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
20320      else
20321        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20322          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20323            MAKE_EXPECTED_ENV='cygwin'
20324          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20325            MAKE_EXPECTED_ENV='msys'
20326          else
20327            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20328          fi
20329          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20330          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20331        else
20332          # Not relevant for non-Windows
20333          IS_MAKE_CORRECT_ENV=true
20334        fi
20335        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20336          { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5
20337$as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;}
20338        else
20339          FOUND_MAKE=$MAKE_CANDIDATE
20340
20341  # Only process if variable expands to non-empty
20342
20343  if test "x$FOUND_MAKE" != x; then
20344    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20345
20346  # First separate the path from the arguments. This will split at the first
20347  # space.
20348  complete="$FOUND_MAKE"
20349  path="${complete%% *}"
20350  tmp="$complete EOL"
20351  arguments="${tmp#* }"
20352
20353  # Input might be given as Windows format, start by converting to
20354  # unix format.
20355  new_path=`$CYGPATH -u "$path"`
20356
20357  # Now try to locate executable using which
20358  new_path=`$WHICH "$new_path" 2> /dev/null`
20359  # bat and cmd files are not always considered executable in cygwin causing which
20360  # to not find them
20361  if test "x$new_path" = x \
20362      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20363      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20364    new_path=`$CYGPATH -u "$path"`
20365  fi
20366  if test "x$new_path" = x; then
20367    # Oops. Which didn't find the executable.
20368    # The splitting of arguments from the executable at a space might have been incorrect,
20369    # since paths with space are more likely in Windows. Give it another try with the whole
20370    # argument.
20371    path="$complete"
20372    arguments="EOL"
20373    new_path=`$CYGPATH -u "$path"`
20374    new_path=`$WHICH "$new_path" 2> /dev/null`
20375    # bat and cmd files are not always considered executable in cygwin causing which
20376    # to not find them
20377    if test "x$new_path" = x \
20378        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20379        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20380      new_path=`$CYGPATH -u "$path"`
20381    fi
20382    if test "x$new_path" = x; then
20383      # It's still not found. Now this is an unrecoverable error.
20384      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20385$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20386      has_space=`$ECHO "$complete" | $GREP " "`
20387      if test "x$has_space" != x; then
20388        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20389$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20390      fi
20391      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20392    fi
20393  fi
20394
20395  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20396  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20397  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20398  # "foo.exe" is OK but "foo" is an error.
20399  #
20400  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20401  # It is also a way to make sure we got the proper file name for the real test later on.
20402  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20403  if test "x$test_shortpath" = x; then
20404    # Short path failed, file does not exist as specified.
20405    # Try adding .exe or .cmd
20406    if test -f "${new_path}.exe"; then
20407      input_to_shortpath="${new_path}.exe"
20408    elif test -f "${new_path}.cmd"; then
20409      input_to_shortpath="${new_path}.cmd"
20410    else
20411      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20412$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20413      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20414$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20415      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20416    fi
20417  else
20418    input_to_shortpath="$new_path"
20419  fi
20420
20421  # Call helper function which possibly converts this using DOS-style short mode.
20422  # If so, the updated path is stored in $new_path.
20423  new_path="$input_to_shortpath"
20424
20425  input_path="$input_to_shortpath"
20426  # Check if we need to convert this using DOS-style short mode. If the path
20427  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20428  # take no chances and rewrite it.
20429  # Note: m4 eats our [], so we need to use [ and ] instead.
20430  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20431  if test "x$has_forbidden_chars" != x; then
20432    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20433    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20434    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20435    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20436      # Going to short mode and back again did indeed matter. Since short mode is
20437      # case insensitive, let's make it lowercase to improve readability.
20438      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20439      # Now convert it back to Unix-style (cygpath)
20440      input_path=`$CYGPATH -u "$shortmode_path"`
20441      new_path="$input_path"
20442    fi
20443  fi
20444
20445  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20446  if test "x$test_cygdrive_prefix" = x; then
20447    # As a simple fix, exclude /usr/bin since it's not a real path.
20448    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20449      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20450      # a path prefixed by /cygdrive for fixpath to work.
20451      new_path="$CYGWIN_ROOT_PATH$input_path"
20452    fi
20453  fi
20454
20455  # remove trailing .exe if any
20456  new_path="${new_path/%.exe/}"
20457
20458    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20459
20460  # First separate the path from the arguments. This will split at the first
20461  # space.
20462  complete="$FOUND_MAKE"
20463  path="${complete%% *}"
20464  tmp="$complete EOL"
20465  arguments="${tmp#* }"
20466
20467  # Input might be given as Windows format, start by converting to
20468  # unix format.
20469  new_path="$path"
20470
20471  windows_path="$new_path"
20472  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20473    unix_path=`$CYGPATH -u "$windows_path"`
20474    new_path="$unix_path"
20475  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20476    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20477    new_path="$unix_path"
20478  fi
20479
20480
20481  # Now try to locate executable using which
20482  new_path=`$WHICH "$new_path" 2> /dev/null`
20483
20484  if test "x$new_path" = x; then
20485    # Oops. Which didn't find the executable.
20486    # The splitting of arguments from the executable at a space might have been incorrect,
20487    # since paths with space are more likely in Windows. Give it another try with the whole
20488    # argument.
20489    path="$complete"
20490    arguments="EOL"
20491    new_path="$path"
20492
20493  windows_path="$new_path"
20494  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20495    unix_path=`$CYGPATH -u "$windows_path"`
20496    new_path="$unix_path"
20497  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20498    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20499    new_path="$unix_path"
20500  fi
20501
20502
20503    new_path=`$WHICH "$new_path" 2> /dev/null`
20504    # bat and cmd files are not always considered executable in MSYS causing which
20505    # to not find them
20506    if test "x$new_path" = x \
20507        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20508        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20509      new_path="$path"
20510
20511  windows_path="$new_path"
20512  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20513    unix_path=`$CYGPATH -u "$windows_path"`
20514    new_path="$unix_path"
20515  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20516    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20517    new_path="$unix_path"
20518  fi
20519
20520    fi
20521
20522    if test "x$new_path" = x; then
20523      # It's still not found. Now this is an unrecoverable error.
20524      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20525$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20526      has_space=`$ECHO "$complete" | $GREP " "`
20527      if test "x$has_space" != x; then
20528        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20529$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20530      fi
20531      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20532    fi
20533  fi
20534
20535  # Now new_path has a complete unix path to the binary
20536  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20537    # Keep paths in /bin as-is, but remove trailing .exe if any
20538    new_path="${new_path/%.exe/}"
20539    # Do not save /bin paths to all_fixpath_prefixes!
20540  else
20541    # Not in mixed or Windows style, start by that.
20542    new_path=`cmd //c echo $new_path`
20543
20544  input_path="$new_path"
20545  # Check if we need to convert this using DOS-style short mode. If the path
20546  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20547  # take no chances and rewrite it.
20548  # Note: m4 eats our [], so we need to use [ and ] instead.
20549  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20550  if test "x$has_forbidden_chars" != x; then
20551    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20552    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20553  fi
20554
20555    # Output is in $new_path
20556
20557  windows_path="$new_path"
20558  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20559    unix_path=`$CYGPATH -u "$windows_path"`
20560    new_path="$unix_path"
20561  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20562    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20563    new_path="$unix_path"
20564  fi
20565
20566    # remove trailing .exe if any
20567    new_path="${new_path/%.exe/}"
20568
20569    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20570    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20571  fi
20572
20573    else
20574      # We're on a unix platform. Hooray! :)
20575      # First separate the path from the arguments. This will split at the first
20576      # space.
20577      complete="$FOUND_MAKE"
20578      path="${complete%% *}"
20579      tmp="$complete EOL"
20580      arguments="${tmp#* }"
20581
20582      # Cannot rely on the command "which" here since it doesn't always work.
20583      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20584      if test -z "$is_absolute_path"; then
20585        # Path to executable is not absolute. Find it.
20586        IFS_save="$IFS"
20587        IFS=:
20588        for p in $PATH; do
20589          if test -f "$p/$path" && test -x "$p/$path"; then
20590            new_path="$p/$path"
20591            break
20592          fi
20593        done
20594        IFS="$IFS_save"
20595      else
20596        # This is an absolute path, we can use it without further modifications.
20597        new_path="$path"
20598      fi
20599
20600      if test "x$new_path" = x; then
20601        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20602$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20603        has_space=`$ECHO "$complete" | $GREP " "`
20604        if test "x$has_space" != x; then
20605          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20606$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20607        fi
20608        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20609      fi
20610    fi
20611
20612    # Now join together the path and the arguments once again
20613    if test "x$arguments" != xEOL; then
20614      new_complete="$new_path ${arguments% *}"
20615    else
20616      new_complete="$new_path"
20617    fi
20618
20619    if test "x$complete" != "x$new_complete"; then
20620      FOUND_MAKE="$new_complete"
20621      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20622$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20623    fi
20624  fi
20625
20626        fi
20627      fi
20628    fi
20629  fi
20630
20631        fi
20632        PATH=$OLD_PATH
20633      fi
20634    fi
20635
20636    if test "x$FOUND_MAKE" = x; then
20637      as_fn_error $? "Cannot find GNU make $MAKE_REQUIRED_VERSION or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure." "$LINENO" 5
20638    fi
20639
20640    else
20641      # If it succeeded, then it was overridden by the user. We will use it
20642      # for the tool.
20643
20644      # First remove it from the list of overridden variables, so we can test
20645      # for unknown variables in the end.
20646      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20647
20648      # Check if we try to supply an empty value
20649      if test "x$MAKE" = x; then
20650        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20651$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20652        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20653$as_echo_n "checking for MAKE... " >&6; }
20654        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20655$as_echo "disabled" >&6; }
20656      else
20657        # Check if the provided tool contains a complete path.
20658        tool_specified="$MAKE"
20659        tool_basename="${tool_specified##*/}"
20660        if test "x$tool_basename" = "x$tool_specified"; then
20661          # A command without a complete path is provided, search $PATH.
20662          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20663$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20664          # Extract the first word of "$tool_basename", so it can be a program name with args.
20665set dummy $tool_basename; ac_word=$2
20666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20667$as_echo_n "checking for $ac_word... " >&6; }
20668if ${ac_cv_path_MAKE+:} false; then :
20669  $as_echo_n "(cached) " >&6
20670else
20671  case $MAKE in
20672  [\\/]* | ?:[\\/]*)
20673  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20674  ;;
20675  *)
20676  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20677for as_dir in $PATH
20678do
20679  IFS=$as_save_IFS
20680  test -z "$as_dir" && as_dir=.
20681    for ac_exec_ext in '' $ac_executable_extensions; do
20682  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20683    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
20684    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20685    break 2
20686  fi
20687done
20688  done
20689IFS=$as_save_IFS
20690
20691  ;;
20692esac
20693fi
20694MAKE=$ac_cv_path_MAKE
20695if test -n "$MAKE"; then
20696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
20697$as_echo "$MAKE" >&6; }
20698else
20699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20700$as_echo "no" >&6; }
20701fi
20702
20703
20704          if test "x$MAKE" = x; then
20705            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20706          fi
20707        else
20708          # Otherwise we believe it is a complete path. Use it as it is.
20709          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
20710$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
20711          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20712$as_echo_n "checking for MAKE... " >&6; }
20713          if test ! -x "$tool_specified"; then
20714            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20715$as_echo "not found" >&6; }
20716            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
20717          fi
20718          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20719$as_echo "$tool_specified" >&6; }
20720        fi
20721      fi
20722    fi
20723
20724    # If MAKE was set by user, verify the version
20725
20726  MAKE_CANDIDATE=""$MAKE""
20727  DESCRIPTION="user supplied MAKE=$MAKE"
20728
20729  # On Cygwin, we require a newer version of make than on other platforms
20730  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20731    MAKE_VERSION_EXPR="-e 4\."
20732    MAKE_REQUIRED_VERSION="4.0"
20733   else
20734    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20735    MAKE_REQUIRED_VERSION="3.81"
20736  fi
20737
20738  if test "x$MAKE_CANDIDATE" != x; then
20739    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20740$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20741    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20742    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20743    if test "x$IS_GNU_MAKE" = x; then
20744      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20745$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20746    else
20747      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20748      if test "x$IS_MODERN_MAKE" = x; then
20749        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
20750$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
20751      else
20752        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20753          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20754            MAKE_EXPECTED_ENV='cygwin'
20755          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20756            MAKE_EXPECTED_ENV='msys'
20757          else
20758            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20759          fi
20760          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20761          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20762        else
20763          # Not relevant for non-Windows
20764          IS_MAKE_CORRECT_ENV=true
20765        fi
20766        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20767          { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5
20768$as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;}
20769        else
20770          FOUND_MAKE=$MAKE_CANDIDATE
20771
20772  # Only process if variable expands to non-empty
20773
20774  if test "x$FOUND_MAKE" != x; then
20775    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20776
20777  # First separate the path from the arguments. This will split at the first
20778  # space.
20779  complete="$FOUND_MAKE"
20780  path="${complete%% *}"
20781  tmp="$complete EOL"
20782  arguments="${tmp#* }"
20783
20784  # Input might be given as Windows format, start by converting to
20785  # unix format.
20786  new_path=`$CYGPATH -u "$path"`
20787
20788  # Now try to locate executable using which
20789  new_path=`$WHICH "$new_path" 2> /dev/null`
20790  # bat and cmd files are not always considered executable in cygwin causing which
20791  # to not find them
20792  if test "x$new_path" = x \
20793      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20794      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20795    new_path=`$CYGPATH -u "$path"`
20796  fi
20797  if test "x$new_path" = x; then
20798    # Oops. Which didn't find the executable.
20799    # The splitting of arguments from the executable at a space might have been incorrect,
20800    # since paths with space are more likely in Windows. Give it another try with the whole
20801    # argument.
20802    path="$complete"
20803    arguments="EOL"
20804    new_path=`$CYGPATH -u "$path"`
20805    new_path=`$WHICH "$new_path" 2> /dev/null`
20806    # bat and cmd files are not always considered executable in cygwin causing which
20807    # to not find them
20808    if test "x$new_path" = x \
20809        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20810        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20811      new_path=`$CYGPATH -u "$path"`
20812    fi
20813    if test "x$new_path" = x; then
20814      # It's still not found. Now this is an unrecoverable error.
20815      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20816$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20817      has_space=`$ECHO "$complete" | $GREP " "`
20818      if test "x$has_space" != x; then
20819        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20820$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20821      fi
20822      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20823    fi
20824  fi
20825
20826  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20827  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20828  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20829  # "foo.exe" is OK but "foo" is an error.
20830  #
20831  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20832  # It is also a way to make sure we got the proper file name for the real test later on.
20833  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20834  if test "x$test_shortpath" = x; then
20835    # Short path failed, file does not exist as specified.
20836    # Try adding .exe or .cmd
20837    if test -f "${new_path}.exe"; then
20838      input_to_shortpath="${new_path}.exe"
20839    elif test -f "${new_path}.cmd"; then
20840      input_to_shortpath="${new_path}.cmd"
20841    else
20842      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20843$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20844      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20845$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20846      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20847    fi
20848  else
20849    input_to_shortpath="$new_path"
20850  fi
20851
20852  # Call helper function which possibly converts this using DOS-style short mode.
20853  # If so, the updated path is stored in $new_path.
20854  new_path="$input_to_shortpath"
20855
20856  input_path="$input_to_shortpath"
20857  # Check if we need to convert this using DOS-style short mode. If the path
20858  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20859  # take no chances and rewrite it.
20860  # Note: m4 eats our [], so we need to use [ and ] instead.
20861  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20862  if test "x$has_forbidden_chars" != x; then
20863    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20864    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20865    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20866    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20867      # Going to short mode and back again did indeed matter. Since short mode is
20868      # case insensitive, let's make it lowercase to improve readability.
20869      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20870      # Now convert it back to Unix-style (cygpath)
20871      input_path=`$CYGPATH -u "$shortmode_path"`
20872      new_path="$input_path"
20873    fi
20874  fi
20875
20876  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20877  if test "x$test_cygdrive_prefix" = x; then
20878    # As a simple fix, exclude /usr/bin since it's not a real path.
20879    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20880      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20881      # a path prefixed by /cygdrive for fixpath to work.
20882      new_path="$CYGWIN_ROOT_PATH$input_path"
20883    fi
20884  fi
20885
20886  # remove trailing .exe if any
20887  new_path="${new_path/%.exe/}"
20888
20889    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20890
20891  # First separate the path from the arguments. This will split at the first
20892  # space.
20893  complete="$FOUND_MAKE"
20894  path="${complete%% *}"
20895  tmp="$complete EOL"
20896  arguments="${tmp#* }"
20897
20898  # Input might be given as Windows format, start by converting to
20899  # unix format.
20900  new_path="$path"
20901
20902  windows_path="$new_path"
20903  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20904    unix_path=`$CYGPATH -u "$windows_path"`
20905    new_path="$unix_path"
20906  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20907    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20908    new_path="$unix_path"
20909  fi
20910
20911
20912  # Now try to locate executable using which
20913  new_path=`$WHICH "$new_path" 2> /dev/null`
20914
20915  if test "x$new_path" = x; then
20916    # Oops. Which didn't find the executable.
20917    # The splitting of arguments from the executable at a space might have been incorrect,
20918    # since paths with space are more likely in Windows. Give it another try with the whole
20919    # argument.
20920    path="$complete"
20921    arguments="EOL"
20922    new_path="$path"
20923
20924  windows_path="$new_path"
20925  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20926    unix_path=`$CYGPATH -u "$windows_path"`
20927    new_path="$unix_path"
20928  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20929    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20930    new_path="$unix_path"
20931  fi
20932
20933
20934    new_path=`$WHICH "$new_path" 2> /dev/null`
20935    # bat and cmd files are not always considered executable in MSYS causing which
20936    # to not find them
20937    if test "x$new_path" = x \
20938        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20939        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20940      new_path="$path"
20941
20942  windows_path="$new_path"
20943  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20944    unix_path=`$CYGPATH -u "$windows_path"`
20945    new_path="$unix_path"
20946  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20947    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20948    new_path="$unix_path"
20949  fi
20950
20951    fi
20952
20953    if test "x$new_path" = x; then
20954      # It's still not found. Now this is an unrecoverable error.
20955      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20956$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20957      has_space=`$ECHO "$complete" | $GREP " "`
20958      if test "x$has_space" != x; then
20959        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20960$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20961      fi
20962      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20963    fi
20964  fi
20965
20966  # Now new_path has a complete unix path to the binary
20967  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20968    # Keep paths in /bin as-is, but remove trailing .exe if any
20969    new_path="${new_path/%.exe/}"
20970    # Do not save /bin paths to all_fixpath_prefixes!
20971  else
20972    # Not in mixed or Windows style, start by that.
20973    new_path=`cmd //c echo $new_path`
20974
20975  input_path="$new_path"
20976  # Check if we need to convert this using DOS-style short mode. If the path
20977  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20978  # take no chances and rewrite it.
20979  # Note: m4 eats our [], so we need to use [ and ] instead.
20980  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20981  if test "x$has_forbidden_chars" != x; then
20982    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20983    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20984  fi
20985
20986    # Output is in $new_path
20987
20988  windows_path="$new_path"
20989  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20990    unix_path=`$CYGPATH -u "$windows_path"`
20991    new_path="$unix_path"
20992  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20993    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20994    new_path="$unix_path"
20995  fi
20996
20997    # remove trailing .exe if any
20998    new_path="${new_path/%.exe/}"
20999
21000    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21001    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21002  fi
21003
21004    else
21005      # We're on a unix platform. Hooray! :)
21006      # First separate the path from the arguments. This will split at the first
21007      # space.
21008      complete="$FOUND_MAKE"
21009      path="${complete%% *}"
21010      tmp="$complete EOL"
21011      arguments="${tmp#* }"
21012
21013      # Cannot rely on the command "which" here since it doesn't always work.
21014      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21015      if test -z "$is_absolute_path"; then
21016        # Path to executable is not absolute. Find it.
21017        IFS_save="$IFS"
21018        IFS=:
21019        for p in $PATH; do
21020          if test -f "$p/$path" && test -x "$p/$path"; then
21021            new_path="$p/$path"
21022            break
21023          fi
21024        done
21025        IFS="$IFS_save"
21026      else
21027        # This is an absolute path, we can use it without further modifications.
21028        new_path="$path"
21029      fi
21030
21031      if test "x$new_path" = x; then
21032        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21033$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21034        has_space=`$ECHO "$complete" | $GREP " "`
21035        if test "x$has_space" != x; then
21036          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21037$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21038        fi
21039        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21040      fi
21041    fi
21042
21043    # Now join together the path and the arguments once again
21044    if test "x$arguments" != xEOL; then
21045      new_complete="$new_path ${arguments% *}"
21046    else
21047      new_complete="$new_path"
21048    fi
21049
21050    if test "x$complete" != "x$new_complete"; then
21051      FOUND_MAKE="$new_complete"
21052      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
21053$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
21054    fi
21055  fi
21056
21057        fi
21058      fi
21059    fi
21060  fi
21061
21062    if test "x$FOUND_MAKE" = x; then
21063      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
21064    fi
21065
21066  fi
21067
21068
21069  MAKE=$FOUND_MAKE
21070
21071  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
21072$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
21073
21074
21075  # Check if make supports the output sync option and if so, setup using it.
21076  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
21077$as_echo_n "checking if make --output-sync is supported... " >&6; }
21078  if $MAKE --version -O > /dev/null 2>&1; then
21079    OUTPUT_SYNC_SUPPORTED=true
21080    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21081$as_echo "yes" >&6; }
21082    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
21083$as_echo_n "checking for output-sync value... " >&6; }
21084
21085# Check whether --with-output-sync was given.
21086if test "${with_output_sync+set}" = set; then :
21087  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
21088fi
21089
21090    if test "x$OUTPUT_SYNC" = "x"; then
21091      OUTPUT_SYNC=none
21092    fi
21093    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
21094$as_echo "$OUTPUT_SYNC" >&6; }
21095    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
21096      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
21097    fi
21098  else
21099    OUTPUT_SYNC_SUPPORTED=false
21100    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21101$as_echo "no" >&6; }
21102  fi
21103
21104
21105
21106
21107
21108
21109  # Test if find supports -delete
21110  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
21111$as_echo_n "checking if find supports -delete... " >&6; }
21112  FIND_DELETE="-delete"
21113
21114  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
21115
21116  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
21117
21118  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
21119  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
21120    # No, it does not.
21121    $RM $DELETEDIR/TestIfFindSupportsDelete
21122    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21123      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
21124      FIND_DELETE="-print | $XARGS $RM"
21125    else
21126      FIND_DELETE="-exec $RM \{\} \+"
21127    fi
21128    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21129$as_echo "no" >&6; }
21130  else
21131    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21132$as_echo "yes" >&6; }
21133  fi
21134  $RMDIR $DELETEDIR
21135
21136
21137
21138  # Test which kind of tar was found
21139  if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then
21140    TAR_TYPE="gnu"
21141  elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
21142    TAR_TYPE="bsd"
21143  elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
21144    TAR_TYPE="solaris"
21145  fi
21146  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of tar was found" >&5
21147$as_echo_n "checking what type of tar was found... " >&6; }
21148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR_TYPE" >&5
21149$as_echo "$TAR_TYPE" >&6; }
21150
21151  TAR_CREATE_FILE_PARAM=""
21152
21153  if test "x$TAR_TYPE" = "xgnu"; then
21154    TAR_INCLUDE_PARAM="T"
21155    TAR_SUPPORTS_TRANSFORM="true"
21156    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
21157      # When using gnu tar for Solaris targets, need to use compatibility mode
21158      TAR_CREATE_EXTRA_PARAM="--format=ustar"
21159    fi
21160  else
21161    TAR_INCLUDE_PARAM="I"
21162    TAR_SUPPORTS_TRANSFORM="false"
21163  fi
21164
21165
21166
21167
21168
21169
21170  # These tools might not be installed by default,
21171  # need hint on how to install them.
21172
21173
21174
21175  # Publish this variable in the help.
21176
21177
21178  if [ -z "${UNZIP+x}" ]; then
21179    # The variable is not set by user, try to locate tool using the code snippet
21180    for ac_prog in unzip
21181do
21182  # Extract the first word of "$ac_prog", so it can be a program name with args.
21183set dummy $ac_prog; ac_word=$2
21184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21185$as_echo_n "checking for $ac_word... " >&6; }
21186if ${ac_cv_path_UNZIP+:} false; then :
21187  $as_echo_n "(cached) " >&6
21188else
21189  case $UNZIP in
21190  [\\/]* | ?:[\\/]*)
21191  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21192  ;;
21193  *)
21194  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21195for as_dir in $PATH
21196do
21197  IFS=$as_save_IFS
21198  test -z "$as_dir" && as_dir=.
21199    for ac_exec_ext in '' $ac_executable_extensions; do
21200  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21201    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21202    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21203    break 2
21204  fi
21205done
21206  done
21207IFS=$as_save_IFS
21208
21209  ;;
21210esac
21211fi
21212UNZIP=$ac_cv_path_UNZIP
21213if test -n "$UNZIP"; then
21214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21215$as_echo "$UNZIP" >&6; }
21216else
21217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21218$as_echo "no" >&6; }
21219fi
21220
21221
21222  test -n "$UNZIP" && break
21223done
21224
21225  else
21226    # The variable is set, but is it from the command line or the environment?
21227
21228    # Try to remove the string !UNZIP! from our list.
21229    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
21230    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21231      # If it failed, the variable was not from the command line. Ignore it,
21232      # but warn the user (except for BASH, which is always set by the calling BASH).
21233      if test "xUNZIP" != xBASH; then
21234        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
21235$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
21236      fi
21237      # Try to locate tool using the code snippet
21238      for ac_prog in unzip
21239do
21240  # Extract the first word of "$ac_prog", so it can be a program name with args.
21241set dummy $ac_prog; ac_word=$2
21242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21243$as_echo_n "checking for $ac_word... " >&6; }
21244if ${ac_cv_path_UNZIP+:} false; then :
21245  $as_echo_n "(cached) " >&6
21246else
21247  case $UNZIP in
21248  [\\/]* | ?:[\\/]*)
21249  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21250  ;;
21251  *)
21252  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21253for as_dir in $PATH
21254do
21255  IFS=$as_save_IFS
21256  test -z "$as_dir" && as_dir=.
21257    for ac_exec_ext in '' $ac_executable_extensions; do
21258  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21259    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21260    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21261    break 2
21262  fi
21263done
21264  done
21265IFS=$as_save_IFS
21266
21267  ;;
21268esac
21269fi
21270UNZIP=$ac_cv_path_UNZIP
21271if test -n "$UNZIP"; then
21272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21273$as_echo "$UNZIP" >&6; }
21274else
21275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21276$as_echo "no" >&6; }
21277fi
21278
21279
21280  test -n "$UNZIP" && break
21281done
21282
21283    else
21284      # If it succeeded, then it was overridden by the user. We will use it
21285      # for the tool.
21286
21287      # First remove it from the list of overridden variables, so we can test
21288      # for unknown variables in the end.
21289      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21290
21291      # Check if we try to supply an empty value
21292      if test "x$UNZIP" = x; then
21293        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
21294$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
21295        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21296$as_echo_n "checking for UNZIP... " >&6; }
21297        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21298$as_echo "disabled" >&6; }
21299      else
21300        # Check if the provided tool contains a complete path.
21301        tool_specified="$UNZIP"
21302        tool_basename="${tool_specified##*/}"
21303        if test "x$tool_basename" = "x$tool_specified"; then
21304          # A command without a complete path is provided, search $PATH.
21305          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
21306$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
21307          # Extract the first word of "$tool_basename", so it can be a program name with args.
21308set dummy $tool_basename; ac_word=$2
21309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21310$as_echo_n "checking for $ac_word... " >&6; }
21311if ${ac_cv_path_UNZIP+:} false; then :
21312  $as_echo_n "(cached) " >&6
21313else
21314  case $UNZIP in
21315  [\\/]* | ?:[\\/]*)
21316  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21317  ;;
21318  *)
21319  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21320for as_dir in $PATH
21321do
21322  IFS=$as_save_IFS
21323  test -z "$as_dir" && as_dir=.
21324    for ac_exec_ext in '' $ac_executable_extensions; do
21325  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21326    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21327    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21328    break 2
21329  fi
21330done
21331  done
21332IFS=$as_save_IFS
21333
21334  ;;
21335esac
21336fi
21337UNZIP=$ac_cv_path_UNZIP
21338if test -n "$UNZIP"; then
21339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21340$as_echo "$UNZIP" >&6; }
21341else
21342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21343$as_echo "no" >&6; }
21344fi
21345
21346
21347          if test "x$UNZIP" = x; then
21348            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21349          fi
21350        else
21351          # Otherwise we believe it is a complete path. Use it as it is.
21352          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
21353$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
21354          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21355$as_echo_n "checking for UNZIP... " >&6; }
21356          if test ! -x "$tool_specified"; then
21357            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21358$as_echo "not found" >&6; }
21359            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21360          fi
21361          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21362$as_echo "$tool_specified" >&6; }
21363        fi
21364      fi
21365    fi
21366
21367  fi
21368
21369
21370
21371  if test "x$UNZIP" = x; then
21372    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
21373  fi
21374
21375
21376
21377
21378
21379  # Publish this variable in the help.
21380
21381
21382  if [ -z "${ZIP+x}" ]; then
21383    # The variable is not set by user, try to locate tool using the code snippet
21384    for ac_prog in zip
21385do
21386  # Extract the first word of "$ac_prog", so it can be a program name with args.
21387set dummy $ac_prog; ac_word=$2
21388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21389$as_echo_n "checking for $ac_word... " >&6; }
21390if ${ac_cv_path_ZIP+:} false; then :
21391  $as_echo_n "(cached) " >&6
21392else
21393  case $ZIP in
21394  [\\/]* | ?:[\\/]*)
21395  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
21396  ;;
21397  *)
21398  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21399for as_dir in $PATH
21400do
21401  IFS=$as_save_IFS
21402  test -z "$as_dir" && as_dir=.
21403    for ac_exec_ext in '' $ac_executable_extensions; do
21404  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21405    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
21406    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21407    break 2
21408  fi
21409done
21410  done
21411IFS=$as_save_IFS
21412
21413  ;;
21414esac
21415fi
21416ZIP=$ac_cv_path_ZIP
21417if test -n "$ZIP"; then
21418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21419$as_echo "$ZIP" >&6; }
21420else
21421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21422$as_echo "no" >&6; }
21423fi
21424
21425
21426  test -n "$ZIP" && break
21427done
21428
21429  else
21430    # The variable is set, but is it from the command line or the environment?
21431
21432    # Try to remove the string !ZIP! from our list.
21433    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
21434    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21435      # If it failed, the variable was not from the command line. Ignore it,
21436      # but warn the user (except for BASH, which is always set by the calling BASH).
21437      if test "xZIP" != xBASH; then
21438        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
21439$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
21440      fi
21441      # Try to locate tool using the code snippet
21442      for ac_prog in zip
21443do
21444  # Extract the first word of "$ac_prog", so it can be a program name with args.
21445set dummy $ac_prog; ac_word=$2
21446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21447$as_echo_n "checking for $ac_word... " >&6; }
21448if ${ac_cv_path_ZIP+:} false; then :
21449  $as_echo_n "(cached) " >&6
21450else
21451  case $ZIP in
21452  [\\/]* | ?:[\\/]*)
21453  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
21454  ;;
21455  *)
21456  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21457for as_dir in $PATH
21458do
21459  IFS=$as_save_IFS
21460  test -z "$as_dir" && as_dir=.
21461    for ac_exec_ext in '' $ac_executable_extensions; do
21462  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21463    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
21464    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21465    break 2
21466  fi
21467done
21468  done
21469IFS=$as_save_IFS
21470
21471  ;;
21472esac
21473fi
21474ZIP=$ac_cv_path_ZIP
21475if test -n "$ZIP"; then
21476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21477$as_echo "$ZIP" >&6; }
21478else
21479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21480$as_echo "no" >&6; }
21481fi
21482
21483
21484  test -n "$ZIP" && break
21485done
21486
21487    else
21488      # If it succeeded, then it was overridden by the user. We will use it
21489      # for the tool.
21490
21491      # First remove it from the list of overridden variables, so we can test
21492      # for unknown variables in the end.
21493      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21494
21495      # Check if we try to supply an empty value
21496      if test "x$ZIP" = x; then
21497        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIP= (no value)" >&5
21498$as_echo "$as_me: Setting user supplied tool ZIP= (no value)" >&6;}
21499        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
21500$as_echo_n "checking for ZIP... " >&6; }
21501        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21502$as_echo "disabled" >&6; }
21503      else
21504        # Check if the provided tool contains a complete path.
21505        tool_specified="$ZIP"
21506        tool_basename="${tool_specified##*/}"
21507        if test "x$tool_basename" = "x$tool_specified"; then
21508          # A command without a complete path is provided, search $PATH.
21509          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
21510$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
21511          # Extract the first word of "$tool_basename", so it can be a program name with args.
21512set dummy $tool_basename; 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_ZIP+:} false; then :
21516  $as_echo_n "(cached) " >&6
21517else
21518  case $ZIP in
21519  [\\/]* | ?:[\\/]*)
21520  ac_cv_path_ZIP="$ZIP" # 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_ZIP="$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
21541ZIP=$ac_cv_path_ZIP
21542if test -n "$ZIP"; then
21543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21544$as_echo "$ZIP" >&6; }
21545else
21546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21547$as_echo "no" >&6; }
21548fi
21549
21550
21551          if test "x$ZIP" = x; then
21552            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21553          fi
21554        else
21555          # Otherwise we believe it is a complete path. Use it as it is.
21556          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
21557$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
21558          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
21559$as_echo_n "checking for ZIP... " >&6; }
21560          if test ! -x "$tool_specified"; then
21561            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21562$as_echo "not found" >&6; }
21563            as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21564          fi
21565          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21566$as_echo "$tool_specified" >&6; }
21567        fi
21568      fi
21569    fi
21570
21571  fi
21572
21573
21574
21575  if test "x$ZIP" = x; then
21576    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
21577  fi
21578
21579
21580
21581  # Non-required basic tools
21582
21583
21584
21585  # Publish this variable in the help.
21586
21587
21588  if [ -z "${LDD+x}" ]; then
21589    # The variable is not set by user, try to locate tool using the code snippet
21590    for ac_prog in ldd
21591do
21592  # Extract the first word of "$ac_prog", so it can be a program name with args.
21593set dummy $ac_prog; ac_word=$2
21594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21595$as_echo_n "checking for $ac_word... " >&6; }
21596if ${ac_cv_path_LDD+:} false; then :
21597  $as_echo_n "(cached) " >&6
21598else
21599  case $LDD in
21600  [\\/]* | ?:[\\/]*)
21601  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21602  ;;
21603  *)
21604  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21605for as_dir in $PATH
21606do
21607  IFS=$as_save_IFS
21608  test -z "$as_dir" && as_dir=.
21609    for ac_exec_ext in '' $ac_executable_extensions; do
21610  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21611    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21612    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21613    break 2
21614  fi
21615done
21616  done
21617IFS=$as_save_IFS
21618
21619  ;;
21620esac
21621fi
21622LDD=$ac_cv_path_LDD
21623if test -n "$LDD"; then
21624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21625$as_echo "$LDD" >&6; }
21626else
21627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21628$as_echo "no" >&6; }
21629fi
21630
21631
21632  test -n "$LDD" && break
21633done
21634
21635  else
21636    # The variable is set, but is it from the command line or the environment?
21637
21638    # Try to remove the string !LDD! from our list.
21639    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
21640    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21641      # If it failed, the variable was not from the command line. Ignore it,
21642      # but warn the user (except for BASH, which is always set by the calling BASH).
21643      if test "xLDD" != xBASH; then
21644        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
21645$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
21646      fi
21647      # Try to locate tool using the code snippet
21648      for ac_prog in ldd
21649do
21650  # Extract the first word of "$ac_prog", so it can be a program name with args.
21651set dummy $ac_prog; ac_word=$2
21652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21653$as_echo_n "checking for $ac_word... " >&6; }
21654if ${ac_cv_path_LDD+:} false; then :
21655  $as_echo_n "(cached) " >&6
21656else
21657  case $LDD in
21658  [\\/]* | ?:[\\/]*)
21659  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21660  ;;
21661  *)
21662  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21663for as_dir in $PATH
21664do
21665  IFS=$as_save_IFS
21666  test -z "$as_dir" && as_dir=.
21667    for ac_exec_ext in '' $ac_executable_extensions; do
21668  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21669    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21670    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21671    break 2
21672  fi
21673done
21674  done
21675IFS=$as_save_IFS
21676
21677  ;;
21678esac
21679fi
21680LDD=$ac_cv_path_LDD
21681if test -n "$LDD"; then
21682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21683$as_echo "$LDD" >&6; }
21684else
21685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21686$as_echo "no" >&6; }
21687fi
21688
21689
21690  test -n "$LDD" && break
21691done
21692
21693    else
21694      # If it succeeded, then it was overridden by the user. We will use it
21695      # for the tool.
21696
21697      # First remove it from the list of overridden variables, so we can test
21698      # for unknown variables in the end.
21699      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21700
21701      # Check if we try to supply an empty value
21702      if test "x$LDD" = x; then
21703        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
21704$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
21705        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21706$as_echo_n "checking for LDD... " >&6; }
21707        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21708$as_echo "disabled" >&6; }
21709      else
21710        # Check if the provided tool contains a complete path.
21711        tool_specified="$LDD"
21712        tool_basename="${tool_specified##*/}"
21713        if test "x$tool_basename" = "x$tool_specified"; then
21714          # A command without a complete path is provided, search $PATH.
21715          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
21716$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
21717          # Extract the first word of "$tool_basename", so it can be a program name with args.
21718set dummy $tool_basename; 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          if test "x$LDD" = x; then
21758            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21759          fi
21760        else
21761          # Otherwise we believe it is a complete path. Use it as it is.
21762          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
21763$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
21764          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21765$as_echo_n "checking for LDD... " >&6; }
21766          if test ! -x "$tool_specified"; then
21767            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21768$as_echo "not found" >&6; }
21769            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
21770          fi
21771          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21772$as_echo "$tool_specified" >&6; }
21773        fi
21774      fi
21775    fi
21776
21777  fi
21778
21779
21780  if test "x$LDD" = "x"; then
21781    # List shared lib dependencies is used for
21782    # debug output and checking for forbidden dependencies.
21783    # We can build without it.
21784    LDD="true"
21785  fi
21786
21787
21788  # Publish this variable in the help.
21789
21790
21791  if [ -z "${OTOOL+x}" ]; then
21792    # The variable is not set by user, try to locate tool using the code snippet
21793    for ac_prog in otool
21794do
21795  # Extract the first word of "$ac_prog", so it can be a program name with args.
21796set dummy $ac_prog; ac_word=$2
21797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21798$as_echo_n "checking for $ac_word... " >&6; }
21799if ${ac_cv_path_OTOOL+:} false; then :
21800  $as_echo_n "(cached) " >&6
21801else
21802  case $OTOOL in
21803  [\\/]* | ?:[\\/]*)
21804  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21805  ;;
21806  *)
21807  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21808for as_dir in $PATH
21809do
21810  IFS=$as_save_IFS
21811  test -z "$as_dir" && as_dir=.
21812    for ac_exec_ext in '' $ac_executable_extensions; do
21813  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21814    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21815    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21816    break 2
21817  fi
21818done
21819  done
21820IFS=$as_save_IFS
21821
21822  ;;
21823esac
21824fi
21825OTOOL=$ac_cv_path_OTOOL
21826if test -n "$OTOOL"; then
21827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21828$as_echo "$OTOOL" >&6; }
21829else
21830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21831$as_echo "no" >&6; }
21832fi
21833
21834
21835  test -n "$OTOOL" && break
21836done
21837
21838  else
21839    # The variable is set, but is it from the command line or the environment?
21840
21841    # Try to remove the string !OTOOL! from our list.
21842    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
21843    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21844      # If it failed, the variable was not from the command line. Ignore it,
21845      # but warn the user (except for BASH, which is always set by the calling BASH).
21846      if test "xOTOOL" != xBASH; then
21847        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
21848$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
21849      fi
21850      # Try to locate tool using the code snippet
21851      for ac_prog in otool
21852do
21853  # Extract the first word of "$ac_prog", so it can be a program name with args.
21854set dummy $ac_prog; ac_word=$2
21855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21856$as_echo_n "checking for $ac_word... " >&6; }
21857if ${ac_cv_path_OTOOL+:} false; then :
21858  $as_echo_n "(cached) " >&6
21859else
21860  case $OTOOL in
21861  [\\/]* | ?:[\\/]*)
21862  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21863  ;;
21864  *)
21865  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21866for as_dir in $PATH
21867do
21868  IFS=$as_save_IFS
21869  test -z "$as_dir" && as_dir=.
21870    for ac_exec_ext in '' $ac_executable_extensions; do
21871  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21872    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21873    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21874    break 2
21875  fi
21876done
21877  done
21878IFS=$as_save_IFS
21879
21880  ;;
21881esac
21882fi
21883OTOOL=$ac_cv_path_OTOOL
21884if test -n "$OTOOL"; then
21885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21886$as_echo "$OTOOL" >&6; }
21887else
21888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21889$as_echo "no" >&6; }
21890fi
21891
21892
21893  test -n "$OTOOL" && break
21894done
21895
21896    else
21897      # If it succeeded, then it was overridden by the user. We will use it
21898      # for the tool.
21899
21900      # First remove it from the list of overridden variables, so we can test
21901      # for unknown variables in the end.
21902      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21903
21904      # Check if we try to supply an empty value
21905      if test "x$OTOOL" = x; then
21906        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
21907$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
21908        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21909$as_echo_n "checking for OTOOL... " >&6; }
21910        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21911$as_echo "disabled" >&6; }
21912      else
21913        # Check if the provided tool contains a complete path.
21914        tool_specified="$OTOOL"
21915        tool_basename="${tool_specified##*/}"
21916        if test "x$tool_basename" = "x$tool_specified"; then
21917          # A command without a complete path is provided, search $PATH.
21918          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
21919$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
21920          # Extract the first word of "$tool_basename", so it can be a program name with args.
21921set dummy $tool_basename; 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          if test "x$OTOOL" = x; then
21961            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21962          fi
21963        else
21964          # Otherwise we believe it is a complete path. Use it as it is.
21965          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
21966$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
21967          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21968$as_echo_n "checking for OTOOL... " >&6; }
21969          if test ! -x "$tool_specified"; then
21970            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21971$as_echo "not found" >&6; }
21972            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
21973          fi
21974          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21975$as_echo "$tool_specified" >&6; }
21976        fi
21977      fi
21978    fi
21979
21980  fi
21981
21982
21983  if test "x$OTOOL" = "x"; then
21984    OTOOL="true"
21985  fi
21986
21987
21988  # Publish this variable in the help.
21989
21990
21991  if [ -z "${READELF+x}" ]; then
21992    # The variable is not set by user, try to locate tool using the code snippet
21993    for ac_prog in greadelf readelf
21994do
21995  # Extract the first word of "$ac_prog", so it can be a program name with args.
21996set dummy $ac_prog; ac_word=$2
21997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21998$as_echo_n "checking for $ac_word... " >&6; }
21999if ${ac_cv_path_READELF+:} false; then :
22000  $as_echo_n "(cached) " >&6
22001else
22002  case $READELF in
22003  [\\/]* | ?:[\\/]*)
22004  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22005  ;;
22006  *)
22007  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22008for as_dir in $PATH
22009do
22010  IFS=$as_save_IFS
22011  test -z "$as_dir" && as_dir=.
22012    for ac_exec_ext in '' $ac_executable_extensions; do
22013  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22014    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22015    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22016    break 2
22017  fi
22018done
22019  done
22020IFS=$as_save_IFS
22021
22022  ;;
22023esac
22024fi
22025READELF=$ac_cv_path_READELF
22026if test -n "$READELF"; then
22027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22028$as_echo "$READELF" >&6; }
22029else
22030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22031$as_echo "no" >&6; }
22032fi
22033
22034
22035  test -n "$READELF" && break
22036done
22037
22038  else
22039    # The variable is set, but is it from the command line or the environment?
22040
22041    # Try to remove the string !READELF! from our list.
22042    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
22043    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22044      # If it failed, the variable was not from the command line. Ignore it,
22045      # but warn the user (except for BASH, which is always set by the calling BASH).
22046      if test "xREADELF" != xBASH; then
22047        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
22048$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
22049      fi
22050      # Try to locate tool using the code snippet
22051      for ac_prog in greadelf readelf
22052do
22053  # Extract the first word of "$ac_prog", so it can be a program name with args.
22054set dummy $ac_prog; ac_word=$2
22055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22056$as_echo_n "checking for $ac_word... " >&6; }
22057if ${ac_cv_path_READELF+:} false; then :
22058  $as_echo_n "(cached) " >&6
22059else
22060  case $READELF in
22061  [\\/]* | ?:[\\/]*)
22062  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22063  ;;
22064  *)
22065  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22066for as_dir in $PATH
22067do
22068  IFS=$as_save_IFS
22069  test -z "$as_dir" && as_dir=.
22070    for ac_exec_ext in '' $ac_executable_extensions; do
22071  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22072    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22073    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22074    break 2
22075  fi
22076done
22077  done
22078IFS=$as_save_IFS
22079
22080  ;;
22081esac
22082fi
22083READELF=$ac_cv_path_READELF
22084if test -n "$READELF"; then
22085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22086$as_echo "$READELF" >&6; }
22087else
22088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22089$as_echo "no" >&6; }
22090fi
22091
22092
22093  test -n "$READELF" && break
22094done
22095
22096    else
22097      # If it succeeded, then it was overridden by the user. We will use it
22098      # for the tool.
22099
22100      # First remove it from the list of overridden variables, so we can test
22101      # for unknown variables in the end.
22102      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22103
22104      # Check if we try to supply an empty value
22105      if test "x$READELF" = x; then
22106        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
22107$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
22108        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22109$as_echo_n "checking for READELF... " >&6; }
22110        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22111$as_echo "disabled" >&6; }
22112      else
22113        # Check if the provided tool contains a complete path.
22114        tool_specified="$READELF"
22115        tool_basename="${tool_specified##*/}"
22116        if test "x$tool_basename" = "x$tool_specified"; then
22117          # A command without a complete path is provided, search $PATH.
22118          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
22119$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
22120          # Extract the first word of "$tool_basename", so it can be a program name with args.
22121set dummy $tool_basename; 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          if test "x$READELF" = x; then
22161            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22162          fi
22163        else
22164          # Otherwise we believe it is a complete path. Use it as it is.
22165          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
22166$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
22167          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22168$as_echo_n "checking for READELF... " >&6; }
22169          if test ! -x "$tool_specified"; then
22170            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22171$as_echo "not found" >&6; }
22172            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
22173          fi
22174          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22175$as_echo "$tool_specified" >&6; }
22176        fi
22177      fi
22178    fi
22179
22180  fi
22181
22182
22183
22184
22185  # Publish this variable in the help.
22186
22187
22188  if [ -z "${HG+x}" ]; then
22189    # The variable is not set by user, try to locate tool using the code snippet
22190    for ac_prog in hg
22191do
22192  # Extract the first word of "$ac_prog", so it can be a program name with args.
22193set dummy $ac_prog; ac_word=$2
22194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22195$as_echo_n "checking for $ac_word... " >&6; }
22196if ${ac_cv_path_HG+:} false; then :
22197  $as_echo_n "(cached) " >&6
22198else
22199  case $HG in
22200  [\\/]* | ?:[\\/]*)
22201  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22202  ;;
22203  *)
22204  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22205for as_dir in $PATH
22206do
22207  IFS=$as_save_IFS
22208  test -z "$as_dir" && as_dir=.
22209    for ac_exec_ext in '' $ac_executable_extensions; do
22210  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22211    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22212    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22213    break 2
22214  fi
22215done
22216  done
22217IFS=$as_save_IFS
22218
22219  ;;
22220esac
22221fi
22222HG=$ac_cv_path_HG
22223if test -n "$HG"; then
22224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22225$as_echo "$HG" >&6; }
22226else
22227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22228$as_echo "no" >&6; }
22229fi
22230
22231
22232  test -n "$HG" && break
22233done
22234
22235  else
22236    # The variable is set, but is it from the command line or the environment?
22237
22238    # Try to remove the string !HG! from our list.
22239    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
22240    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22241      # If it failed, the variable was not from the command line. Ignore it,
22242      # but warn the user (except for BASH, which is always set by the calling BASH).
22243      if test "xHG" != xBASH; then
22244        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
22245$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
22246      fi
22247      # Try to locate tool using the code snippet
22248      for ac_prog in hg
22249do
22250  # Extract the first word of "$ac_prog", so it can be a program name with args.
22251set dummy $ac_prog; ac_word=$2
22252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22253$as_echo_n "checking for $ac_word... " >&6; }
22254if ${ac_cv_path_HG+:} false; then :
22255  $as_echo_n "(cached) " >&6
22256else
22257  case $HG in
22258  [\\/]* | ?:[\\/]*)
22259  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22260  ;;
22261  *)
22262  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22263for as_dir in $PATH
22264do
22265  IFS=$as_save_IFS
22266  test -z "$as_dir" && as_dir=.
22267    for ac_exec_ext in '' $ac_executable_extensions; do
22268  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22269    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22270    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22271    break 2
22272  fi
22273done
22274  done
22275IFS=$as_save_IFS
22276
22277  ;;
22278esac
22279fi
22280HG=$ac_cv_path_HG
22281if test -n "$HG"; then
22282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22283$as_echo "$HG" >&6; }
22284else
22285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22286$as_echo "no" >&6; }
22287fi
22288
22289
22290  test -n "$HG" && break
22291done
22292
22293    else
22294      # If it succeeded, then it was overridden by the user. We will use it
22295      # for the tool.
22296
22297      # First remove it from the list of overridden variables, so we can test
22298      # for unknown variables in the end.
22299      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22300
22301      # Check if we try to supply an empty value
22302      if test "x$HG" = x; then
22303        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
22304$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
22305        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22306$as_echo_n "checking for HG... " >&6; }
22307        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22308$as_echo "disabled" >&6; }
22309      else
22310        # Check if the provided tool contains a complete path.
22311        tool_specified="$HG"
22312        tool_basename="${tool_specified##*/}"
22313        if test "x$tool_basename" = "x$tool_specified"; then
22314          # A command without a complete path is provided, search $PATH.
22315          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
22316$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
22317          # Extract the first word of "$tool_basename", so it can be a program name with args.
22318set dummy $tool_basename; 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          if test "x$HG" = x; then
22358            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22359          fi
22360        else
22361          # Otherwise we believe it is a complete path. Use it as it is.
22362          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
22363$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
22364          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22365$as_echo_n "checking for HG... " >&6; }
22366          if test ! -x "$tool_specified"; then
22367            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22368$as_echo "not found" >&6; }
22369            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
22370          fi
22371          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22372$as_echo "$tool_specified" >&6; }
22373        fi
22374      fi
22375    fi
22376
22377  fi
22378
22379
22380
22381
22382  # Publish this variable in the help.
22383
22384
22385  if [ -z "${STAT+x}" ]; then
22386    # The variable is not set by user, try to locate tool using the code snippet
22387    for ac_prog in stat
22388do
22389  # Extract the first word of "$ac_prog", so it can be a program name with args.
22390set dummy $ac_prog; ac_word=$2
22391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22392$as_echo_n "checking for $ac_word... " >&6; }
22393if ${ac_cv_path_STAT+:} false; then :
22394  $as_echo_n "(cached) " >&6
22395else
22396  case $STAT in
22397  [\\/]* | ?:[\\/]*)
22398  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22399  ;;
22400  *)
22401  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22402for as_dir in $PATH
22403do
22404  IFS=$as_save_IFS
22405  test -z "$as_dir" && as_dir=.
22406    for ac_exec_ext in '' $ac_executable_extensions; do
22407  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22408    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22409    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22410    break 2
22411  fi
22412done
22413  done
22414IFS=$as_save_IFS
22415
22416  ;;
22417esac
22418fi
22419STAT=$ac_cv_path_STAT
22420if test -n "$STAT"; then
22421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22422$as_echo "$STAT" >&6; }
22423else
22424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22425$as_echo "no" >&6; }
22426fi
22427
22428
22429  test -n "$STAT" && break
22430done
22431
22432  else
22433    # The variable is set, but is it from the command line or the environment?
22434
22435    # Try to remove the string !STAT! from our list.
22436    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
22437    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22438      # If it failed, the variable was not from the command line. Ignore it,
22439      # but warn the user (except for BASH, which is always set by the calling BASH).
22440      if test "xSTAT" != xBASH; then
22441        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
22442$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
22443      fi
22444      # Try to locate tool using the code snippet
22445      for ac_prog in stat
22446do
22447  # Extract the first word of "$ac_prog", so it can be a program name with args.
22448set dummy $ac_prog; ac_word=$2
22449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22450$as_echo_n "checking for $ac_word... " >&6; }
22451if ${ac_cv_path_STAT+:} false; then :
22452  $as_echo_n "(cached) " >&6
22453else
22454  case $STAT in
22455  [\\/]* | ?:[\\/]*)
22456  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22457  ;;
22458  *)
22459  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22460for as_dir in $PATH
22461do
22462  IFS=$as_save_IFS
22463  test -z "$as_dir" && as_dir=.
22464    for ac_exec_ext in '' $ac_executable_extensions; do
22465  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22466    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22467    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22468    break 2
22469  fi
22470done
22471  done
22472IFS=$as_save_IFS
22473
22474  ;;
22475esac
22476fi
22477STAT=$ac_cv_path_STAT
22478if test -n "$STAT"; then
22479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22480$as_echo "$STAT" >&6; }
22481else
22482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22483$as_echo "no" >&6; }
22484fi
22485
22486
22487  test -n "$STAT" && break
22488done
22489
22490    else
22491      # If it succeeded, then it was overridden by the user. We will use it
22492      # for the tool.
22493
22494      # First remove it from the list of overridden variables, so we can test
22495      # for unknown variables in the end.
22496      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22497
22498      # Check if we try to supply an empty value
22499      if test "x$STAT" = x; then
22500        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
22501$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
22502        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22503$as_echo_n "checking for STAT... " >&6; }
22504        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22505$as_echo "disabled" >&6; }
22506      else
22507        # Check if the provided tool contains a complete path.
22508        tool_specified="$STAT"
22509        tool_basename="${tool_specified##*/}"
22510        if test "x$tool_basename" = "x$tool_specified"; then
22511          # A command without a complete path is provided, search $PATH.
22512          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
22513$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
22514          # Extract the first word of "$tool_basename", so it can be a program name with args.
22515set dummy $tool_basename; 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          if test "x$STAT" = x; then
22555            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22556          fi
22557        else
22558          # Otherwise we believe it is a complete path. Use it as it is.
22559          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
22560$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
22561          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22562$as_echo_n "checking for STAT... " >&6; }
22563          if test ! -x "$tool_specified"; then
22564            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22565$as_echo "not found" >&6; }
22566            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
22567          fi
22568          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22569$as_echo "$tool_specified" >&6; }
22570        fi
22571      fi
22572    fi
22573
22574  fi
22575
22576
22577
22578
22579  # Publish this variable in the help.
22580
22581
22582  if [ -z "${TIME+x}" ]; then
22583    # The variable is not set by user, try to locate tool using the code snippet
22584    for ac_prog in time
22585do
22586  # Extract the first word of "$ac_prog", so it can be a program name with args.
22587set dummy $ac_prog; ac_word=$2
22588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22589$as_echo_n "checking for $ac_word... " >&6; }
22590if ${ac_cv_path_TIME+:} false; then :
22591  $as_echo_n "(cached) " >&6
22592else
22593  case $TIME in
22594  [\\/]* | ?:[\\/]*)
22595  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22596  ;;
22597  *)
22598  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22599for as_dir in $PATH
22600do
22601  IFS=$as_save_IFS
22602  test -z "$as_dir" && as_dir=.
22603    for ac_exec_ext in '' $ac_executable_extensions; do
22604  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22605    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22606    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22607    break 2
22608  fi
22609done
22610  done
22611IFS=$as_save_IFS
22612
22613  ;;
22614esac
22615fi
22616TIME=$ac_cv_path_TIME
22617if test -n "$TIME"; then
22618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22619$as_echo "$TIME" >&6; }
22620else
22621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22622$as_echo "no" >&6; }
22623fi
22624
22625
22626  test -n "$TIME" && break
22627done
22628
22629  else
22630    # The variable is set, but is it from the command line or the environment?
22631
22632    # Try to remove the string !TIME! from our list.
22633    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
22634    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22635      # If it failed, the variable was not from the command line. Ignore it,
22636      # but warn the user (except for BASH, which is always set by the calling BASH).
22637      if test "xTIME" != xBASH; then
22638        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
22639$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
22640      fi
22641      # Try to locate tool using the code snippet
22642      for ac_prog in time
22643do
22644  # Extract the first word of "$ac_prog", so it can be a program name with args.
22645set dummy $ac_prog; ac_word=$2
22646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22647$as_echo_n "checking for $ac_word... " >&6; }
22648if ${ac_cv_path_TIME+:} false; then :
22649  $as_echo_n "(cached) " >&6
22650else
22651  case $TIME in
22652  [\\/]* | ?:[\\/]*)
22653  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22654  ;;
22655  *)
22656  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22657for as_dir in $PATH
22658do
22659  IFS=$as_save_IFS
22660  test -z "$as_dir" && as_dir=.
22661    for ac_exec_ext in '' $ac_executable_extensions; do
22662  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22663    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22664    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22665    break 2
22666  fi
22667done
22668  done
22669IFS=$as_save_IFS
22670
22671  ;;
22672esac
22673fi
22674TIME=$ac_cv_path_TIME
22675if test -n "$TIME"; then
22676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22677$as_echo "$TIME" >&6; }
22678else
22679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22680$as_echo "no" >&6; }
22681fi
22682
22683
22684  test -n "$TIME" && break
22685done
22686
22687    else
22688      # If it succeeded, then it was overridden by the user. We will use it
22689      # for the tool.
22690
22691      # First remove it from the list of overridden variables, so we can test
22692      # for unknown variables in the end.
22693      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22694
22695      # Check if we try to supply an empty value
22696      if test "x$TIME" = x; then
22697        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
22698$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
22699        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22700$as_echo_n "checking for TIME... " >&6; }
22701        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22702$as_echo "disabled" >&6; }
22703      else
22704        # Check if the provided tool contains a complete path.
22705        tool_specified="$TIME"
22706        tool_basename="${tool_specified##*/}"
22707        if test "x$tool_basename" = "x$tool_specified"; then
22708          # A command without a complete path is provided, search $PATH.
22709          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
22710$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
22711          # Extract the first word of "$tool_basename", so it can be a program name with args.
22712set dummy $tool_basename; 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          if test "x$TIME" = x; then
22752            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22753          fi
22754        else
22755          # Otherwise we believe it is a complete path. Use it as it is.
22756          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
22757$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
22758          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22759$as_echo_n "checking for TIME... " >&6; }
22760          if test ! -x "$tool_specified"; then
22761            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22762$as_echo "not found" >&6; }
22763            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
22764          fi
22765          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22766$as_echo "$tool_specified" >&6; }
22767        fi
22768      fi
22769    fi
22770
22771  fi
22772
22773
22774  # Dtrace is usually found in /usr/sbin on Solaris, but that directory may not
22775  # be in the user path.
22776
22777
22778  # Publish this variable in the help.
22779
22780
22781  if [ -z "${DTRACE+x}" ]; then
22782    # The variable is not set by user, try to locate tool using the code snippet
22783    for ac_prog in dtrace
22784do
22785  # Extract the first word of "$ac_prog", so it can be a program name with args.
22786set dummy $ac_prog; ac_word=$2
22787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22788$as_echo_n "checking for $ac_word... " >&6; }
22789if ${ac_cv_path_DTRACE+:} false; then :
22790  $as_echo_n "(cached) " >&6
22791else
22792  case $DTRACE in
22793  [\\/]* | ?:[\\/]*)
22794  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22795  ;;
22796  *)
22797  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22798as_dummy="$PATH:/usr/sbin"
22799for as_dir in $as_dummy
22800do
22801  IFS=$as_save_IFS
22802  test -z "$as_dir" && as_dir=.
22803    for ac_exec_ext in '' $ac_executable_extensions; do
22804  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22805    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22806    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22807    break 2
22808  fi
22809done
22810  done
22811IFS=$as_save_IFS
22812
22813  ;;
22814esac
22815fi
22816DTRACE=$ac_cv_path_DTRACE
22817if test -n "$DTRACE"; then
22818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22819$as_echo "$DTRACE" >&6; }
22820else
22821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22822$as_echo "no" >&6; }
22823fi
22824
22825
22826  test -n "$DTRACE" && break
22827done
22828
22829  else
22830    # The variable is set, but is it from the command line or the environment?
22831
22832    # Try to remove the string !DTRACE! from our list.
22833    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
22834    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22835      # If it failed, the variable was not from the command line. Ignore it,
22836      # but warn the user (except for BASH, which is always set by the calling BASH).
22837      if test "xDTRACE" != xBASH; then
22838        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
22839$as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
22840      fi
22841      # Try to locate tool using the code snippet
22842      for ac_prog in dtrace
22843do
22844  # Extract the first word of "$ac_prog", so it can be a program name with args.
22845set dummy $ac_prog; ac_word=$2
22846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22847$as_echo_n "checking for $ac_word... " >&6; }
22848if ${ac_cv_path_DTRACE+:} false; then :
22849  $as_echo_n "(cached) " >&6
22850else
22851  case $DTRACE in
22852  [\\/]* | ?:[\\/]*)
22853  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22854  ;;
22855  *)
22856  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22857as_dummy="$PATH:/usr/sbin"
22858for as_dir in $as_dummy
22859do
22860  IFS=$as_save_IFS
22861  test -z "$as_dir" && as_dir=.
22862    for ac_exec_ext in '' $ac_executable_extensions; do
22863  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22864    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22865    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22866    break 2
22867  fi
22868done
22869  done
22870IFS=$as_save_IFS
22871
22872  ;;
22873esac
22874fi
22875DTRACE=$ac_cv_path_DTRACE
22876if test -n "$DTRACE"; then
22877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22878$as_echo "$DTRACE" >&6; }
22879else
22880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22881$as_echo "no" >&6; }
22882fi
22883
22884
22885  test -n "$DTRACE" && break
22886done
22887
22888    else
22889      # If it succeeded, then it was overridden by the user. We will use it
22890      # for the tool.
22891
22892      # First remove it from the list of overridden variables, so we can test
22893      # for unknown variables in the end.
22894      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22895
22896      # Check if we try to supply an empty value
22897      if test "x$DTRACE" = x; then
22898        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
22899$as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
22900        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22901$as_echo_n "checking for DTRACE... " >&6; }
22902        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22903$as_echo "disabled" >&6; }
22904      else
22905        # Check if the provided tool contains a complete path.
22906        tool_specified="$DTRACE"
22907        tool_basename="${tool_specified##*/}"
22908        if test "x$tool_basename" = "x$tool_specified"; then
22909          # A command without a complete path is provided, search $PATH.
22910          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
22911$as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
22912          # Extract the first word of "$tool_basename", so it can be a program name with args.
22913set dummy $tool_basename; ac_word=$2
22914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22915$as_echo_n "checking for $ac_word... " >&6; }
22916if ${ac_cv_path_DTRACE+:} false; then :
22917  $as_echo_n "(cached) " >&6
22918else
22919  case $DTRACE in
22920  [\\/]* | ?:[\\/]*)
22921  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22922  ;;
22923  *)
22924  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22925for as_dir in $PATH
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          if test "x$DTRACE" = x; then
22953            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22954          fi
22955        else
22956          # Otherwise we believe it is a complete path. Use it as it is.
22957          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
22958$as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
22959          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22960$as_echo_n "checking for DTRACE... " >&6; }
22961          if test ! -x "$tool_specified"; then
22962            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22963$as_echo "not found" >&6; }
22964            as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
22965          fi
22966          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22967$as_echo "$tool_specified" >&6; }
22968        fi
22969      fi
22970    fi
22971
22972  fi
22973
22974
22975
22976
22977  # Publish this variable in the help.
22978
22979
22980  if [ -z "${PATCH+x}" ]; then
22981    # The variable is not set by user, try to locate tool using the code snippet
22982    for ac_prog in gpatch patch
22983do
22984  # Extract the first word of "$ac_prog", so it can be a program name with args.
22985set dummy $ac_prog; ac_word=$2
22986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22987$as_echo_n "checking for $ac_word... " >&6; }
22988if ${ac_cv_path_PATCH+:} false; then :
22989  $as_echo_n "(cached) " >&6
22990else
22991  case $PATCH in
22992  [\\/]* | ?:[\\/]*)
22993  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22994  ;;
22995  *)
22996  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22997for as_dir in $PATH
22998do
22999  IFS=$as_save_IFS
23000  test -z "$as_dir" && as_dir=.
23001    for ac_exec_ext in '' $ac_executable_extensions; do
23002  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23003    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23004    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23005    break 2
23006  fi
23007done
23008  done
23009IFS=$as_save_IFS
23010
23011  ;;
23012esac
23013fi
23014PATCH=$ac_cv_path_PATCH
23015if test -n "$PATCH"; then
23016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23017$as_echo "$PATCH" >&6; }
23018else
23019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23020$as_echo "no" >&6; }
23021fi
23022
23023
23024  test -n "$PATCH" && break
23025done
23026
23027  else
23028    # The variable is set, but is it from the command line or the environment?
23029
23030    # Try to remove the string !PATCH! from our list.
23031    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
23032    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23033      # If it failed, the variable was not from the command line. Ignore it,
23034      # but warn the user (except for BASH, which is always set by the calling BASH).
23035      if test "xPATCH" != xBASH; then
23036        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
23037$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
23038      fi
23039      # Try to locate tool using the code snippet
23040      for ac_prog in gpatch patch
23041do
23042  # Extract the first word of "$ac_prog", so it can be a program name with args.
23043set dummy $ac_prog; ac_word=$2
23044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23045$as_echo_n "checking for $ac_word... " >&6; }
23046if ${ac_cv_path_PATCH+:} false; then :
23047  $as_echo_n "(cached) " >&6
23048else
23049  case $PATCH in
23050  [\\/]* | ?:[\\/]*)
23051  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23052  ;;
23053  *)
23054  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23055for as_dir in $PATH
23056do
23057  IFS=$as_save_IFS
23058  test -z "$as_dir" && as_dir=.
23059    for ac_exec_ext in '' $ac_executable_extensions; do
23060  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23061    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23062    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23063    break 2
23064  fi
23065done
23066  done
23067IFS=$as_save_IFS
23068
23069  ;;
23070esac
23071fi
23072PATCH=$ac_cv_path_PATCH
23073if test -n "$PATCH"; then
23074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23075$as_echo "$PATCH" >&6; }
23076else
23077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23078$as_echo "no" >&6; }
23079fi
23080
23081
23082  test -n "$PATCH" && break
23083done
23084
23085    else
23086      # If it succeeded, then it was overridden by the user. We will use it
23087      # for the tool.
23088
23089      # First remove it from the list of overridden variables, so we can test
23090      # for unknown variables in the end.
23091      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23092
23093      # Check if we try to supply an empty value
23094      if test "x$PATCH" = x; then
23095        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
23096$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
23097        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23098$as_echo_n "checking for PATCH... " >&6; }
23099        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23100$as_echo "disabled" >&6; }
23101      else
23102        # Check if the provided tool contains a complete path.
23103        tool_specified="$PATCH"
23104        tool_basename="${tool_specified##*/}"
23105        if test "x$tool_basename" = "x$tool_specified"; then
23106          # A command without a complete path is provided, search $PATH.
23107          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
23108$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
23109          # Extract the first word of "$tool_basename", so it can be a program name with args.
23110set dummy $tool_basename; 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          if test "x$PATCH" = x; then
23150            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23151          fi
23152        else
23153          # Otherwise we believe it is a complete path. Use it as it is.
23154          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
23155$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
23156          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23157$as_echo_n "checking for PATCH... " >&6; }
23158          if test ! -x "$tool_specified"; then
23159            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23160$as_echo "not found" >&6; }
23161            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
23162          fi
23163          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23164$as_echo "$tool_specified" >&6; }
23165        fi
23166      fi
23167    fi
23168
23169  fi
23170
23171
23172  # Check if it's GNU time
23173  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
23174  if test "x$IS_GNU_TIME" != x; then
23175    IS_GNU_TIME=yes
23176  else
23177    IS_GNU_TIME=no
23178  fi
23179
23180
23181  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
23182
23183
23184
23185  # Publish this variable in the help.
23186
23187
23188  if [ -z "${DSYMUTIL+x}" ]; then
23189    # The variable is not set by user, try to locate tool using the code snippet
23190    for ac_prog in dsymutil
23191do
23192  # Extract the first word of "$ac_prog", so it can be a program name with args.
23193set dummy $ac_prog; ac_word=$2
23194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23195$as_echo_n "checking for $ac_word... " >&6; }
23196if ${ac_cv_path_DSYMUTIL+:} false; then :
23197  $as_echo_n "(cached) " >&6
23198else
23199  case $DSYMUTIL in
23200  [\\/]* | ?:[\\/]*)
23201  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23202  ;;
23203  *)
23204  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23205for as_dir in $PATH
23206do
23207  IFS=$as_save_IFS
23208  test -z "$as_dir" && as_dir=.
23209    for ac_exec_ext in '' $ac_executable_extensions; do
23210  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23211    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23212    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23213    break 2
23214  fi
23215done
23216  done
23217IFS=$as_save_IFS
23218
23219  ;;
23220esac
23221fi
23222DSYMUTIL=$ac_cv_path_DSYMUTIL
23223if test -n "$DSYMUTIL"; then
23224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23225$as_echo "$DSYMUTIL" >&6; }
23226else
23227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23228$as_echo "no" >&6; }
23229fi
23230
23231
23232  test -n "$DSYMUTIL" && break
23233done
23234
23235  else
23236    # The variable is set, but is it from the command line or the environment?
23237
23238    # Try to remove the string !DSYMUTIL! from our list.
23239    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
23240    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23241      # If it failed, the variable was not from the command line. Ignore it,
23242      # but warn the user (except for BASH, which is always set by the calling BASH).
23243      if test "xDSYMUTIL" != xBASH; then
23244        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
23245$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
23246      fi
23247      # Try to locate tool using the code snippet
23248      for ac_prog in dsymutil
23249do
23250  # Extract the first word of "$ac_prog", so it can be a program name with args.
23251set dummy $ac_prog; ac_word=$2
23252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23253$as_echo_n "checking for $ac_word... " >&6; }
23254if ${ac_cv_path_DSYMUTIL+:} false; then :
23255  $as_echo_n "(cached) " >&6
23256else
23257  case $DSYMUTIL in
23258  [\\/]* | ?:[\\/]*)
23259  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23260  ;;
23261  *)
23262  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23263for as_dir in $PATH
23264do
23265  IFS=$as_save_IFS
23266  test -z "$as_dir" && as_dir=.
23267    for ac_exec_ext in '' $ac_executable_extensions; do
23268  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23269    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23270    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23271    break 2
23272  fi
23273done
23274  done
23275IFS=$as_save_IFS
23276
23277  ;;
23278esac
23279fi
23280DSYMUTIL=$ac_cv_path_DSYMUTIL
23281if test -n "$DSYMUTIL"; then
23282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23283$as_echo "$DSYMUTIL" >&6; }
23284else
23285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23286$as_echo "no" >&6; }
23287fi
23288
23289
23290  test -n "$DSYMUTIL" && break
23291done
23292
23293    else
23294      # If it succeeded, then it was overridden by the user. We will use it
23295      # for the tool.
23296
23297      # First remove it from the list of overridden variables, so we can test
23298      # for unknown variables in the end.
23299      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23300
23301      # Check if we try to supply an empty value
23302      if test "x$DSYMUTIL" = x; then
23303        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
23304$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
23305        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23306$as_echo_n "checking for DSYMUTIL... " >&6; }
23307        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23308$as_echo "disabled" >&6; }
23309      else
23310        # Check if the provided tool contains a complete path.
23311        tool_specified="$DSYMUTIL"
23312        tool_basename="${tool_specified##*/}"
23313        if test "x$tool_basename" = "x$tool_specified"; then
23314          # A command without a complete path is provided, search $PATH.
23315          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
23316$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
23317          # Extract the first word of "$tool_basename", so it can be a program name with args.
23318set dummy $tool_basename; 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          if test "x$DSYMUTIL" = x; then
23358            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23359          fi
23360        else
23361          # Otherwise we believe it is a complete path. Use it as it is.
23362          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
23363$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
23364          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23365$as_echo_n "checking for DSYMUTIL... " >&6; }
23366          if test ! -x "$tool_specified"; then
23367            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23368$as_echo "not found" >&6; }
23369            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
23370          fi
23371          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23372$as_echo "$tool_specified" >&6; }
23373        fi
23374      fi
23375    fi
23376
23377  fi
23378
23379
23380
23381  if test "x$DSYMUTIL" = x; then
23382    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
23383  fi
23384
23385
23386
23387
23388
23389  # Publish this variable in the help.
23390
23391
23392  if [ -z "${XATTR+x}" ]; then
23393    # The variable is not set by user, try to locate tool using the code snippet
23394    for ac_prog in xattr
23395do
23396  # Extract the first word of "$ac_prog", so it can be a program name with args.
23397set dummy $ac_prog; ac_word=$2
23398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23399$as_echo_n "checking for $ac_word... " >&6; }
23400if ${ac_cv_path_XATTR+:} false; then :
23401  $as_echo_n "(cached) " >&6
23402else
23403  case $XATTR in
23404  [\\/]* | ?:[\\/]*)
23405  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23406  ;;
23407  *)
23408  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23409for as_dir in $PATH
23410do
23411  IFS=$as_save_IFS
23412  test -z "$as_dir" && as_dir=.
23413    for ac_exec_ext in '' $ac_executable_extensions; do
23414  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23415    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23416    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23417    break 2
23418  fi
23419done
23420  done
23421IFS=$as_save_IFS
23422
23423  ;;
23424esac
23425fi
23426XATTR=$ac_cv_path_XATTR
23427if test -n "$XATTR"; then
23428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23429$as_echo "$XATTR" >&6; }
23430else
23431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23432$as_echo "no" >&6; }
23433fi
23434
23435
23436  test -n "$XATTR" && break
23437done
23438
23439  else
23440    # The variable is set, but is it from the command line or the environment?
23441
23442    # Try to remove the string !XATTR! from our list.
23443    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
23444    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23445      # If it failed, the variable was not from the command line. Ignore it,
23446      # but warn the user (except for BASH, which is always set by the calling BASH).
23447      if test "xXATTR" != xBASH; then
23448        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
23449$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
23450      fi
23451      # Try to locate tool using the code snippet
23452      for ac_prog in xattr
23453do
23454  # Extract the first word of "$ac_prog", so it can be a program name with args.
23455set dummy $ac_prog; ac_word=$2
23456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23457$as_echo_n "checking for $ac_word... " >&6; }
23458if ${ac_cv_path_XATTR+:} false; then :
23459  $as_echo_n "(cached) " >&6
23460else
23461  case $XATTR in
23462  [\\/]* | ?:[\\/]*)
23463  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23464  ;;
23465  *)
23466  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23467for as_dir in $PATH
23468do
23469  IFS=$as_save_IFS
23470  test -z "$as_dir" && as_dir=.
23471    for ac_exec_ext in '' $ac_executable_extensions; do
23472  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23473    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23474    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23475    break 2
23476  fi
23477done
23478  done
23479IFS=$as_save_IFS
23480
23481  ;;
23482esac
23483fi
23484XATTR=$ac_cv_path_XATTR
23485if test -n "$XATTR"; then
23486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23487$as_echo "$XATTR" >&6; }
23488else
23489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23490$as_echo "no" >&6; }
23491fi
23492
23493
23494  test -n "$XATTR" && break
23495done
23496
23497    else
23498      # If it succeeded, then it was overridden by the user. We will use it
23499      # for the tool.
23500
23501      # First remove it from the list of overridden variables, so we can test
23502      # for unknown variables in the end.
23503      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23504
23505      # Check if we try to supply an empty value
23506      if test "x$XATTR" = x; then
23507        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
23508$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
23509        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23510$as_echo_n "checking for XATTR... " >&6; }
23511        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23512$as_echo "disabled" >&6; }
23513      else
23514        # Check if the provided tool contains a complete path.
23515        tool_specified="$XATTR"
23516        tool_basename="${tool_specified##*/}"
23517        if test "x$tool_basename" = "x$tool_specified"; then
23518          # A command without a complete path is provided, search $PATH.
23519          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
23520$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
23521          # Extract the first word of "$tool_basename", so it can be a program name with args.
23522set dummy $tool_basename; 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          if test "x$XATTR" = x; then
23562            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23563          fi
23564        else
23565          # Otherwise we believe it is a complete path. Use it as it is.
23566          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
23567$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
23568          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23569$as_echo_n "checking for XATTR... " >&6; }
23570          if test ! -x "$tool_specified"; then
23571            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23572$as_echo "not found" >&6; }
23573            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
23574          fi
23575          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23576$as_echo "$tool_specified" >&6; }
23577        fi
23578      fi
23579    fi
23580
23581  fi
23582
23583
23584
23585  if test "x$XATTR" = x; then
23586    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
23587  fi
23588
23589
23590
23591
23592  # Publish this variable in the help.
23593
23594
23595  if [ -z "${CODESIGN+x}" ]; then
23596    # The variable is not set by user, try to locate tool using the code snippet
23597    for ac_prog in codesign
23598do
23599  # Extract the first word of "$ac_prog", so it can be a program name with args.
23600set dummy $ac_prog; ac_word=$2
23601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23602$as_echo_n "checking for $ac_word... " >&6; }
23603if ${ac_cv_path_CODESIGN+:} false; then :
23604  $as_echo_n "(cached) " >&6
23605else
23606  case $CODESIGN in
23607  [\\/]* | ?:[\\/]*)
23608  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23609  ;;
23610  *)
23611  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23612for as_dir in $PATH
23613do
23614  IFS=$as_save_IFS
23615  test -z "$as_dir" && as_dir=.
23616    for ac_exec_ext in '' $ac_executable_extensions; do
23617  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23618    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23619    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23620    break 2
23621  fi
23622done
23623  done
23624IFS=$as_save_IFS
23625
23626  ;;
23627esac
23628fi
23629CODESIGN=$ac_cv_path_CODESIGN
23630if test -n "$CODESIGN"; then
23631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23632$as_echo "$CODESIGN" >&6; }
23633else
23634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23635$as_echo "no" >&6; }
23636fi
23637
23638
23639  test -n "$CODESIGN" && break
23640done
23641
23642  else
23643    # The variable is set, but is it from the command line or the environment?
23644
23645    # Try to remove the string !CODESIGN! from our list.
23646    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
23647    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23648      # If it failed, the variable was not from the command line. Ignore it,
23649      # but warn the user (except for BASH, which is always set by the calling BASH).
23650      if test "xCODESIGN" != xBASH; then
23651        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
23652$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
23653      fi
23654      # Try to locate tool using the code snippet
23655      for ac_prog in codesign
23656do
23657  # Extract the first word of "$ac_prog", so it can be a program name with args.
23658set dummy $ac_prog; ac_word=$2
23659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23660$as_echo_n "checking for $ac_word... " >&6; }
23661if ${ac_cv_path_CODESIGN+:} false; then :
23662  $as_echo_n "(cached) " >&6
23663else
23664  case $CODESIGN in
23665  [\\/]* | ?:[\\/]*)
23666  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23667  ;;
23668  *)
23669  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23670for as_dir in $PATH
23671do
23672  IFS=$as_save_IFS
23673  test -z "$as_dir" && as_dir=.
23674    for ac_exec_ext in '' $ac_executable_extensions; do
23675  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23676    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23677    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23678    break 2
23679  fi
23680done
23681  done
23682IFS=$as_save_IFS
23683
23684  ;;
23685esac
23686fi
23687CODESIGN=$ac_cv_path_CODESIGN
23688if test -n "$CODESIGN"; then
23689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23690$as_echo "$CODESIGN" >&6; }
23691else
23692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23693$as_echo "no" >&6; }
23694fi
23695
23696
23697  test -n "$CODESIGN" && break
23698done
23699
23700    else
23701      # If it succeeded, then it was overridden by the user. We will use it
23702      # for the tool.
23703
23704      # First remove it from the list of overridden variables, so we can test
23705      # for unknown variables in the end.
23706      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23707
23708      # Check if we try to supply an empty value
23709      if test "x$CODESIGN" = x; then
23710        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
23711$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
23712        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23713$as_echo_n "checking for CODESIGN... " >&6; }
23714        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23715$as_echo "disabled" >&6; }
23716      else
23717        # Check if the provided tool contains a complete path.
23718        tool_specified="$CODESIGN"
23719        tool_basename="${tool_specified##*/}"
23720        if test "x$tool_basename" = "x$tool_specified"; then
23721          # A command without a complete path is provided, search $PATH.
23722          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
23723$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
23724          # Extract the first word of "$tool_basename", so it can be a program name with args.
23725set dummy $tool_basename; 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          if test "x$CODESIGN" = x; then
23765            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23766          fi
23767        else
23768          # Otherwise we believe it is a complete path. Use it as it is.
23769          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
23770$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
23771          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23772$as_echo_n "checking for CODESIGN... " >&6; }
23773          if test ! -x "$tool_specified"; then
23774            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23775$as_echo "not found" >&6; }
23776            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
23777          fi
23778          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23779$as_echo "$tool_specified" >&6; }
23780        fi
23781      fi
23782    fi
23783
23784  fi
23785
23786
23787    if test "x$CODESIGN" != "x"; then
23788      # Verify that the openjdk_codesign certificate is present
23789      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
23790$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
23791      $RM codesign-testfile
23792      $TOUCH codesign-testfile
23793      $CODESIGN -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
23794      $RM codesign-testfile
23795      if test "x$CODESIGN" = x; then
23796        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23797$as_echo "no" >&6; }
23798      else
23799        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23800$as_echo "yes" >&6; }
23801      fi
23802    fi
23803
23804
23805
23806  # Publish this variable in the help.
23807
23808
23809  if [ -z "${SETFILE+x}" ]; then
23810    # The variable is not set by user, try to locate tool using the code snippet
23811    for ac_prog in SetFile
23812do
23813  # Extract the first word of "$ac_prog", so it can be a program name with args.
23814set dummy $ac_prog; ac_word=$2
23815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23816$as_echo_n "checking for $ac_word... " >&6; }
23817if ${ac_cv_path_SETFILE+:} false; then :
23818  $as_echo_n "(cached) " >&6
23819else
23820  case $SETFILE in
23821  [\\/]* | ?:[\\/]*)
23822  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23823  ;;
23824  *)
23825  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23826for as_dir in $PATH
23827do
23828  IFS=$as_save_IFS
23829  test -z "$as_dir" && as_dir=.
23830    for ac_exec_ext in '' $ac_executable_extensions; do
23831  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23832    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23833    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23834    break 2
23835  fi
23836done
23837  done
23838IFS=$as_save_IFS
23839
23840  ;;
23841esac
23842fi
23843SETFILE=$ac_cv_path_SETFILE
23844if test -n "$SETFILE"; then
23845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23846$as_echo "$SETFILE" >&6; }
23847else
23848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23849$as_echo "no" >&6; }
23850fi
23851
23852
23853  test -n "$SETFILE" && break
23854done
23855
23856  else
23857    # The variable is set, but is it from the command line or the environment?
23858
23859    # Try to remove the string !SETFILE! from our list.
23860    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
23861    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23862      # If it failed, the variable was not from the command line. Ignore it,
23863      # but warn the user (except for BASH, which is always set by the calling BASH).
23864      if test "xSETFILE" != xBASH; then
23865        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
23866$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
23867      fi
23868      # Try to locate tool using the code snippet
23869      for ac_prog in SetFile
23870do
23871  # Extract the first word of "$ac_prog", so it can be a program name with args.
23872set dummy $ac_prog; ac_word=$2
23873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23874$as_echo_n "checking for $ac_word... " >&6; }
23875if ${ac_cv_path_SETFILE+:} false; then :
23876  $as_echo_n "(cached) " >&6
23877else
23878  case $SETFILE in
23879  [\\/]* | ?:[\\/]*)
23880  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23881  ;;
23882  *)
23883  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23884for as_dir in $PATH
23885do
23886  IFS=$as_save_IFS
23887  test -z "$as_dir" && as_dir=.
23888    for ac_exec_ext in '' $ac_executable_extensions; do
23889  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23890    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23891    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23892    break 2
23893  fi
23894done
23895  done
23896IFS=$as_save_IFS
23897
23898  ;;
23899esac
23900fi
23901SETFILE=$ac_cv_path_SETFILE
23902if test -n "$SETFILE"; then
23903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23904$as_echo "$SETFILE" >&6; }
23905else
23906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23907$as_echo "no" >&6; }
23908fi
23909
23910
23911  test -n "$SETFILE" && break
23912done
23913
23914    else
23915      # If it succeeded, then it was overridden by the user. We will use it
23916      # for the tool.
23917
23918      # First remove it from the list of overridden variables, so we can test
23919      # for unknown variables in the end.
23920      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23921
23922      # Check if we try to supply an empty value
23923      if test "x$SETFILE" = x; then
23924        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
23925$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
23926        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23927$as_echo_n "checking for SETFILE... " >&6; }
23928        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23929$as_echo "disabled" >&6; }
23930      else
23931        # Check if the provided tool contains a complete path.
23932        tool_specified="$SETFILE"
23933        tool_basename="${tool_specified##*/}"
23934        if test "x$tool_basename" = "x$tool_specified"; then
23935          # A command without a complete path is provided, search $PATH.
23936          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
23937$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
23938          # Extract the first word of "$tool_basename", so it can be a program name with args.
23939set dummy $tool_basename; 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          if test "x$SETFILE" = x; then
23979            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23980          fi
23981        else
23982          # Otherwise we believe it is a complete path. Use it as it is.
23983          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
23984$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
23985          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23986$as_echo_n "checking for SETFILE... " >&6; }
23987          if test ! -x "$tool_specified"; then
23988            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23989$as_echo "not found" >&6; }
23990            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
23991          fi
23992          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23993$as_echo "$tool_specified" >&6; }
23994        fi
23995      fi
23996    fi
23997
23998  fi
23999
24000
24001
24002  if test "x$SETFILE" = x; then
24003    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
24004  fi
24005
24006
24007  fi
24008
24009
24010  # Test if bash supports pipefail.
24011  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
24012$as_echo_n "checking if bash supports pipefail... " >&6; }
24013  if ${BASH} -c 'set -o pipefail'; then
24014    BASH_ARGS="$BASH_ARGS -o pipefail"
24015    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24016$as_echo "yes" >&6; }
24017  else
24018    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24019$as_echo "no" >&6; }
24020  fi
24021
24022  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
24023$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
24024  if ${BASH} -e -c 'true'; then
24025    BASH_ARGS="$BASH_ARGS -e"
24026    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24027$as_echo "yes" >&6; }
24028  else
24029    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24030$as_echo "no" >&6; }
24031  fi
24032
24033
24034
24035
24036# Check if pkg-config is available.
24037
24038
24039if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
24040	if test -n "$ac_tool_prefix"; then
24041  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24042set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24044$as_echo_n "checking for $ac_word... " >&6; }
24045if ${ac_cv_path_PKG_CONFIG+:} false; then :
24046  $as_echo_n "(cached) " >&6
24047else
24048  case $PKG_CONFIG in
24049  [\\/]* | ?:[\\/]*)
24050  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
24051  ;;
24052  *)
24053  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24054for as_dir in $PATH
24055do
24056  IFS=$as_save_IFS
24057  test -z "$as_dir" && as_dir=.
24058    for ac_exec_ext in '' $ac_executable_extensions; do
24059  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24060    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24061    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24062    break 2
24063  fi
24064done
24065  done
24066IFS=$as_save_IFS
24067
24068  ;;
24069esac
24070fi
24071PKG_CONFIG=$ac_cv_path_PKG_CONFIG
24072if test -n "$PKG_CONFIG"; then
24073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
24074$as_echo "$PKG_CONFIG" >&6; }
24075else
24076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24077$as_echo "no" >&6; }
24078fi
24079
24080
24081fi
24082if test -z "$ac_cv_path_PKG_CONFIG"; then
24083  ac_pt_PKG_CONFIG=$PKG_CONFIG
24084  # Extract the first word of "pkg-config", so it can be a program name with args.
24085set dummy pkg-config; ac_word=$2
24086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24087$as_echo_n "checking for $ac_word... " >&6; }
24088if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
24089  $as_echo_n "(cached) " >&6
24090else
24091  case $ac_pt_PKG_CONFIG in
24092  [\\/]* | ?:[\\/]*)
24093  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
24094  ;;
24095  *)
24096  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24097for as_dir in $PATH
24098do
24099  IFS=$as_save_IFS
24100  test -z "$as_dir" && as_dir=.
24101    for ac_exec_ext in '' $ac_executable_extensions; do
24102  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24103    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24104    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24105    break 2
24106  fi
24107done
24108  done
24109IFS=$as_save_IFS
24110
24111  ;;
24112esac
24113fi
24114ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
24115if test -n "$ac_pt_PKG_CONFIG"; then
24116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
24117$as_echo "$ac_pt_PKG_CONFIG" >&6; }
24118else
24119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24120$as_echo "no" >&6; }
24121fi
24122
24123  if test "x$ac_pt_PKG_CONFIG" = x; then
24124    PKG_CONFIG=""
24125  else
24126    case $cross_compiling:$ac_tool_warned in
24127yes:)
24128{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24129$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24130ac_tool_warned=yes ;;
24131esac
24132    PKG_CONFIG=$ac_pt_PKG_CONFIG
24133  fi
24134else
24135  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
24136fi
24137
24138fi
24139if test -n "$PKG_CONFIG"; then
24140	_pkg_min_version=0.9.0
24141	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
24142$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
24143	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
24144		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24145$as_echo "yes" >&6; }
24146	else
24147		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24148$as_echo "no" >&6; }
24149		PKG_CONFIG=""
24150	fi
24151
24152fi
24153
24154# After basic tools have been setup, we can check build os specific details.
24155
24156  ###############################################################################
24157
24158  # Note that this is the build platform OS version!
24159
24160  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
24161  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
24162  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
24163  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
24164
24165
24166
24167
24168
24169# Misc basic settings
24170
24171
24172# Check whether --with-default-make-target was given.
24173if test "${with_default_make_target+set}" = set; then :
24174  withval=$with_default_make_target;
24175fi
24176
24177  if test "x$with_default_make_target" = "x" \
24178      || test "x$with_default_make_target" = "xyes"; then
24179    DEFAULT_MAKE_TARGET="exploded-image"
24180  elif test "x$with_default_make_target" = "xno"; then
24181    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
24182  else
24183    DEFAULT_MAKE_TARGET="$with_default_make_target"
24184  fi
24185
24186
24187
24188
24189###############################################################################
24190#
24191# Determine OpenJDK variants, options and version numbers.
24192#
24193###############################################################################
24194
24195# We need build & target for this.
24196
24197  # Should we build a JDK without a graphical UI?
24198  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headless only" >&5
24199$as_echo_n "checking headless only... " >&6; }
24200  # Check whether --enable-headless-only was given.
24201if test "${enable_headless_only+set}" = set; then :
24202  enableval=$enable_headless_only;
24203fi
24204
24205
24206  if test "x$enable_headless_only" = "xyes"; then
24207    ENABLE_HEADLESS_ONLY="true"
24208    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24209$as_echo "yes" >&6; }
24210  elif test "x$enable_headless_only" = "xno"; then
24211    ENABLE_HEADLESS_ONLY="false"
24212    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24213$as_echo "no" >&6; }
24214  elif test "x$enable_headless_only" = "x"; then
24215    ENABLE_HEADLESS_ONLY="false"
24216    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24217$as_echo "no" >&6; }
24218  else
24219    as_fn_error $? "--enable-headless-only can only take yes or no" "$LINENO" 5
24220  fi
24221
24222
24223
24224  # Choose cacerts source file
24225
24226# Check whether --with-cacerts-file was given.
24227if test "${with_cacerts_file+set}" = set; then :
24228  withval=$with_cacerts_file;
24229fi
24230
24231  if test "x$with_cacerts_file" != x; then
24232    CACERTS_FILE=$with_cacerts_file
24233  fi
24234
24235
24236  # Enable or disable unlimited crypto
24237  # Check whether --enable-unlimited-crypto was given.
24238if test "${enable_unlimited_crypto+set}" = set; then :
24239  enableval=$enable_unlimited_crypto;
24240else
24241  enable_unlimited_crypto=no
24242fi
24243
24244  if test "x$enable_unlimited_crypto" = "xyes"; then
24245    UNLIMITED_CRYPTO=true
24246  else
24247    UNLIMITED_CRYPTO=false
24248  fi
24249
24250
24251  # Should we build the serviceability agent (SA)?
24252  INCLUDE_SA=true
24253  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
24254    INCLUDE_SA=false
24255  fi
24256  if test "x$OPENJDK_TARGET_OS" = xaix ; then
24257    INCLUDE_SA=false
24258  fi
24259
24260
24261  # Compress jars
24262  COMPRESS_JARS=false
24263
24264
24265
24266  # Setup default copyright year. Mostly overridden when building close to a new year.
24267
24268# Check whether --with-copyright-year was given.
24269if test "${with_copyright_year+set}" = set; then :
24270  withval=$with_copyright_year;
24271fi
24272
24273  if test "x$with_copyright_year" = xyes; then
24274    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
24275  elif test "x$with_copyright_year" != x; then
24276    COPYRIGHT_YEAR="$with_copyright_year"
24277  else
24278    COPYRIGHT_YEAR=`$DATE +'%Y'`
24279  fi
24280
24281
24282
24283  # Check whether --enable-keep-packaged-modules was given.
24284if test "${enable_keep_packaged_modules+set}" = set; then :
24285  enableval=$enable_keep_packaged_modules;
24286fi
24287
24288
24289  if test "x$enable_keep_packaged_modules" = "xyes"; then
24290    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24291$as_echo_n "checking if packaged modules are kept... " >&6; }
24292    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24293$as_echo "yes" >&6; }
24294    JLINK_KEEP_PACKAGED_MODULES=true
24295  elif test "x$enable_keep_packaged_modules" = "xno"; then
24296    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24297$as_echo_n "checking if packaged modules are kept... " >&6; }
24298    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24299$as_echo "no" >&6; }
24300    JLINK_KEEP_PACKAGED_MODULES=false
24301  elif test "x$enable_keep_packaged_modules" = "x"; then
24302    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
24303$as_echo "yes (default)" >&6; }
24304    JLINK_KEEP_PACKAGED_MODULES=true
24305  else
24306    as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
24307  fi
24308
24309
24310
24311
24312  # Warn user that old version arguments are deprecated.
24313
24314
24315# Check whether --with-milestone was given.
24316if test "${with_milestone+set}" = set; then :
24317  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
24318$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
24319fi
24320
24321
24322
24323
24324# Check whether --with-update-version was given.
24325if test "${with_update_version+set}" = set; then :
24326  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
24327$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
24328fi
24329
24330
24331
24332
24333# Check whether --with-user-release-suffix was given.
24334if test "${with_user_release_suffix+set}" = set; then :
24335  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
24336$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
24337fi
24338
24339
24340
24341
24342# Check whether --with-build-number was given.
24343if test "${with_build_number+set}" = set; then :
24344  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
24345$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
24346fi
24347
24348
24349
24350  # Source the version numbers file
24351  . $AUTOCONF_DIR/version-numbers
24352
24353  # Some non-version number information is set in that file
24354
24355
24356
24357
24358
24359
24360
24361
24362
24363  # Override version from arguments
24364
24365  # If --with-version-string is set, process it first. It is possible to
24366  # override parts with more specific flags, since these are processed later.
24367
24368# Check whether --with-version-string was given.
24369if test "${with_version_string+set}" = set; then :
24370  withval=$with_version_string;
24371fi
24372
24373  if test "x$with_version_string" = xyes; then
24374    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
24375  elif test "x$with_version_string" != x; then
24376    # Additional [] needed to keep m4 from mangling shell constructs.
24377    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
24378      VERSION_MAJOR=${BASH_REMATCH[1]}
24379      VERSION_MINOR=${BASH_REMATCH[3]}
24380      VERSION_SECURITY=${BASH_REMATCH[5]}
24381      VERSION_PATCH=${BASH_REMATCH[7]}
24382      VERSION_PRE=${BASH_REMATCH[9]}
24383      version_plus_separator=${BASH_REMATCH[11]}
24384      VERSION_BUILD=${BASH_REMATCH[12]}
24385      VERSION_OPT=${BASH_REMATCH[14]}
24386      # Unspecified numerical fields are interpreted as 0.
24387      if test "x$VERSION_MINOR" = x; then
24388        VERSION_MINOR=0
24389      fi
24390      if test "x$VERSION_SECURITY" = x; then
24391        VERSION_SECURITY=0
24392      fi
24393      if test "x$VERSION_PATCH" = x; then
24394        VERSION_PATCH=0
24395      fi
24396      if test "x$version_plus_separator" != x \
24397          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
24398        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
24399      fi
24400      # Stop the version part process from setting default values.
24401      # We still allow them to explicitely override though.
24402      NO_DEFAULT_VERSION_PARTS=true
24403    else
24404      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
24405    fi
24406  fi
24407
24408
24409# Check whether --with-version-pre was given.
24410if test "${with_version_pre+set}" = set; then :
24411  withval=$with_version_pre; with_version_pre_present=true
24412else
24413  with_version_pre_present=false
24414fi
24415
24416
24417  if test "x$with_version_pre_present" = xtrue; then
24418    if test "x$with_version_pre" = xyes; then
24419      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
24420    elif test "x$with_version_pre" = xno; then
24421      # Interpret --without-* as empty string instead of the literal "no"
24422      VERSION_PRE=
24423    else
24424      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
24425       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
24426      if test "x$VERSION_PRE" != "x$with_version_pre"; then
24427        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
24428$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
24429      fi
24430    fi
24431  else
24432    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24433      # Default is to use "internal" as pre
24434      VERSION_PRE="internal"
24435    fi
24436  fi
24437
24438
24439# Check whether --with-version-opt was given.
24440if test "${with_version_opt+set}" = set; then :
24441  withval=$with_version_opt; with_version_opt_present=true
24442else
24443  with_version_opt_present=false
24444fi
24445
24446
24447  if test "x$with_version_opt_present" = xtrue; then
24448    if test "x$with_version_opt" = xyes; then
24449      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
24450    elif test "x$with_version_opt" = xno; then
24451      # Interpret --without-* as empty string instead of the literal "no"
24452      VERSION_OPT=
24453    else
24454      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
24455       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
24456      if test "x$VERSION_OPT" != "x$with_version_opt"; then
24457        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
24458$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
24459      fi
24460    fi
24461  else
24462    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24463      # Default is to calculate a string like this <timestamp>.<username>.<base dir name>
24464      timestamp=`$DATE '+%Y-%m-%d-%H%M%S'`
24465      # Outer [ ] to quote m4.
24466       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
24467      VERSION_OPT="$timestamp.$USERNAME.$basedirname"
24468    fi
24469  fi
24470
24471
24472# Check whether --with-version-build was given.
24473if test "${with_version_build+set}" = set; then :
24474  withval=$with_version_build; with_version_build_present=true
24475else
24476  with_version_build_present=false
24477fi
24478
24479
24480  if test "x$with_version_build_present" = xtrue; then
24481    if test "x$with_version_build" = xyes; then
24482      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
24483    elif test "x$with_version_build" = xno; then
24484      # Interpret --without-* as empty string instead of the literal "no"
24485      VERSION_BUILD=
24486    elif test "x$with_version_build" = x; then
24487      VERSION_BUILD=
24488    else
24489
24490  # Additional [] needed to keep m4 from mangling shell constructs.
24491  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24492    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
24493  fi
24494  # Extract the version number without leading zeros.
24495  cleaned_value=${BASH_REMATCH[1]}
24496  if test "x$cleaned_value" = x; then
24497    # Special case for zero
24498    cleaned_value=${BASH_REMATCH[2]}
24499  fi
24500
24501  if test $cleaned_value -gt 255; then
24502    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
24503  fi
24504  if test "x$cleaned_value" != "x$with_version_build"; then
24505    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
24506$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
24507  fi
24508  VERSION_BUILD=$cleaned_value
24509
24510    fi
24511  else
24512    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24513      # Default is to not have a build number.
24514      VERSION_BUILD=""
24515      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
24516      VERSION_BUILD=0
24517    fi
24518  fi
24519
24520
24521# Check whether --with-version-major was given.
24522if test "${with_version_major+set}" = set; then :
24523  withval=$with_version_major; with_version_major_present=true
24524else
24525  with_version_major_present=false
24526fi
24527
24528
24529  if test "x$with_version_major_present" = xtrue; then
24530    if test "x$with_version_major" = xyes; then
24531      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
24532    else
24533
24534  # Additional [] needed to keep m4 from mangling shell constructs.
24535  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24536    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
24537  fi
24538  # Extract the version number without leading zeros.
24539  cleaned_value=${BASH_REMATCH[1]}
24540  if test "x$cleaned_value" = x; then
24541    # Special case for zero
24542    cleaned_value=${BASH_REMATCH[2]}
24543  fi
24544
24545  if test $cleaned_value -gt 255; then
24546    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
24547  fi
24548  if test "x$cleaned_value" != "x$with_version_major"; then
24549    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
24550$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
24551  fi
24552  VERSION_MAJOR=$cleaned_value
24553
24554    fi
24555  else
24556    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24557      # Default is to get value from version-numbers
24558      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
24559    fi
24560  fi
24561
24562
24563# Check whether --with-version-minor was given.
24564if test "${with_version_minor+set}" = set; then :
24565  withval=$with_version_minor; with_version_minor_present=true
24566else
24567  with_version_minor_present=false
24568fi
24569
24570
24571  if test "x$with_version_minor_present" = xtrue; then
24572    if test "x$with_version_minor" = xyes; then
24573      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
24574    elif test "x$with_version_minor" = xno; then
24575      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24576      VERSION_MINOR=0
24577    elif test "x$with_version_minor" = x; then
24578      VERSION_MINOR=0
24579    else
24580
24581  # Additional [] needed to keep m4 from mangling shell constructs.
24582  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24583    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
24584  fi
24585  # Extract the version number without leading zeros.
24586  cleaned_value=${BASH_REMATCH[1]}
24587  if test "x$cleaned_value" = x; then
24588    # Special case for zero
24589    cleaned_value=${BASH_REMATCH[2]}
24590  fi
24591
24592  if test $cleaned_value -gt 255; then
24593    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
24594  fi
24595  if test "x$cleaned_value" != "x$with_version_minor"; then
24596    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
24597$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
24598  fi
24599  VERSION_MINOR=$cleaned_value
24600
24601    fi
24602  else
24603    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24604      # Default is 0, if unspecified
24605      VERSION_MINOR=0
24606    fi
24607  fi
24608
24609
24610# Check whether --with-version-security was given.
24611if test "${with_version_security+set}" = set; then :
24612  withval=$with_version_security; with_version_security_present=true
24613else
24614  with_version_security_present=false
24615fi
24616
24617
24618  if test "x$with_version_security_present" = xtrue; then
24619    if test "x$with_version_security" = xyes; then
24620      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
24621    elif test "x$with_version_security" = xno; then
24622      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24623      VERSION_SECURITY=0
24624    elif test "x$with_version_security" = x; then
24625      VERSION_SECURITY=0
24626    else
24627
24628  # Additional [] needed to keep m4 from mangling shell constructs.
24629  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24630    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
24631  fi
24632  # Extract the version number without leading zeros.
24633  cleaned_value=${BASH_REMATCH[1]}
24634  if test "x$cleaned_value" = x; then
24635    # Special case for zero
24636    cleaned_value=${BASH_REMATCH[2]}
24637  fi
24638
24639  if test $cleaned_value -gt 255; then
24640    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
24641  fi
24642  if test "x$cleaned_value" != "x$with_version_security"; then
24643    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
24644$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
24645  fi
24646  VERSION_SECURITY=$cleaned_value
24647
24648    fi
24649  else
24650    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24651      # Default is 0, if unspecified
24652      VERSION_SECURITY=0
24653    fi
24654  fi
24655
24656
24657# Check whether --with-version-patch was given.
24658if test "${with_version_patch+set}" = set; then :
24659  withval=$with_version_patch; with_version_patch_present=true
24660else
24661  with_version_patch_present=false
24662fi
24663
24664
24665  if test "x$with_version_patch_present" = xtrue; then
24666    if test "x$with_version_patch" = xyes; then
24667      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
24668    elif test "x$with_version_patch" = xno; then
24669      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24670      VERSION_PATCH=0
24671    elif test "x$with_version_patch" = x; then
24672      VERSION_PATCH=0
24673    else
24674
24675  # Additional [] needed to keep m4 from mangling shell constructs.
24676  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24677    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
24678  fi
24679  # Extract the version number without leading zeros.
24680  cleaned_value=${BASH_REMATCH[1]}
24681  if test "x$cleaned_value" = x; then
24682    # Special case for zero
24683    cleaned_value=${BASH_REMATCH[2]}
24684  fi
24685
24686  if test $cleaned_value -gt 255; then
24687    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
24688  fi
24689  if test "x$cleaned_value" != "x$with_version_patch"; then
24690    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
24691$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
24692  fi
24693  VERSION_PATCH=$cleaned_value
24694
24695    fi
24696  else
24697    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24698      # Default is 0, if unspecified
24699      VERSION_PATCH=0
24700    fi
24701  fi
24702
24703  # Calculate derived version properties
24704
24705  # Set VERSION_IS_GA based on if VERSION_PRE has a value
24706  if test "x$VERSION_PRE" = x; then
24707    VERSION_IS_GA=true
24708  else
24709    VERSION_IS_GA=false
24710  fi
24711
24712  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
24713  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
24714
24715  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
24716  # Strip trailing zeroes from stripped_version_number
24717  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
24718  VERSION_NUMBER=$stripped_version_number
24719
24720  # The complete version string, with additional build information
24721  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
24722    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24723  else
24724    # If either build or opt is set, we need a + separator
24725    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
24726  fi
24727
24728  # The short version string, just VERSION_NUMBER and PRE, if present.
24729  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24730
24731  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
24732$as_echo_n "checking for version string... " >&6; }
24733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
24734$as_echo "$VERSION_STRING" >&6; }
24735
24736
24737
24738
24739
24740
24741
24742
24743
24744
24745
24746
24747
24748
24749
24750###############################################################################
24751#
24752# Setup BootJDK, used to bootstrap the build.
24753#
24754###############################################################################
24755
24756
24757  BOOT_JDK_FOUND=no
24758
24759# Check whether --with-boot-jdk was given.
24760if test "${with_boot_jdk+set}" = set; then :
24761  withval=$with_boot_jdk;
24762fi
24763
24764
24765  # We look for the Boot JDK through various means, going from more certain to
24766  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
24767  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
24768  # must check if this is indeed valid; otherwise we'll continue looking.
24769
24770  # Test: Is bootjdk explicitely set by command line arguments?
24771
24772  if test "x$BOOT_JDK_FOUND" = xno; then
24773    # Now execute the test
24774
24775  if test "x$with_boot_jdk" != x; then
24776    BOOT_JDK=$with_boot_jdk
24777    BOOT_JDK_FOUND=maybe
24778    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
24779$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
24780  fi
24781
24782
24783    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24784    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24785      # Do we have a bin/java?
24786      if test ! -x "$BOOT_JDK/bin/java"; then
24787        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24788$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24789        BOOT_JDK_FOUND=no
24790      else
24791        # Do we have a bin/javac?
24792        if test ! -x "$BOOT_JDK/bin/javac"; then
24793          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24794$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24795          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24796$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24797          BOOT_JDK_FOUND=no
24798        else
24799          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24800          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
24801
24802          # Extra M4 quote needed to protect [] in grep expression.
24803          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24804          if test "x$FOUND_CORRECT_VERSION" = x; then
24805            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24806$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24807            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24808$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24809            BOOT_JDK_FOUND=no
24810          else
24811            # We're done! :-)
24812            BOOT_JDK_FOUND=yes
24813
24814  # Only process if variable expands to non-empty
24815
24816  if test "x$BOOT_JDK" != x; then
24817    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24818
24819  # Input might be given as Windows format, start by converting to
24820  # unix format.
24821  path="$BOOT_JDK"
24822  new_path=`$CYGPATH -u "$path"`
24823
24824  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24825  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24826  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24827  # "foo.exe" is OK but "foo" is an error.
24828  #
24829  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24830  # It is also a way to make sure we got the proper file name for the real test later on.
24831  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24832  if test "x$test_shortpath" = x; then
24833    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24834$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24835    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24836  fi
24837
24838  # Call helper function which possibly converts this using DOS-style short mode.
24839  # If so, the updated path is stored in $new_path.
24840
24841  input_path="$new_path"
24842  # Check if we need to convert this using DOS-style short mode. If the path
24843  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24844  # take no chances and rewrite it.
24845  # Note: m4 eats our [], so we need to use [ and ] instead.
24846  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24847  if test "x$has_forbidden_chars" != x; then
24848    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24849    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24850    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24851    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24852      # Going to short mode and back again did indeed matter. Since short mode is
24853      # case insensitive, let's make it lowercase to improve readability.
24854      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24855      # Now convert it back to Unix-style (cygpath)
24856      input_path=`$CYGPATH -u "$shortmode_path"`
24857      new_path="$input_path"
24858    fi
24859  fi
24860
24861  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24862  if test "x$test_cygdrive_prefix" = x; then
24863    # As a simple fix, exclude /usr/bin since it's not a real path.
24864    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24865      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24866      # a path prefixed by /cygdrive for fixpath to work.
24867      new_path="$CYGWIN_ROOT_PATH$input_path"
24868    fi
24869  fi
24870
24871
24872  if test "x$path" != "x$new_path"; then
24873    BOOT_JDK="$new_path"
24874    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24875$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24876  fi
24877
24878    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24879
24880  path="$BOOT_JDK"
24881  has_colon=`$ECHO $path | $GREP ^.:`
24882  new_path="$path"
24883  if test "x$has_colon" = x; then
24884    # Not in mixed or Windows style, start by that.
24885    new_path=`cmd //c echo $path`
24886  fi
24887
24888
24889  input_path="$new_path"
24890  # Check if we need to convert this using DOS-style short mode. If the path
24891  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24892  # take no chances and rewrite it.
24893  # Note: m4 eats our [], so we need to use [ and ] instead.
24894  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24895  if test "x$has_forbidden_chars" != x; then
24896    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24897    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24898  fi
24899
24900
24901  windows_path="$new_path"
24902  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24903    unix_path=`$CYGPATH -u "$windows_path"`
24904    new_path="$unix_path"
24905  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24906    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24907    new_path="$unix_path"
24908  fi
24909
24910  if test "x$path" != "x$new_path"; then
24911    BOOT_JDK="$new_path"
24912    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24913$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24914  fi
24915
24916  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24917  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24918
24919    else
24920      # We're on a unix platform. Hooray! :)
24921      path="$BOOT_JDK"
24922      has_space=`$ECHO "$path" | $GREP " "`
24923      if test "x$has_space" != x; then
24924        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24925$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24926        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24927      fi
24928
24929      # Use eval to expand a potential ~
24930      eval path="$path"
24931      if test ! -f "$path" && test ! -d "$path"; then
24932        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24933      fi
24934
24935      if test -d "$path"; then
24936        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24937      else
24938        dir="`$DIRNAME "$path"`"
24939        base="`$BASENAME "$path"`"
24940        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24941      fi
24942    fi
24943  fi
24944
24945            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24946$as_echo_n "checking for Boot JDK... " >&6; }
24947            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24948$as_echo "$BOOT_JDK" >&6; }
24949            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24950$as_echo_n "checking Boot JDK version... " >&6; }
24951            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24952            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24953$as_echo "$BOOT_JDK_VERSION" >&6; }
24954          fi # end check jdk version
24955        fi # end check javac
24956      fi # end check java
24957    fi # end check boot jdk found
24958  fi
24959
24960  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
24961    # Having specified an argument which is incorrect will produce an instant failure;
24962    # we should not go on looking
24963    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
24964  fi
24965
24966  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
24967
24968  if test "x$BOOT_JDK_FOUND" = xno; then
24969    # Now execute the test
24970
24971  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
24972    # First check at user selected default
24973
24974  if test "x$BOOT_JDK_FOUND" = xno; then
24975    # Now execute the test
24976
24977  if test -x /usr/libexec/java_home; then
24978    BOOT_JDK=`/usr/libexec/java_home `
24979    BOOT_JDK_FOUND=maybe
24980    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
24981$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
24982  fi
24983
24984
24985    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24986    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24987      # Do we have a bin/java?
24988      if test ! -x "$BOOT_JDK/bin/java"; then
24989        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24990$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24991        BOOT_JDK_FOUND=no
24992      else
24993        # Do we have a bin/javac?
24994        if test ! -x "$BOOT_JDK/bin/javac"; then
24995          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24996$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24997          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24998$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24999          BOOT_JDK_FOUND=no
25000        else
25001          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25002          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25003
25004          # Extra M4 quote needed to protect [] in grep expression.
25005          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25006          if test "x$FOUND_CORRECT_VERSION" = x; then
25007            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25008$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25009            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25010$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25011            BOOT_JDK_FOUND=no
25012          else
25013            # We're done! :-)
25014            BOOT_JDK_FOUND=yes
25015
25016  # Only process if variable expands to non-empty
25017
25018  if test "x$BOOT_JDK" != x; then
25019    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25020
25021  # Input might be given as Windows format, start by converting to
25022  # unix format.
25023  path="$BOOT_JDK"
25024  new_path=`$CYGPATH -u "$path"`
25025
25026  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25027  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25028  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25029  # "foo.exe" is OK but "foo" is an error.
25030  #
25031  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25032  # It is also a way to make sure we got the proper file name for the real test later on.
25033  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25034  if test "x$test_shortpath" = x; then
25035    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25036$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25037    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25038  fi
25039
25040  # Call helper function which possibly converts this using DOS-style short mode.
25041  # If so, the updated path is stored in $new_path.
25042
25043  input_path="$new_path"
25044  # Check if we need to convert this using DOS-style short mode. If the path
25045  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25046  # take no chances and rewrite it.
25047  # Note: m4 eats our [], so we need to use [ and ] instead.
25048  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25049  if test "x$has_forbidden_chars" != x; then
25050    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25051    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25052    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25053    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25054      # Going to short mode and back again did indeed matter. Since short mode is
25055      # case insensitive, let's make it lowercase to improve readability.
25056      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25057      # Now convert it back to Unix-style (cygpath)
25058      input_path=`$CYGPATH -u "$shortmode_path"`
25059      new_path="$input_path"
25060    fi
25061  fi
25062
25063  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25064  if test "x$test_cygdrive_prefix" = x; then
25065    # As a simple fix, exclude /usr/bin since it's not a real path.
25066    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25067      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25068      # a path prefixed by /cygdrive for fixpath to work.
25069      new_path="$CYGWIN_ROOT_PATH$input_path"
25070    fi
25071  fi
25072
25073
25074  if test "x$path" != "x$new_path"; then
25075    BOOT_JDK="$new_path"
25076    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25077$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25078  fi
25079
25080    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25081
25082  path="$BOOT_JDK"
25083  has_colon=`$ECHO $path | $GREP ^.:`
25084  new_path="$path"
25085  if test "x$has_colon" = x; then
25086    # Not in mixed or Windows style, start by that.
25087    new_path=`cmd //c echo $path`
25088  fi
25089
25090
25091  input_path="$new_path"
25092  # Check if we need to convert this using DOS-style short mode. If the path
25093  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25094  # take no chances and rewrite it.
25095  # Note: m4 eats our [], so we need to use [ and ] instead.
25096  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25097  if test "x$has_forbidden_chars" != x; then
25098    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25099    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25100  fi
25101
25102
25103  windows_path="$new_path"
25104  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25105    unix_path=`$CYGPATH -u "$windows_path"`
25106    new_path="$unix_path"
25107  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25108    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25109    new_path="$unix_path"
25110  fi
25111
25112  if test "x$path" != "x$new_path"; then
25113    BOOT_JDK="$new_path"
25114    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25115$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25116  fi
25117
25118  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25119  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25120
25121    else
25122      # We're on a unix platform. Hooray! :)
25123      path="$BOOT_JDK"
25124      has_space=`$ECHO "$path" | $GREP " "`
25125      if test "x$has_space" != x; then
25126        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25127$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25128        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25129      fi
25130
25131      # Use eval to expand a potential ~
25132      eval path="$path"
25133      if test ! -f "$path" && test ! -d "$path"; then
25134        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25135      fi
25136
25137      if test -d "$path"; then
25138        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25139      else
25140        dir="`$DIRNAME "$path"`"
25141        base="`$BASENAME "$path"`"
25142        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25143      fi
25144    fi
25145  fi
25146
25147            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25148$as_echo_n "checking for Boot JDK... " >&6; }
25149            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25150$as_echo "$BOOT_JDK" >&6; }
25151            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25152$as_echo_n "checking Boot JDK version... " >&6; }
25153            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25154            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25155$as_echo "$BOOT_JDK_VERSION" >&6; }
25156          fi # end check jdk version
25157        fi # end check javac
25158      fi # end check java
25159    fi # end check boot jdk found
25160  fi
25161
25162    # If that did not work out (e.g. too old), try explicit versions instead
25163
25164  if test "x$BOOT_JDK_FOUND" = xno; then
25165    # Now execute the test
25166
25167  if test -x /usr/libexec/java_home; then
25168    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
25169    BOOT_JDK_FOUND=maybe
25170    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
25171$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
25172  fi
25173
25174
25175    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25176    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25177      # Do we have a bin/java?
25178      if test ! -x "$BOOT_JDK/bin/java"; then
25179        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25180$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25181        BOOT_JDK_FOUND=no
25182      else
25183        # Do we have a bin/javac?
25184        if test ! -x "$BOOT_JDK/bin/javac"; then
25185          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25186$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25187          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25188$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25189          BOOT_JDK_FOUND=no
25190        else
25191          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25192          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25193
25194          # Extra M4 quote needed to protect [] in grep expression.
25195          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25196          if test "x$FOUND_CORRECT_VERSION" = x; then
25197            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25198$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25199            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25200$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25201            BOOT_JDK_FOUND=no
25202          else
25203            # We're done! :-)
25204            BOOT_JDK_FOUND=yes
25205
25206  # Only process if variable expands to non-empty
25207
25208  if test "x$BOOT_JDK" != x; then
25209    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25210
25211  # Input might be given as Windows format, start by converting to
25212  # unix format.
25213  path="$BOOT_JDK"
25214  new_path=`$CYGPATH -u "$path"`
25215
25216  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25217  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25218  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25219  # "foo.exe" is OK but "foo" is an error.
25220  #
25221  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25222  # It is also a way to make sure we got the proper file name for the real test later on.
25223  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25224  if test "x$test_shortpath" = x; then
25225    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25226$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25227    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25228  fi
25229
25230  # Call helper function which possibly converts this using DOS-style short mode.
25231  # If so, the updated path is stored in $new_path.
25232
25233  input_path="$new_path"
25234  # Check if we need to convert this using DOS-style short mode. If the path
25235  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25236  # take no chances and rewrite it.
25237  # Note: m4 eats our [], so we need to use [ and ] instead.
25238  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25239  if test "x$has_forbidden_chars" != x; then
25240    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25241    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25242    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25243    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25244      # Going to short mode and back again did indeed matter. Since short mode is
25245      # case insensitive, let's make it lowercase to improve readability.
25246      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25247      # Now convert it back to Unix-style (cygpath)
25248      input_path=`$CYGPATH -u "$shortmode_path"`
25249      new_path="$input_path"
25250    fi
25251  fi
25252
25253  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25254  if test "x$test_cygdrive_prefix" = x; then
25255    # As a simple fix, exclude /usr/bin since it's not a real path.
25256    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25257      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25258      # a path prefixed by /cygdrive for fixpath to work.
25259      new_path="$CYGWIN_ROOT_PATH$input_path"
25260    fi
25261  fi
25262
25263
25264  if test "x$path" != "x$new_path"; then
25265    BOOT_JDK="$new_path"
25266    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25267$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25268  fi
25269
25270    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25271
25272  path="$BOOT_JDK"
25273  has_colon=`$ECHO $path | $GREP ^.:`
25274  new_path="$path"
25275  if test "x$has_colon" = x; then
25276    # Not in mixed or Windows style, start by that.
25277    new_path=`cmd //c echo $path`
25278  fi
25279
25280
25281  input_path="$new_path"
25282  # Check if we need to convert this using DOS-style short mode. If the path
25283  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25284  # take no chances and rewrite it.
25285  # Note: m4 eats our [], so we need to use [ and ] instead.
25286  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25287  if test "x$has_forbidden_chars" != x; then
25288    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25289    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25290  fi
25291
25292
25293  windows_path="$new_path"
25294  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25295    unix_path=`$CYGPATH -u "$windows_path"`
25296    new_path="$unix_path"
25297  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25298    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25299    new_path="$unix_path"
25300  fi
25301
25302  if test "x$path" != "x$new_path"; then
25303    BOOT_JDK="$new_path"
25304    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25305$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25306  fi
25307
25308  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25309  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25310
25311    else
25312      # We're on a unix platform. Hooray! :)
25313      path="$BOOT_JDK"
25314      has_space=`$ECHO "$path" | $GREP " "`
25315      if test "x$has_space" != x; then
25316        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25317$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25318        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25319      fi
25320
25321      # Use eval to expand a potential ~
25322      eval path="$path"
25323      if test ! -f "$path" && test ! -d "$path"; then
25324        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25325      fi
25326
25327      if test -d "$path"; then
25328        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25329      else
25330        dir="`$DIRNAME "$path"`"
25331        base="`$BASENAME "$path"`"
25332        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25333      fi
25334    fi
25335  fi
25336
25337            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25338$as_echo_n "checking for Boot JDK... " >&6; }
25339            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25340$as_echo "$BOOT_JDK" >&6; }
25341            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25342$as_echo_n "checking Boot JDK version... " >&6; }
25343            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25344            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25345$as_echo "$BOOT_JDK_VERSION" >&6; }
25346          fi # end check jdk version
25347        fi # end check javac
25348      fi # end check java
25349    fi # end check boot jdk found
25350  fi
25351
25352
25353  if test "x$BOOT_JDK_FOUND" = xno; then
25354    # Now execute the test
25355
25356  if test -x /usr/libexec/java_home; then
25357    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
25358    BOOT_JDK_FOUND=maybe
25359    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
25360$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
25361  fi
25362
25363
25364    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25365    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25366      # Do we have a bin/java?
25367      if test ! -x "$BOOT_JDK/bin/java"; then
25368        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25369$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25370        BOOT_JDK_FOUND=no
25371      else
25372        # Do we have a bin/javac?
25373        if test ! -x "$BOOT_JDK/bin/javac"; then
25374          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25375$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25376          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25377$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25378          BOOT_JDK_FOUND=no
25379        else
25380          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25381          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25382
25383          # Extra M4 quote needed to protect [] in grep expression.
25384          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25385          if test "x$FOUND_CORRECT_VERSION" = x; then
25386            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25387$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25388            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25389$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25390            BOOT_JDK_FOUND=no
25391          else
25392            # We're done! :-)
25393            BOOT_JDK_FOUND=yes
25394
25395  # Only process if variable expands to non-empty
25396
25397  if test "x$BOOT_JDK" != x; then
25398    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25399
25400  # Input might be given as Windows format, start by converting to
25401  # unix format.
25402  path="$BOOT_JDK"
25403  new_path=`$CYGPATH -u "$path"`
25404
25405  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25406  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25407  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25408  # "foo.exe" is OK but "foo" is an error.
25409  #
25410  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25411  # It is also a way to make sure we got the proper file name for the real test later on.
25412  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25413  if test "x$test_shortpath" = x; then
25414    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25415$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25416    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25417  fi
25418
25419  # Call helper function which possibly converts this using DOS-style short mode.
25420  # If so, the updated path is stored in $new_path.
25421
25422  input_path="$new_path"
25423  # Check if we need to convert this using DOS-style short mode. If the path
25424  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25425  # take no chances and rewrite it.
25426  # Note: m4 eats our [], so we need to use [ and ] instead.
25427  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25428  if test "x$has_forbidden_chars" != x; then
25429    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25430    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25431    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25432    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25433      # Going to short mode and back again did indeed matter. Since short mode is
25434      # case insensitive, let's make it lowercase to improve readability.
25435      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25436      # Now convert it back to Unix-style (cygpath)
25437      input_path=`$CYGPATH -u "$shortmode_path"`
25438      new_path="$input_path"
25439    fi
25440  fi
25441
25442  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25443  if test "x$test_cygdrive_prefix" = x; then
25444    # As a simple fix, exclude /usr/bin since it's not a real path.
25445    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25446      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25447      # a path prefixed by /cygdrive for fixpath to work.
25448      new_path="$CYGWIN_ROOT_PATH$input_path"
25449    fi
25450  fi
25451
25452
25453  if test "x$path" != "x$new_path"; then
25454    BOOT_JDK="$new_path"
25455    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25456$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25457  fi
25458
25459    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25460
25461  path="$BOOT_JDK"
25462  has_colon=`$ECHO $path | $GREP ^.:`
25463  new_path="$path"
25464  if test "x$has_colon" = x; then
25465    # Not in mixed or Windows style, start by that.
25466    new_path=`cmd //c echo $path`
25467  fi
25468
25469
25470  input_path="$new_path"
25471  # Check if we need to convert this using DOS-style short mode. If the path
25472  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25473  # take no chances and rewrite it.
25474  # Note: m4 eats our [], so we need to use [ and ] instead.
25475  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25476  if test "x$has_forbidden_chars" != x; then
25477    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25478    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25479  fi
25480
25481
25482  windows_path="$new_path"
25483  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25484    unix_path=`$CYGPATH -u "$windows_path"`
25485    new_path="$unix_path"
25486  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25487    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25488    new_path="$unix_path"
25489  fi
25490
25491  if test "x$path" != "x$new_path"; then
25492    BOOT_JDK="$new_path"
25493    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25494$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25495  fi
25496
25497  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25498  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25499
25500    else
25501      # We're on a unix platform. Hooray! :)
25502      path="$BOOT_JDK"
25503      has_space=`$ECHO "$path" | $GREP " "`
25504      if test "x$has_space" != x; then
25505        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25506$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25507        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25508      fi
25509
25510      # Use eval to expand a potential ~
25511      eval path="$path"
25512      if test ! -f "$path" && test ! -d "$path"; then
25513        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25514      fi
25515
25516      if test -d "$path"; then
25517        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25518      else
25519        dir="`$DIRNAME "$path"`"
25520        base="`$BASENAME "$path"`"
25521        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25522      fi
25523    fi
25524  fi
25525
25526            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25527$as_echo_n "checking for Boot JDK... " >&6; }
25528            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25529$as_echo "$BOOT_JDK" >&6; }
25530            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25531$as_echo_n "checking Boot JDK version... " >&6; }
25532            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25533            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25534$as_echo "$BOOT_JDK_VERSION" >&6; }
25535          fi # end check jdk version
25536        fi # end check javac
25537      fi # end check java
25538    fi # end check boot jdk found
25539  fi
25540
25541
25542  if test "x$BOOT_JDK_FOUND" = xno; then
25543    # Now execute the test
25544
25545  if test -x /usr/libexec/java_home; then
25546    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
25547    BOOT_JDK_FOUND=maybe
25548    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
25549$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
25550  fi
25551
25552
25553    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25554    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25555      # Do we have a bin/java?
25556      if test ! -x "$BOOT_JDK/bin/java"; then
25557        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25558$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25559        BOOT_JDK_FOUND=no
25560      else
25561        # Do we have a bin/javac?
25562        if test ! -x "$BOOT_JDK/bin/javac"; then
25563          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25564$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25565          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25566$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25567          BOOT_JDK_FOUND=no
25568        else
25569          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25570          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25571
25572          # Extra M4 quote needed to protect [] in grep expression.
25573          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25574          if test "x$FOUND_CORRECT_VERSION" = x; then
25575            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25576$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25577            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25578$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25579            BOOT_JDK_FOUND=no
25580          else
25581            # We're done! :-)
25582            BOOT_JDK_FOUND=yes
25583
25584  # Only process if variable expands to non-empty
25585
25586  if test "x$BOOT_JDK" != x; then
25587    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25588
25589  # Input might be given as Windows format, start by converting to
25590  # unix format.
25591  path="$BOOT_JDK"
25592  new_path=`$CYGPATH -u "$path"`
25593
25594  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25595  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25596  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25597  # "foo.exe" is OK but "foo" is an error.
25598  #
25599  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25600  # It is also a way to make sure we got the proper file name for the real test later on.
25601  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25602  if test "x$test_shortpath" = x; then
25603    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25604$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25605    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25606  fi
25607
25608  # Call helper function which possibly converts this using DOS-style short mode.
25609  # If so, the updated path is stored in $new_path.
25610
25611  input_path="$new_path"
25612  # Check if we need to convert this using DOS-style short mode. If the path
25613  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25614  # take no chances and rewrite it.
25615  # Note: m4 eats our [], so we need to use [ and ] instead.
25616  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25617  if test "x$has_forbidden_chars" != x; then
25618    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25619    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25620    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25621    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25622      # Going to short mode and back again did indeed matter. Since short mode is
25623      # case insensitive, let's make it lowercase to improve readability.
25624      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25625      # Now convert it back to Unix-style (cygpath)
25626      input_path=`$CYGPATH -u "$shortmode_path"`
25627      new_path="$input_path"
25628    fi
25629  fi
25630
25631  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25632  if test "x$test_cygdrive_prefix" = x; then
25633    # As a simple fix, exclude /usr/bin since it's not a real path.
25634    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25635      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25636      # a path prefixed by /cygdrive for fixpath to work.
25637      new_path="$CYGWIN_ROOT_PATH$input_path"
25638    fi
25639  fi
25640
25641
25642  if test "x$path" != "x$new_path"; then
25643    BOOT_JDK="$new_path"
25644    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25645$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25646  fi
25647
25648    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25649
25650  path="$BOOT_JDK"
25651  has_colon=`$ECHO $path | $GREP ^.:`
25652  new_path="$path"
25653  if test "x$has_colon" = x; then
25654    # Not in mixed or Windows style, start by that.
25655    new_path=`cmd //c echo $path`
25656  fi
25657
25658
25659  input_path="$new_path"
25660  # Check if we need to convert this using DOS-style short mode. If the path
25661  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25662  # take no chances and rewrite it.
25663  # Note: m4 eats our [], so we need to use [ and ] instead.
25664  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25665  if test "x$has_forbidden_chars" != x; then
25666    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25667    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25668  fi
25669
25670
25671  windows_path="$new_path"
25672  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25673    unix_path=`$CYGPATH -u "$windows_path"`
25674    new_path="$unix_path"
25675  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25676    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25677    new_path="$unix_path"
25678  fi
25679
25680  if test "x$path" != "x$new_path"; then
25681    BOOT_JDK="$new_path"
25682    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25683$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25684  fi
25685
25686  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25687  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25688
25689    else
25690      # We're on a unix platform. Hooray! :)
25691      path="$BOOT_JDK"
25692      has_space=`$ECHO "$path" | $GREP " "`
25693      if test "x$has_space" != x; then
25694        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25695$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25696        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25697      fi
25698
25699      # Use eval to expand a potential ~
25700      eval path="$path"
25701      if test ! -f "$path" && test ! -d "$path"; then
25702        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25703      fi
25704
25705      if test -d "$path"; then
25706        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25707      else
25708        dir="`$DIRNAME "$path"`"
25709        base="`$BASENAME "$path"`"
25710        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25711      fi
25712    fi
25713  fi
25714
25715            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25716$as_echo_n "checking for Boot JDK... " >&6; }
25717            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25718$as_echo "$BOOT_JDK" >&6; }
25719            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25720$as_echo_n "checking Boot JDK version... " >&6; }
25721            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25722            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25723$as_echo "$BOOT_JDK_VERSION" >&6; }
25724          fi # end check jdk version
25725        fi # end check javac
25726      fi # end check java
25727    fi # end check boot jdk found
25728  fi
25729
25730  fi
25731
25732
25733    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25734    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25735      # Do we have a bin/java?
25736      if test ! -x "$BOOT_JDK/bin/java"; then
25737        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25738$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25739        BOOT_JDK_FOUND=no
25740      else
25741        # Do we have a bin/javac?
25742        if test ! -x "$BOOT_JDK/bin/javac"; then
25743          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25744$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25745          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25746$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25747          BOOT_JDK_FOUND=no
25748        else
25749          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25750          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25751
25752          # Extra M4 quote needed to protect [] in grep expression.
25753          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25754          if test "x$FOUND_CORRECT_VERSION" = x; then
25755            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25756$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25757            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25758$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25759            BOOT_JDK_FOUND=no
25760          else
25761            # We're done! :-)
25762            BOOT_JDK_FOUND=yes
25763
25764  # Only process if variable expands to non-empty
25765
25766  if test "x$BOOT_JDK" != x; then
25767    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25768
25769  # Input might be given as Windows format, start by converting to
25770  # unix format.
25771  path="$BOOT_JDK"
25772  new_path=`$CYGPATH -u "$path"`
25773
25774  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25775  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25776  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25777  # "foo.exe" is OK but "foo" is an error.
25778  #
25779  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25780  # It is also a way to make sure we got the proper file name for the real test later on.
25781  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25782  if test "x$test_shortpath" = x; then
25783    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25784$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25785    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25786  fi
25787
25788  # Call helper function which possibly converts this using DOS-style short mode.
25789  # If so, the updated path is stored in $new_path.
25790
25791  input_path="$new_path"
25792  # Check if we need to convert this using DOS-style short mode. If the path
25793  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25794  # take no chances and rewrite it.
25795  # Note: m4 eats our [], so we need to use [ and ] instead.
25796  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25797  if test "x$has_forbidden_chars" != x; then
25798    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25799    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25800    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25801    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25802      # Going to short mode and back again did indeed matter. Since short mode is
25803      # case insensitive, let's make it lowercase to improve readability.
25804      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25805      # Now convert it back to Unix-style (cygpath)
25806      input_path=`$CYGPATH -u "$shortmode_path"`
25807      new_path="$input_path"
25808    fi
25809  fi
25810
25811  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25812  if test "x$test_cygdrive_prefix" = x; then
25813    # As a simple fix, exclude /usr/bin since it's not a real path.
25814    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25815      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25816      # a path prefixed by /cygdrive for fixpath to work.
25817      new_path="$CYGWIN_ROOT_PATH$input_path"
25818    fi
25819  fi
25820
25821
25822  if test "x$path" != "x$new_path"; then
25823    BOOT_JDK="$new_path"
25824    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25825$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25826  fi
25827
25828    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25829
25830  path="$BOOT_JDK"
25831  has_colon=`$ECHO $path | $GREP ^.:`
25832  new_path="$path"
25833  if test "x$has_colon" = x; then
25834    # Not in mixed or Windows style, start by that.
25835    new_path=`cmd //c echo $path`
25836  fi
25837
25838
25839  input_path="$new_path"
25840  # Check if we need to convert this using DOS-style short mode. If the path
25841  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25842  # take no chances and rewrite it.
25843  # Note: m4 eats our [], so we need to use [ and ] instead.
25844  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25845  if test "x$has_forbidden_chars" != x; then
25846    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25847    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25848  fi
25849
25850
25851  windows_path="$new_path"
25852  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25853    unix_path=`$CYGPATH -u "$windows_path"`
25854    new_path="$unix_path"
25855  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25856    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25857    new_path="$unix_path"
25858  fi
25859
25860  if test "x$path" != "x$new_path"; then
25861    BOOT_JDK="$new_path"
25862    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25863$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25864  fi
25865
25866  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25867  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25868
25869    else
25870      # We're on a unix platform. Hooray! :)
25871      path="$BOOT_JDK"
25872      has_space=`$ECHO "$path" | $GREP " "`
25873      if test "x$has_space" != x; then
25874        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25875$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25876        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25877      fi
25878
25879      # Use eval to expand a potential ~
25880      eval path="$path"
25881      if test ! -f "$path" && test ! -d "$path"; then
25882        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25883      fi
25884
25885      if test -d "$path"; then
25886        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25887      else
25888        dir="`$DIRNAME "$path"`"
25889        base="`$BASENAME "$path"`"
25890        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25891      fi
25892    fi
25893  fi
25894
25895            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25896$as_echo_n "checking for Boot JDK... " >&6; }
25897            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25898$as_echo "$BOOT_JDK" >&6; }
25899            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25900$as_echo_n "checking Boot JDK version... " >&6; }
25901            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25902            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25903$as_echo "$BOOT_JDK_VERSION" >&6; }
25904          fi # end check jdk version
25905        fi # end check javac
25906      fi # end check java
25907    fi # end check boot jdk found
25908  fi
25909
25910
25911  # Test: Is $JAVA_HOME set?
25912
25913  if test "x$BOOT_JDK_FOUND" = xno; then
25914    # Now execute the test
25915
25916  if test "x$JAVA_HOME" != x; then
25917    JAVA_HOME_PROCESSED="$JAVA_HOME"
25918
25919  # Only process if variable expands to non-empty
25920
25921  if test "x$JAVA_HOME_PROCESSED" != x; then
25922    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25923
25924  # Input might be given as Windows format, start by converting to
25925  # unix format.
25926  path="$JAVA_HOME_PROCESSED"
25927  new_path=`$CYGPATH -u "$path"`
25928
25929  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25930  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25931  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25932  # "foo.exe" is OK but "foo" is an error.
25933  #
25934  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25935  # It is also a way to make sure we got the proper file name for the real test later on.
25936  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25937  if test "x$test_shortpath" = x; then
25938    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
25939$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
25940    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
25941  fi
25942
25943  # Call helper function which possibly converts this using DOS-style short mode.
25944  # If so, the updated path is stored in $new_path.
25945
25946  input_path="$new_path"
25947  # Check if we need to convert this using DOS-style short mode. If the path
25948  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25949  # take no chances and rewrite it.
25950  # Note: m4 eats our [], so we need to use [ and ] instead.
25951  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25952  if test "x$has_forbidden_chars" != x; then
25953    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25954    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25955    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25956    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25957      # Going to short mode and back again did indeed matter. Since short mode is
25958      # case insensitive, let's make it lowercase to improve readability.
25959      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25960      # Now convert it back to Unix-style (cygpath)
25961      input_path=`$CYGPATH -u "$shortmode_path"`
25962      new_path="$input_path"
25963    fi
25964  fi
25965
25966  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25967  if test "x$test_cygdrive_prefix" = x; then
25968    # As a simple fix, exclude /usr/bin since it's not a real path.
25969    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25970      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25971      # a path prefixed by /cygdrive for fixpath to work.
25972      new_path="$CYGWIN_ROOT_PATH$input_path"
25973    fi
25974  fi
25975
25976
25977  if test "x$path" != "x$new_path"; then
25978    JAVA_HOME_PROCESSED="$new_path"
25979    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
25980$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
25981  fi
25982
25983    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25984
25985  path="$JAVA_HOME_PROCESSED"
25986  has_colon=`$ECHO $path | $GREP ^.:`
25987  new_path="$path"
25988  if test "x$has_colon" = x; then
25989    # Not in mixed or Windows style, start by that.
25990    new_path=`cmd //c echo $path`
25991  fi
25992
25993
25994  input_path="$new_path"
25995  # Check if we need to convert this using DOS-style short mode. If the path
25996  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25997  # take no chances and rewrite it.
25998  # Note: m4 eats our [], so we need to use [ and ] instead.
25999  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26000  if test "x$has_forbidden_chars" != x; then
26001    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26002    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26003  fi
26004
26005
26006  windows_path="$new_path"
26007  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26008    unix_path=`$CYGPATH -u "$windows_path"`
26009    new_path="$unix_path"
26010  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26011    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26012    new_path="$unix_path"
26013  fi
26014
26015  if test "x$path" != "x$new_path"; then
26016    JAVA_HOME_PROCESSED="$new_path"
26017    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26018$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26019  fi
26020
26021  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26022  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26023
26024    else
26025      # We're on a unix platform. Hooray! :)
26026      path="$JAVA_HOME_PROCESSED"
26027      has_space=`$ECHO "$path" | $GREP " "`
26028      if test "x$has_space" != x; then
26029        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26030$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26031        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26032      fi
26033
26034      # Use eval to expand a potential ~
26035      eval path="$path"
26036      if test ! -f "$path" && test ! -d "$path"; then
26037        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
26038      fi
26039
26040      if test -d "$path"; then
26041        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
26042      else
26043        dir="`$DIRNAME "$path"`"
26044        base="`$BASENAME "$path"`"
26045        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
26046      fi
26047    fi
26048  fi
26049
26050    if test ! -d "$JAVA_HOME_PROCESSED"; then
26051      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
26052$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
26053    else
26054      # Aha, the user has set a JAVA_HOME
26055      # let us use that as the Boot JDK.
26056      BOOT_JDK="$JAVA_HOME_PROCESSED"
26057      BOOT_JDK_FOUND=maybe
26058      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
26059$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
26060    fi
26061  fi
26062
26063
26064    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26065    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26066      # Do we have a bin/java?
26067      if test ! -x "$BOOT_JDK/bin/java"; then
26068        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26069$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26070        BOOT_JDK_FOUND=no
26071      else
26072        # Do we have a bin/javac?
26073        if test ! -x "$BOOT_JDK/bin/javac"; then
26074          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26075$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26076          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26077$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26078          BOOT_JDK_FOUND=no
26079        else
26080          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26081          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26082
26083          # Extra M4 quote needed to protect [] in grep expression.
26084          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26085          if test "x$FOUND_CORRECT_VERSION" = x; then
26086            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26087$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26088            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26089$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26090            BOOT_JDK_FOUND=no
26091          else
26092            # We're done! :-)
26093            BOOT_JDK_FOUND=yes
26094
26095  # Only process if variable expands to non-empty
26096
26097  if test "x$BOOT_JDK" != x; then
26098    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26099
26100  # Input might be given as Windows format, start by converting to
26101  # unix format.
26102  path="$BOOT_JDK"
26103  new_path=`$CYGPATH -u "$path"`
26104
26105  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26106  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26107  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26108  # "foo.exe" is OK but "foo" is an error.
26109  #
26110  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26111  # It is also a way to make sure we got the proper file name for the real test later on.
26112  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26113  if test "x$test_shortpath" = x; then
26114    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26115$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26116    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26117  fi
26118
26119  # Call helper function which possibly converts this using DOS-style short mode.
26120  # If so, the updated path is stored in $new_path.
26121
26122  input_path="$new_path"
26123  # Check if we need to convert this using DOS-style short mode. If the path
26124  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26125  # take no chances and rewrite it.
26126  # Note: m4 eats our [], so we need to use [ and ] instead.
26127  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26128  if test "x$has_forbidden_chars" != x; then
26129    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26130    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26131    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26132    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26133      # Going to short mode and back again did indeed matter. Since short mode is
26134      # case insensitive, let's make it lowercase to improve readability.
26135      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26136      # Now convert it back to Unix-style (cygpath)
26137      input_path=`$CYGPATH -u "$shortmode_path"`
26138      new_path="$input_path"
26139    fi
26140  fi
26141
26142  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26143  if test "x$test_cygdrive_prefix" = x; then
26144    # As a simple fix, exclude /usr/bin since it's not a real path.
26145    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26146      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26147      # a path prefixed by /cygdrive for fixpath to work.
26148      new_path="$CYGWIN_ROOT_PATH$input_path"
26149    fi
26150  fi
26151
26152
26153  if test "x$path" != "x$new_path"; then
26154    BOOT_JDK="$new_path"
26155    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26156$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26157  fi
26158
26159    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26160
26161  path="$BOOT_JDK"
26162  has_colon=`$ECHO $path | $GREP ^.:`
26163  new_path="$path"
26164  if test "x$has_colon" = x; then
26165    # Not in mixed or Windows style, start by that.
26166    new_path=`cmd //c echo $path`
26167  fi
26168
26169
26170  input_path="$new_path"
26171  # Check if we need to convert this using DOS-style short mode. If the path
26172  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26173  # take no chances and rewrite it.
26174  # Note: m4 eats our [], so we need to use [ and ] instead.
26175  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26176  if test "x$has_forbidden_chars" != x; then
26177    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26178    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26179  fi
26180
26181
26182  windows_path="$new_path"
26183  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26184    unix_path=`$CYGPATH -u "$windows_path"`
26185    new_path="$unix_path"
26186  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26187    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26188    new_path="$unix_path"
26189  fi
26190
26191  if test "x$path" != "x$new_path"; then
26192    BOOT_JDK="$new_path"
26193    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26194$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26195  fi
26196
26197  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26198  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26199
26200    else
26201      # We're on a unix platform. Hooray! :)
26202      path="$BOOT_JDK"
26203      has_space=`$ECHO "$path" | $GREP " "`
26204      if test "x$has_space" != x; then
26205        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26206$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26207        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26208      fi
26209
26210      # Use eval to expand a potential ~
26211      eval path="$path"
26212      if test ! -f "$path" && test ! -d "$path"; then
26213        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26214      fi
26215
26216      if test -d "$path"; then
26217        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26218      else
26219        dir="`$DIRNAME "$path"`"
26220        base="`$BASENAME "$path"`"
26221        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26222      fi
26223    fi
26224  fi
26225
26226            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26227$as_echo_n "checking for Boot JDK... " >&6; }
26228            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26229$as_echo "$BOOT_JDK" >&6; }
26230            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26231$as_echo_n "checking Boot JDK version... " >&6; }
26232            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26233            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26234$as_echo "$BOOT_JDK_VERSION" >&6; }
26235          fi # end check jdk version
26236        fi # end check javac
26237      fi # end check java
26238    fi # end check boot jdk found
26239  fi
26240
26241
26242  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
26243
26244  if test "x$BOOT_JDK_FOUND" = xno; then
26245    # Now execute the test
26246
26247  # Extract the first word of "javac", so it can be a program name with args.
26248set dummy javac; ac_word=$2
26249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26250$as_echo_n "checking for $ac_word... " >&6; }
26251if ${ac_cv_path_JAVAC_CHECK+:} false; then :
26252  $as_echo_n "(cached) " >&6
26253else
26254  case $JAVAC_CHECK in
26255  [\\/]* | ?:[\\/]*)
26256  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
26257  ;;
26258  *)
26259  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26260for as_dir in $PATH
26261do
26262  IFS=$as_save_IFS
26263  test -z "$as_dir" && as_dir=.
26264    for ac_exec_ext in '' $ac_executable_extensions; do
26265  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26266    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
26267    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26268    break 2
26269  fi
26270done
26271  done
26272IFS=$as_save_IFS
26273
26274  ;;
26275esac
26276fi
26277JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
26278if test -n "$JAVAC_CHECK"; then
26279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
26280$as_echo "$JAVAC_CHECK" >&6; }
26281else
26282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26283$as_echo "no" >&6; }
26284fi
26285
26286
26287  # Extract the first word of "java", so it can be a program name with args.
26288set dummy java; ac_word=$2
26289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26290$as_echo_n "checking for $ac_word... " >&6; }
26291if ${ac_cv_path_JAVA_CHECK+:} false; then :
26292  $as_echo_n "(cached) " >&6
26293else
26294  case $JAVA_CHECK in
26295  [\\/]* | ?:[\\/]*)
26296  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
26297  ;;
26298  *)
26299  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26300for as_dir in $PATH
26301do
26302  IFS=$as_save_IFS
26303  test -z "$as_dir" && as_dir=.
26304    for ac_exec_ext in '' $ac_executable_extensions; do
26305  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26306    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
26307    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26308    break 2
26309  fi
26310done
26311  done
26312IFS=$as_save_IFS
26313
26314  ;;
26315esac
26316fi
26317JAVA_CHECK=$ac_cv_path_JAVA_CHECK
26318if test -n "$JAVA_CHECK"; then
26319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
26320$as_echo "$JAVA_CHECK" >&6; }
26321else
26322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26323$as_echo "no" >&6; }
26324fi
26325
26326
26327  BINARY="$JAVAC_CHECK"
26328  if test "x$JAVAC_CHECK" = x; then
26329    BINARY="$JAVA_CHECK"
26330  fi
26331  if test "x$BINARY" != x; then
26332    # So there is a java(c) binary, it might be part of a JDK.
26333    # Lets find the JDK/JRE directory by following symbolic links.
26334    # Linux/GNU systems often have links from /usr/bin/java to
26335    # /etc/alternatives/java to the real JDK binary.
26336
26337  if test "x$OPENJDK_BUILD_OS" != xwindows; then
26338    # Follow a chain of symbolic links. Use readlink
26339    # where it exists, else fall back to horribly
26340    # complicated shell code.
26341    if test "x$READLINK_TESTED" != yes; then
26342      # On MacOSX there is a readlink tool with a different
26343      # purpose than the GNU readlink tool. Check the found readlink.
26344      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
26345      if test "x$ISGNU" = x; then
26346        # A readlink that we do not know how to use.
26347        # Are there other non-GNU readlinks out there?
26348        READLINK_TESTED=yes
26349        READLINK=
26350      fi
26351    fi
26352
26353    if test "x$READLINK" != x; then
26354      BINARY=`$READLINK -f $BINARY`
26355    else
26356      # Save the current directory for restoring afterwards
26357      STARTDIR=$PWD
26358      COUNTER=0
26359      sym_link_dir=`$DIRNAME $BINARY`
26360      sym_link_file=`$BASENAME $BINARY`
26361      cd $sym_link_dir
26362      # Use -P flag to resolve symlinks in directories.
26363      cd `$THEPWDCMD -P`
26364      sym_link_dir=`$THEPWDCMD -P`
26365      # Resolve file symlinks
26366      while test $COUNTER -lt 20; do
26367        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
26368        if test "x$ISLINK" == x; then
26369          # This is not a symbolic link! We are done!
26370          break
26371        fi
26372        # Again resolve directory symlinks since the target of the just found
26373        # link could be in a different directory
26374        cd `$DIRNAME $ISLINK`
26375        sym_link_dir=`$THEPWDCMD -P`
26376        sym_link_file=`$BASENAME $ISLINK`
26377        let COUNTER=COUNTER+1
26378      done
26379      cd $STARTDIR
26380      BINARY=$sym_link_dir/$sym_link_file
26381    fi
26382  fi
26383
26384    BOOT_JDK=`dirname "$BINARY"`
26385    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
26386    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
26387      # Looks like we found ourselves an JDK
26388      BOOT_JDK_FOUND=maybe
26389      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
26390$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
26391    fi
26392  fi
26393
26394
26395    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26396    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26397      # Do we have a bin/java?
26398      if test ! -x "$BOOT_JDK/bin/java"; then
26399        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26400$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26401        BOOT_JDK_FOUND=no
26402      else
26403        # Do we have a bin/javac?
26404        if test ! -x "$BOOT_JDK/bin/javac"; then
26405          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26406$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26407          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26408$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26409          BOOT_JDK_FOUND=no
26410        else
26411          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26412          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26413
26414          # Extra M4 quote needed to protect [] in grep expression.
26415          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26416          if test "x$FOUND_CORRECT_VERSION" = x; then
26417            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26418$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26419            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26420$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26421            BOOT_JDK_FOUND=no
26422          else
26423            # We're done! :-)
26424            BOOT_JDK_FOUND=yes
26425
26426  # Only process if variable expands to non-empty
26427
26428  if test "x$BOOT_JDK" != x; then
26429    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26430
26431  # Input might be given as Windows format, start by converting to
26432  # unix format.
26433  path="$BOOT_JDK"
26434  new_path=`$CYGPATH -u "$path"`
26435
26436  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26437  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26438  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26439  # "foo.exe" is OK but "foo" is an error.
26440  #
26441  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26442  # It is also a way to make sure we got the proper file name for the real test later on.
26443  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26444  if test "x$test_shortpath" = x; then
26445    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26446$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26447    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26448  fi
26449
26450  # Call helper function which possibly converts this using DOS-style short mode.
26451  # If so, the updated path is stored in $new_path.
26452
26453  input_path="$new_path"
26454  # Check if we need to convert this using DOS-style short mode. If the path
26455  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26456  # take no chances and rewrite it.
26457  # Note: m4 eats our [], so we need to use [ and ] instead.
26458  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26459  if test "x$has_forbidden_chars" != x; then
26460    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26461    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26462    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26463    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26464      # Going to short mode and back again did indeed matter. Since short mode is
26465      # case insensitive, let's make it lowercase to improve readability.
26466      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26467      # Now convert it back to Unix-style (cygpath)
26468      input_path=`$CYGPATH -u "$shortmode_path"`
26469      new_path="$input_path"
26470    fi
26471  fi
26472
26473  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26474  if test "x$test_cygdrive_prefix" = x; then
26475    # As a simple fix, exclude /usr/bin since it's not a real path.
26476    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26477      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26478      # a path prefixed by /cygdrive for fixpath to work.
26479      new_path="$CYGWIN_ROOT_PATH$input_path"
26480    fi
26481  fi
26482
26483
26484  if test "x$path" != "x$new_path"; then
26485    BOOT_JDK="$new_path"
26486    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26487$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26488  fi
26489
26490    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26491
26492  path="$BOOT_JDK"
26493  has_colon=`$ECHO $path | $GREP ^.:`
26494  new_path="$path"
26495  if test "x$has_colon" = x; then
26496    # Not in mixed or Windows style, start by that.
26497    new_path=`cmd //c echo $path`
26498  fi
26499
26500
26501  input_path="$new_path"
26502  # Check if we need to convert this using DOS-style short mode. If the path
26503  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26504  # take no chances and rewrite it.
26505  # Note: m4 eats our [], so we need to use [ and ] instead.
26506  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26507  if test "x$has_forbidden_chars" != x; then
26508    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26509    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26510  fi
26511
26512
26513  windows_path="$new_path"
26514  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26515    unix_path=`$CYGPATH -u "$windows_path"`
26516    new_path="$unix_path"
26517  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26518    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26519    new_path="$unix_path"
26520  fi
26521
26522  if test "x$path" != "x$new_path"; then
26523    BOOT_JDK="$new_path"
26524    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26525$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26526  fi
26527
26528  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26529  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26530
26531    else
26532      # We're on a unix platform. Hooray! :)
26533      path="$BOOT_JDK"
26534      has_space=`$ECHO "$path" | $GREP " "`
26535      if test "x$has_space" != x; then
26536        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26537$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26538        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26539      fi
26540
26541      # Use eval to expand a potential ~
26542      eval path="$path"
26543      if test ! -f "$path" && test ! -d "$path"; then
26544        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26545      fi
26546
26547      if test -d "$path"; then
26548        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26549      else
26550        dir="`$DIRNAME "$path"`"
26551        base="`$BASENAME "$path"`"
26552        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26553      fi
26554    fi
26555  fi
26556
26557            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26558$as_echo_n "checking for Boot JDK... " >&6; }
26559            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26560$as_echo "$BOOT_JDK" >&6; }
26561            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26562$as_echo_n "checking Boot JDK version... " >&6; }
26563            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26564            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26565$as_echo "$BOOT_JDK_VERSION" >&6; }
26566          fi # end check jdk version
26567        fi # end check javac
26568      fi # end check java
26569    fi # end check boot jdk found
26570  fi
26571
26572
26573  # Test: Is there a JDK installed in default, well-known locations?
26574
26575  if test "x$BOOT_JDK_FOUND" = xno; then
26576    # Now execute the test
26577
26578  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26579
26580  if test "x$BOOT_JDK_FOUND" = xno; then
26581    # Now execute the test
26582
26583  if test "x$ProgramW6432" != x; then
26584    VIRTUAL_DIR="$ProgramW6432/Java"
26585
26586  windows_path="$VIRTUAL_DIR"
26587  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26588    unix_path=`$CYGPATH -u "$windows_path"`
26589    VIRTUAL_DIR="$unix_path"
26590  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26591    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26592    VIRTUAL_DIR="$unix_path"
26593  fi
26594
26595
26596  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26597  BOOT_JDK_SUFFIX=""
26598  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26599  if test "x$ALL_JDKS_FOUND" != x; then
26600    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26601
26602  if test "x$BOOT_JDK_FOUND" = xno; then
26603    # Now execute the test
26604
26605        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26606        if test -d "$BOOT_JDK"; then
26607          BOOT_JDK_FOUND=maybe
26608          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26609$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26610        fi
26611
26612
26613    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26614    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26615      # Do we have a bin/java?
26616      if test ! -x "$BOOT_JDK/bin/java"; then
26617        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26618$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26619        BOOT_JDK_FOUND=no
26620      else
26621        # Do we have a bin/javac?
26622        if test ! -x "$BOOT_JDK/bin/javac"; then
26623          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26624$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26625          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26626$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26627          BOOT_JDK_FOUND=no
26628        else
26629          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26630          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26631
26632          # Extra M4 quote needed to protect [] in grep expression.
26633          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26634          if test "x$FOUND_CORRECT_VERSION" = x; then
26635            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26636$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26637            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26638$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26639            BOOT_JDK_FOUND=no
26640          else
26641            # We're done! :-)
26642            BOOT_JDK_FOUND=yes
26643
26644  # Only process if variable expands to non-empty
26645
26646  if test "x$BOOT_JDK" != x; then
26647    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26648
26649  # Input might be given as Windows format, start by converting to
26650  # unix format.
26651  path="$BOOT_JDK"
26652  new_path=`$CYGPATH -u "$path"`
26653
26654  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26655  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26656  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26657  # "foo.exe" is OK but "foo" is an error.
26658  #
26659  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26660  # It is also a way to make sure we got the proper file name for the real test later on.
26661  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26662  if test "x$test_shortpath" = x; then
26663    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26664$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26665    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26666  fi
26667
26668  # Call helper function which possibly converts this using DOS-style short mode.
26669  # If so, the updated path is stored in $new_path.
26670
26671  input_path="$new_path"
26672  # Check if we need to convert this using DOS-style short mode. If the path
26673  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26674  # take no chances and rewrite it.
26675  # Note: m4 eats our [], so we need to use [ and ] instead.
26676  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26677  if test "x$has_forbidden_chars" != x; then
26678    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26679    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26680    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26681    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26682      # Going to short mode and back again did indeed matter. Since short mode is
26683      # case insensitive, let's make it lowercase to improve readability.
26684      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26685      # Now convert it back to Unix-style (cygpath)
26686      input_path=`$CYGPATH -u "$shortmode_path"`
26687      new_path="$input_path"
26688    fi
26689  fi
26690
26691  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26692  if test "x$test_cygdrive_prefix" = x; then
26693    # As a simple fix, exclude /usr/bin since it's not a real path.
26694    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26695      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26696      # a path prefixed by /cygdrive for fixpath to work.
26697      new_path="$CYGWIN_ROOT_PATH$input_path"
26698    fi
26699  fi
26700
26701
26702  if test "x$path" != "x$new_path"; then
26703    BOOT_JDK="$new_path"
26704    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26705$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26706  fi
26707
26708    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26709
26710  path="$BOOT_JDK"
26711  has_colon=`$ECHO $path | $GREP ^.:`
26712  new_path="$path"
26713  if test "x$has_colon" = x; then
26714    # Not in mixed or Windows style, start by that.
26715    new_path=`cmd //c echo $path`
26716  fi
26717
26718
26719  input_path="$new_path"
26720  # Check if we need to convert this using DOS-style short mode. If the path
26721  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26722  # take no chances and rewrite it.
26723  # Note: m4 eats our [], so we need to use [ and ] instead.
26724  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26725  if test "x$has_forbidden_chars" != x; then
26726    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26727    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26728  fi
26729
26730
26731  windows_path="$new_path"
26732  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26733    unix_path=`$CYGPATH -u "$windows_path"`
26734    new_path="$unix_path"
26735  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26736    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26737    new_path="$unix_path"
26738  fi
26739
26740  if test "x$path" != "x$new_path"; then
26741    BOOT_JDK="$new_path"
26742    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26743$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26744  fi
26745
26746  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26747  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26748
26749    else
26750      # We're on a unix platform. Hooray! :)
26751      path="$BOOT_JDK"
26752      has_space=`$ECHO "$path" | $GREP " "`
26753      if test "x$has_space" != x; then
26754        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26755$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26756        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26757      fi
26758
26759      # Use eval to expand a potential ~
26760      eval path="$path"
26761      if test ! -f "$path" && test ! -d "$path"; then
26762        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26763      fi
26764
26765      if test -d "$path"; then
26766        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26767      else
26768        dir="`$DIRNAME "$path"`"
26769        base="`$BASENAME "$path"`"
26770        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26771      fi
26772    fi
26773  fi
26774
26775            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26776$as_echo_n "checking for Boot JDK... " >&6; }
26777            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26778$as_echo "$BOOT_JDK" >&6; }
26779            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26780$as_echo_n "checking Boot JDK version... " >&6; }
26781            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26782            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26783$as_echo "$BOOT_JDK_VERSION" >&6; }
26784          fi # end check jdk version
26785        fi # end check javac
26786      fi # end check java
26787    fi # end check boot jdk found
26788  fi
26789
26790    done
26791  fi
26792
26793  fi
26794
26795
26796    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26797    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26798      # Do we have a bin/java?
26799      if test ! -x "$BOOT_JDK/bin/java"; then
26800        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26801$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26802        BOOT_JDK_FOUND=no
26803      else
26804        # Do we have a bin/javac?
26805        if test ! -x "$BOOT_JDK/bin/javac"; then
26806          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26807$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26808          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26809$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26810          BOOT_JDK_FOUND=no
26811        else
26812          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26813          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26814
26815          # Extra M4 quote needed to protect [] in grep expression.
26816          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26817          if test "x$FOUND_CORRECT_VERSION" = x; then
26818            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26819$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26820            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26821$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26822            BOOT_JDK_FOUND=no
26823          else
26824            # We're done! :-)
26825            BOOT_JDK_FOUND=yes
26826
26827  # Only process if variable expands to non-empty
26828
26829  if test "x$BOOT_JDK" != x; then
26830    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26831
26832  # Input might be given as Windows format, start by converting to
26833  # unix format.
26834  path="$BOOT_JDK"
26835  new_path=`$CYGPATH -u "$path"`
26836
26837  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26838  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26839  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26840  # "foo.exe" is OK but "foo" is an error.
26841  #
26842  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26843  # It is also a way to make sure we got the proper file name for the real test later on.
26844  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26845  if test "x$test_shortpath" = x; then
26846    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26847$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26848    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26849  fi
26850
26851  # Call helper function which possibly converts this using DOS-style short mode.
26852  # If so, the updated path is stored in $new_path.
26853
26854  input_path="$new_path"
26855  # Check if we need to convert this using DOS-style short mode. If the path
26856  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26857  # take no chances and rewrite it.
26858  # Note: m4 eats our [], so we need to use [ and ] instead.
26859  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26860  if test "x$has_forbidden_chars" != x; then
26861    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26862    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26863    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26864    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26865      # Going to short mode and back again did indeed matter. Since short mode is
26866      # case insensitive, let's make it lowercase to improve readability.
26867      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26868      # Now convert it back to Unix-style (cygpath)
26869      input_path=`$CYGPATH -u "$shortmode_path"`
26870      new_path="$input_path"
26871    fi
26872  fi
26873
26874  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26875  if test "x$test_cygdrive_prefix" = x; then
26876    # As a simple fix, exclude /usr/bin since it's not a real path.
26877    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26878      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26879      # a path prefixed by /cygdrive for fixpath to work.
26880      new_path="$CYGWIN_ROOT_PATH$input_path"
26881    fi
26882  fi
26883
26884
26885  if test "x$path" != "x$new_path"; then
26886    BOOT_JDK="$new_path"
26887    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26888$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26889  fi
26890
26891    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26892
26893  path="$BOOT_JDK"
26894  has_colon=`$ECHO $path | $GREP ^.:`
26895  new_path="$path"
26896  if test "x$has_colon" = x; then
26897    # Not in mixed or Windows style, start by that.
26898    new_path=`cmd //c echo $path`
26899  fi
26900
26901
26902  input_path="$new_path"
26903  # Check if we need to convert this using DOS-style short mode. If the path
26904  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26905  # take no chances and rewrite it.
26906  # Note: m4 eats our [], so we need to use [ and ] instead.
26907  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26908  if test "x$has_forbidden_chars" != x; then
26909    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26910    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26911  fi
26912
26913
26914  windows_path="$new_path"
26915  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26916    unix_path=`$CYGPATH -u "$windows_path"`
26917    new_path="$unix_path"
26918  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26919    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26920    new_path="$unix_path"
26921  fi
26922
26923  if test "x$path" != "x$new_path"; then
26924    BOOT_JDK="$new_path"
26925    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26926$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26927  fi
26928
26929  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26930  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26931
26932    else
26933      # We're on a unix platform. Hooray! :)
26934      path="$BOOT_JDK"
26935      has_space=`$ECHO "$path" | $GREP " "`
26936      if test "x$has_space" != x; then
26937        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26938$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26939        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26940      fi
26941
26942      # Use eval to expand a potential ~
26943      eval path="$path"
26944      if test ! -f "$path" && test ! -d "$path"; then
26945        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26946      fi
26947
26948      if test -d "$path"; then
26949        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26950      else
26951        dir="`$DIRNAME "$path"`"
26952        base="`$BASENAME "$path"`"
26953        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26954      fi
26955    fi
26956  fi
26957
26958            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26959$as_echo_n "checking for Boot JDK... " >&6; }
26960            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26961$as_echo "$BOOT_JDK" >&6; }
26962            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26963$as_echo_n "checking Boot JDK version... " >&6; }
26964            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26965            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26966$as_echo "$BOOT_JDK_VERSION" >&6; }
26967          fi # end check jdk version
26968        fi # end check javac
26969      fi # end check java
26970    fi # end check boot jdk found
26971  fi
26972
26973
26974  if test "x$BOOT_JDK_FOUND" = xno; then
26975    # Now execute the test
26976
26977  if test "x$PROGRAMW6432" != x; then
26978    VIRTUAL_DIR="$PROGRAMW6432/Java"
26979
26980  windows_path="$VIRTUAL_DIR"
26981  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26982    unix_path=`$CYGPATH -u "$windows_path"`
26983    VIRTUAL_DIR="$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    VIRTUAL_DIR="$unix_path"
26987  fi
26988
26989
26990  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26991  BOOT_JDK_SUFFIX=""
26992  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26993  if test "x$ALL_JDKS_FOUND" != x; then
26994    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26995
26996  if test "x$BOOT_JDK_FOUND" = xno; then
26997    # Now execute the test
26998
26999        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27000        if test -d "$BOOT_JDK"; then
27001          BOOT_JDK_FOUND=maybe
27002          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27003$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27004        fi
27005
27006
27007    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27008    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27009      # Do we have a bin/java?
27010      if test ! -x "$BOOT_JDK/bin/java"; then
27011        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27012$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27013        BOOT_JDK_FOUND=no
27014      else
27015        # Do we have a bin/javac?
27016        if test ! -x "$BOOT_JDK/bin/javac"; then
27017          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27018$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27019          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27020$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27021          BOOT_JDK_FOUND=no
27022        else
27023          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27024          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27025
27026          # Extra M4 quote needed to protect [] in grep expression.
27027          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27028          if test "x$FOUND_CORRECT_VERSION" = x; then
27029            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27030$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27031            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27032$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27033            BOOT_JDK_FOUND=no
27034          else
27035            # We're done! :-)
27036            BOOT_JDK_FOUND=yes
27037
27038  # Only process if variable expands to non-empty
27039
27040  if test "x$BOOT_JDK" != x; then
27041    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27042
27043  # Input might be given as Windows format, start by converting to
27044  # unix format.
27045  path="$BOOT_JDK"
27046  new_path=`$CYGPATH -u "$path"`
27047
27048  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27049  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27050  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27051  # "foo.exe" is OK but "foo" is an error.
27052  #
27053  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27054  # It is also a way to make sure we got the proper file name for the real test later on.
27055  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27056  if test "x$test_shortpath" = x; then
27057    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27058$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27059    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27060  fi
27061
27062  # Call helper function which possibly converts this using DOS-style short mode.
27063  # If so, the updated path is stored in $new_path.
27064
27065  input_path="$new_path"
27066  # Check if we need to convert this using DOS-style short mode. If the path
27067  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27068  # take no chances and rewrite it.
27069  # Note: m4 eats our [], so we need to use [ and ] instead.
27070  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27071  if test "x$has_forbidden_chars" != x; then
27072    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27073    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27074    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27075    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27076      # Going to short mode and back again did indeed matter. Since short mode is
27077      # case insensitive, let's make it lowercase to improve readability.
27078      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27079      # Now convert it back to Unix-style (cygpath)
27080      input_path=`$CYGPATH -u "$shortmode_path"`
27081      new_path="$input_path"
27082    fi
27083  fi
27084
27085  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27086  if test "x$test_cygdrive_prefix" = x; then
27087    # As a simple fix, exclude /usr/bin since it's not a real path.
27088    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27089      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27090      # a path prefixed by /cygdrive for fixpath to work.
27091      new_path="$CYGWIN_ROOT_PATH$input_path"
27092    fi
27093  fi
27094
27095
27096  if test "x$path" != "x$new_path"; then
27097    BOOT_JDK="$new_path"
27098    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27099$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27100  fi
27101
27102    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27103
27104  path="$BOOT_JDK"
27105  has_colon=`$ECHO $path | $GREP ^.:`
27106  new_path="$path"
27107  if test "x$has_colon" = x; then
27108    # Not in mixed or Windows style, start by that.
27109    new_path=`cmd //c echo $path`
27110  fi
27111
27112
27113  input_path="$new_path"
27114  # Check if we need to convert this using DOS-style short mode. If the path
27115  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27116  # take no chances and rewrite it.
27117  # Note: m4 eats our [], so we need to use [ and ] instead.
27118  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27119  if test "x$has_forbidden_chars" != x; then
27120    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27121    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27122  fi
27123
27124
27125  windows_path="$new_path"
27126  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27127    unix_path=`$CYGPATH -u "$windows_path"`
27128    new_path="$unix_path"
27129  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27130    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27131    new_path="$unix_path"
27132  fi
27133
27134  if test "x$path" != "x$new_path"; then
27135    BOOT_JDK="$new_path"
27136    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27137$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27138  fi
27139
27140  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27141  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27142
27143    else
27144      # We're on a unix platform. Hooray! :)
27145      path="$BOOT_JDK"
27146      has_space=`$ECHO "$path" | $GREP " "`
27147      if test "x$has_space" != x; then
27148        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27149$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27150        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27151      fi
27152
27153      # Use eval to expand a potential ~
27154      eval path="$path"
27155      if test ! -f "$path" && test ! -d "$path"; then
27156        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27157      fi
27158
27159      if test -d "$path"; then
27160        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27161      else
27162        dir="`$DIRNAME "$path"`"
27163        base="`$BASENAME "$path"`"
27164        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27165      fi
27166    fi
27167  fi
27168
27169            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27170$as_echo_n "checking for Boot JDK... " >&6; }
27171            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27172$as_echo "$BOOT_JDK" >&6; }
27173            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27174$as_echo_n "checking Boot JDK version... " >&6; }
27175            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27176            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27177$as_echo "$BOOT_JDK_VERSION" >&6; }
27178          fi # end check jdk version
27179        fi # end check javac
27180      fi # end check java
27181    fi # end check boot jdk found
27182  fi
27183
27184    done
27185  fi
27186
27187  fi
27188
27189
27190    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27191    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27192      # Do we have a bin/java?
27193      if test ! -x "$BOOT_JDK/bin/java"; then
27194        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27195$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27196        BOOT_JDK_FOUND=no
27197      else
27198        # Do we have a bin/javac?
27199        if test ! -x "$BOOT_JDK/bin/javac"; then
27200          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27201$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27202          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27203$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27204          BOOT_JDK_FOUND=no
27205        else
27206          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27207          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27208
27209          # Extra M4 quote needed to protect [] in grep expression.
27210          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27211          if test "x$FOUND_CORRECT_VERSION" = x; then
27212            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27213$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27214            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27215$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27216            BOOT_JDK_FOUND=no
27217          else
27218            # We're done! :-)
27219            BOOT_JDK_FOUND=yes
27220
27221  # Only process if variable expands to non-empty
27222
27223  if test "x$BOOT_JDK" != x; then
27224    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27225
27226  # Input might be given as Windows format, start by converting to
27227  # unix format.
27228  path="$BOOT_JDK"
27229  new_path=`$CYGPATH -u "$path"`
27230
27231  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27232  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27233  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27234  # "foo.exe" is OK but "foo" is an error.
27235  #
27236  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27237  # It is also a way to make sure we got the proper file name for the real test later on.
27238  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27239  if test "x$test_shortpath" = x; then
27240    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27241$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27242    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27243  fi
27244
27245  # Call helper function which possibly converts this using DOS-style short mode.
27246  # If so, the updated path is stored in $new_path.
27247
27248  input_path="$new_path"
27249  # Check if we need to convert this using DOS-style short mode. If the path
27250  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27251  # take no chances and rewrite it.
27252  # Note: m4 eats our [], so we need to use [ and ] instead.
27253  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27254  if test "x$has_forbidden_chars" != x; then
27255    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27256    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27257    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27258    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27259      # Going to short mode and back again did indeed matter. Since short mode is
27260      # case insensitive, let's make it lowercase to improve readability.
27261      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27262      # Now convert it back to Unix-style (cygpath)
27263      input_path=`$CYGPATH -u "$shortmode_path"`
27264      new_path="$input_path"
27265    fi
27266  fi
27267
27268  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27269  if test "x$test_cygdrive_prefix" = x; then
27270    # As a simple fix, exclude /usr/bin since it's not a real path.
27271    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27272      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27273      # a path prefixed by /cygdrive for fixpath to work.
27274      new_path="$CYGWIN_ROOT_PATH$input_path"
27275    fi
27276  fi
27277
27278
27279  if test "x$path" != "x$new_path"; then
27280    BOOT_JDK="$new_path"
27281    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27282$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27283  fi
27284
27285    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27286
27287  path="$BOOT_JDK"
27288  has_colon=`$ECHO $path | $GREP ^.:`
27289  new_path="$path"
27290  if test "x$has_colon" = x; then
27291    # Not in mixed or Windows style, start by that.
27292    new_path=`cmd //c echo $path`
27293  fi
27294
27295
27296  input_path="$new_path"
27297  # Check if we need to convert this using DOS-style short mode. If the path
27298  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27299  # take no chances and rewrite it.
27300  # Note: m4 eats our [], so we need to use [ and ] instead.
27301  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27302  if test "x$has_forbidden_chars" != x; then
27303    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27304    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27305  fi
27306
27307
27308  windows_path="$new_path"
27309  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27310    unix_path=`$CYGPATH -u "$windows_path"`
27311    new_path="$unix_path"
27312  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27313    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27314    new_path="$unix_path"
27315  fi
27316
27317  if test "x$path" != "x$new_path"; then
27318    BOOT_JDK="$new_path"
27319    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27320$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27321  fi
27322
27323  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27324  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27325
27326    else
27327      # We're on a unix platform. Hooray! :)
27328      path="$BOOT_JDK"
27329      has_space=`$ECHO "$path" | $GREP " "`
27330      if test "x$has_space" != x; then
27331        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27332$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27333        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27334      fi
27335
27336      # Use eval to expand a potential ~
27337      eval path="$path"
27338      if test ! -f "$path" && test ! -d "$path"; then
27339        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27340      fi
27341
27342      if test -d "$path"; then
27343        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27344      else
27345        dir="`$DIRNAME "$path"`"
27346        base="`$BASENAME "$path"`"
27347        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27348      fi
27349    fi
27350  fi
27351
27352            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27353$as_echo_n "checking for Boot JDK... " >&6; }
27354            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27355$as_echo "$BOOT_JDK" >&6; }
27356            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27357$as_echo_n "checking Boot JDK version... " >&6; }
27358            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27359            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27360$as_echo "$BOOT_JDK_VERSION" >&6; }
27361          fi # end check jdk version
27362        fi # end check javac
27363      fi # end check java
27364    fi # end check boot jdk found
27365  fi
27366
27367
27368  if test "x$BOOT_JDK_FOUND" = xno; then
27369    # Now execute the test
27370
27371  if test "x$PROGRAMFILES" != x; then
27372    VIRTUAL_DIR="$PROGRAMFILES/Java"
27373
27374  windows_path="$VIRTUAL_DIR"
27375  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27376    unix_path=`$CYGPATH -u "$windows_path"`
27377    VIRTUAL_DIR="$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    VIRTUAL_DIR="$unix_path"
27381  fi
27382
27383
27384  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27385  BOOT_JDK_SUFFIX=""
27386  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27387  if test "x$ALL_JDKS_FOUND" != x; then
27388    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27389
27390  if test "x$BOOT_JDK_FOUND" = xno; then
27391    # Now execute the test
27392
27393        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27394        if test -d "$BOOT_JDK"; then
27395          BOOT_JDK_FOUND=maybe
27396          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27397$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27398        fi
27399
27400
27401    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27402    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27403      # Do we have a bin/java?
27404      if test ! -x "$BOOT_JDK/bin/java"; then
27405        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27406$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27407        BOOT_JDK_FOUND=no
27408      else
27409        # Do we have a bin/javac?
27410        if test ! -x "$BOOT_JDK/bin/javac"; then
27411          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27412$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27413          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27414$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27415          BOOT_JDK_FOUND=no
27416        else
27417          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27418          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27419
27420          # Extra M4 quote needed to protect [] in grep expression.
27421          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27422          if test "x$FOUND_CORRECT_VERSION" = x; then
27423            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27424$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27425            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27426$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27427            BOOT_JDK_FOUND=no
27428          else
27429            # We're done! :-)
27430            BOOT_JDK_FOUND=yes
27431
27432  # Only process if variable expands to non-empty
27433
27434  if test "x$BOOT_JDK" != x; then
27435    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27436
27437  # Input might be given as Windows format, start by converting to
27438  # unix format.
27439  path="$BOOT_JDK"
27440  new_path=`$CYGPATH -u "$path"`
27441
27442  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27443  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27444  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27445  # "foo.exe" is OK but "foo" is an error.
27446  #
27447  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27448  # It is also a way to make sure we got the proper file name for the real test later on.
27449  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27450  if test "x$test_shortpath" = x; then
27451    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27452$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27453    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27454  fi
27455
27456  # Call helper function which possibly converts this using DOS-style short mode.
27457  # If so, the updated path is stored in $new_path.
27458
27459  input_path="$new_path"
27460  # Check if we need to convert this using DOS-style short mode. If the path
27461  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27462  # take no chances and rewrite it.
27463  # Note: m4 eats our [], so we need to use [ and ] instead.
27464  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27465  if test "x$has_forbidden_chars" != x; then
27466    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27467    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27468    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27469    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27470      # Going to short mode and back again did indeed matter. Since short mode is
27471      # case insensitive, let's make it lowercase to improve readability.
27472      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27473      # Now convert it back to Unix-style (cygpath)
27474      input_path=`$CYGPATH -u "$shortmode_path"`
27475      new_path="$input_path"
27476    fi
27477  fi
27478
27479  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27480  if test "x$test_cygdrive_prefix" = x; then
27481    # As a simple fix, exclude /usr/bin since it's not a real path.
27482    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27483      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27484      # a path prefixed by /cygdrive for fixpath to work.
27485      new_path="$CYGWIN_ROOT_PATH$input_path"
27486    fi
27487  fi
27488
27489
27490  if test "x$path" != "x$new_path"; then
27491    BOOT_JDK="$new_path"
27492    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27493$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27494  fi
27495
27496    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27497
27498  path="$BOOT_JDK"
27499  has_colon=`$ECHO $path | $GREP ^.:`
27500  new_path="$path"
27501  if test "x$has_colon" = x; then
27502    # Not in mixed or Windows style, start by that.
27503    new_path=`cmd //c echo $path`
27504  fi
27505
27506
27507  input_path="$new_path"
27508  # Check if we need to convert this using DOS-style short mode. If the path
27509  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27510  # take no chances and rewrite it.
27511  # Note: m4 eats our [], so we need to use [ and ] instead.
27512  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27513  if test "x$has_forbidden_chars" != x; then
27514    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27515    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27516  fi
27517
27518
27519  windows_path="$new_path"
27520  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27521    unix_path=`$CYGPATH -u "$windows_path"`
27522    new_path="$unix_path"
27523  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27524    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27525    new_path="$unix_path"
27526  fi
27527
27528  if test "x$path" != "x$new_path"; then
27529    BOOT_JDK="$new_path"
27530    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27531$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27532  fi
27533
27534  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27535  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27536
27537    else
27538      # We're on a unix platform. Hooray! :)
27539      path="$BOOT_JDK"
27540      has_space=`$ECHO "$path" | $GREP " "`
27541      if test "x$has_space" != x; then
27542        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27543$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27544        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27545      fi
27546
27547      # Use eval to expand a potential ~
27548      eval path="$path"
27549      if test ! -f "$path" && test ! -d "$path"; then
27550        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27551      fi
27552
27553      if test -d "$path"; then
27554        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27555      else
27556        dir="`$DIRNAME "$path"`"
27557        base="`$BASENAME "$path"`"
27558        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27559      fi
27560    fi
27561  fi
27562
27563            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27564$as_echo_n "checking for Boot JDK... " >&6; }
27565            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27566$as_echo "$BOOT_JDK" >&6; }
27567            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27568$as_echo_n "checking Boot JDK version... " >&6; }
27569            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27570            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27571$as_echo "$BOOT_JDK_VERSION" >&6; }
27572          fi # end check jdk version
27573        fi # end check javac
27574      fi # end check java
27575    fi # end check boot jdk found
27576  fi
27577
27578    done
27579  fi
27580
27581  fi
27582
27583
27584    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27585    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27586      # Do we have a bin/java?
27587      if test ! -x "$BOOT_JDK/bin/java"; then
27588        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27589$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27590        BOOT_JDK_FOUND=no
27591      else
27592        # Do we have a bin/javac?
27593        if test ! -x "$BOOT_JDK/bin/javac"; then
27594          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27595$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27596          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27597$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27598          BOOT_JDK_FOUND=no
27599        else
27600          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27601          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27602
27603          # Extra M4 quote needed to protect [] in grep expression.
27604          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27605          if test "x$FOUND_CORRECT_VERSION" = x; then
27606            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27607$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27608            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27609$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27610            BOOT_JDK_FOUND=no
27611          else
27612            # We're done! :-)
27613            BOOT_JDK_FOUND=yes
27614
27615  # Only process if variable expands to non-empty
27616
27617  if test "x$BOOT_JDK" != x; then
27618    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27619
27620  # Input might be given as Windows format, start by converting to
27621  # unix format.
27622  path="$BOOT_JDK"
27623  new_path=`$CYGPATH -u "$path"`
27624
27625  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27626  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27627  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27628  # "foo.exe" is OK but "foo" is an error.
27629  #
27630  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27631  # It is also a way to make sure we got the proper file name for the real test later on.
27632  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27633  if test "x$test_shortpath" = x; then
27634    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27635$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27636    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27637  fi
27638
27639  # Call helper function which possibly converts this using DOS-style short mode.
27640  # If so, the updated path is stored in $new_path.
27641
27642  input_path="$new_path"
27643  # Check if we need to convert this using DOS-style short mode. If the path
27644  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27645  # take no chances and rewrite it.
27646  # Note: m4 eats our [], so we need to use [ and ] instead.
27647  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27648  if test "x$has_forbidden_chars" != x; then
27649    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27650    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27651    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27652    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27653      # Going to short mode and back again did indeed matter. Since short mode is
27654      # case insensitive, let's make it lowercase to improve readability.
27655      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27656      # Now convert it back to Unix-style (cygpath)
27657      input_path=`$CYGPATH -u "$shortmode_path"`
27658      new_path="$input_path"
27659    fi
27660  fi
27661
27662  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27663  if test "x$test_cygdrive_prefix" = x; then
27664    # As a simple fix, exclude /usr/bin since it's not a real path.
27665    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27666      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27667      # a path prefixed by /cygdrive for fixpath to work.
27668      new_path="$CYGWIN_ROOT_PATH$input_path"
27669    fi
27670  fi
27671
27672
27673  if test "x$path" != "x$new_path"; then
27674    BOOT_JDK="$new_path"
27675    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27676$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27677  fi
27678
27679    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27680
27681  path="$BOOT_JDK"
27682  has_colon=`$ECHO $path | $GREP ^.:`
27683  new_path="$path"
27684  if test "x$has_colon" = x; then
27685    # Not in mixed or Windows style, start by that.
27686    new_path=`cmd //c echo $path`
27687  fi
27688
27689
27690  input_path="$new_path"
27691  # Check if we need to convert this using DOS-style short mode. If the path
27692  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27693  # take no chances and rewrite it.
27694  # Note: m4 eats our [], so we need to use [ and ] instead.
27695  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27696  if test "x$has_forbidden_chars" != x; then
27697    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27698    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27699  fi
27700
27701
27702  windows_path="$new_path"
27703  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27704    unix_path=`$CYGPATH -u "$windows_path"`
27705    new_path="$unix_path"
27706  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27707    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27708    new_path="$unix_path"
27709  fi
27710
27711  if test "x$path" != "x$new_path"; then
27712    BOOT_JDK="$new_path"
27713    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27714$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27715  fi
27716
27717  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27718  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27719
27720    else
27721      # We're on a unix platform. Hooray! :)
27722      path="$BOOT_JDK"
27723      has_space=`$ECHO "$path" | $GREP " "`
27724      if test "x$has_space" != x; then
27725        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27726$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27727        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27728      fi
27729
27730      # Use eval to expand a potential ~
27731      eval path="$path"
27732      if test ! -f "$path" && test ! -d "$path"; then
27733        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27734      fi
27735
27736      if test -d "$path"; then
27737        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27738      else
27739        dir="`$DIRNAME "$path"`"
27740        base="`$BASENAME "$path"`"
27741        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27742      fi
27743    fi
27744  fi
27745
27746            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27747$as_echo_n "checking for Boot JDK... " >&6; }
27748            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27749$as_echo "$BOOT_JDK" >&6; }
27750            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27751$as_echo_n "checking Boot JDK version... " >&6; }
27752            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27753            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27754$as_echo "$BOOT_JDK_VERSION" >&6; }
27755          fi # end check jdk version
27756        fi # end check javac
27757      fi # end check java
27758    fi # end check boot jdk found
27759  fi
27760
27761
27762  if test "x$BOOT_JDK_FOUND" = xno; then
27763    # Now execute the test
27764
27765  if test "x$ProgramFiles" != x; then
27766    VIRTUAL_DIR="$ProgramFiles/Java"
27767
27768  windows_path="$VIRTUAL_DIR"
27769  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27770    unix_path=`$CYGPATH -u "$windows_path"`
27771    VIRTUAL_DIR="$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    VIRTUAL_DIR="$unix_path"
27775  fi
27776
27777
27778  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27779  BOOT_JDK_SUFFIX=""
27780  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27781  if test "x$ALL_JDKS_FOUND" != x; then
27782    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27783
27784  if test "x$BOOT_JDK_FOUND" = xno; then
27785    # Now execute the test
27786
27787        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27788        if test -d "$BOOT_JDK"; then
27789          BOOT_JDK_FOUND=maybe
27790          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27791$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27792        fi
27793
27794
27795    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27796    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27797      # Do we have a bin/java?
27798      if test ! -x "$BOOT_JDK/bin/java"; then
27799        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27800$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27801        BOOT_JDK_FOUND=no
27802      else
27803        # Do we have a bin/javac?
27804        if test ! -x "$BOOT_JDK/bin/javac"; then
27805          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27806$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27807          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27808$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27809          BOOT_JDK_FOUND=no
27810        else
27811          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27812          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27813
27814          # Extra M4 quote needed to protect [] in grep expression.
27815          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27816          if test "x$FOUND_CORRECT_VERSION" = x; then
27817            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27818$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27819            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27820$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27821            BOOT_JDK_FOUND=no
27822          else
27823            # We're done! :-)
27824            BOOT_JDK_FOUND=yes
27825
27826  # Only process if variable expands to non-empty
27827
27828  if test "x$BOOT_JDK" != x; then
27829    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27830
27831  # Input might be given as Windows format, start by converting to
27832  # unix format.
27833  path="$BOOT_JDK"
27834  new_path=`$CYGPATH -u "$path"`
27835
27836  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27837  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27838  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27839  # "foo.exe" is OK but "foo" is an error.
27840  #
27841  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27842  # It is also a way to make sure we got the proper file name for the real test later on.
27843  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27844  if test "x$test_shortpath" = x; then
27845    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27846$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27847    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27848  fi
27849
27850  # Call helper function which possibly converts this using DOS-style short mode.
27851  # If so, the updated path is stored in $new_path.
27852
27853  input_path="$new_path"
27854  # Check if we need to convert this using DOS-style short mode. If the path
27855  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27856  # take no chances and rewrite it.
27857  # Note: m4 eats our [], so we need to use [ and ] instead.
27858  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27859  if test "x$has_forbidden_chars" != x; then
27860    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27861    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27862    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27863    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27864      # Going to short mode and back again did indeed matter. Since short mode is
27865      # case insensitive, let's make it lowercase to improve readability.
27866      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27867      # Now convert it back to Unix-style (cygpath)
27868      input_path=`$CYGPATH -u "$shortmode_path"`
27869      new_path="$input_path"
27870    fi
27871  fi
27872
27873  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27874  if test "x$test_cygdrive_prefix" = x; then
27875    # As a simple fix, exclude /usr/bin since it's not a real path.
27876    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27877      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27878      # a path prefixed by /cygdrive for fixpath to work.
27879      new_path="$CYGWIN_ROOT_PATH$input_path"
27880    fi
27881  fi
27882
27883
27884  if test "x$path" != "x$new_path"; then
27885    BOOT_JDK="$new_path"
27886    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27887$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27888  fi
27889
27890    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27891
27892  path="$BOOT_JDK"
27893  has_colon=`$ECHO $path | $GREP ^.:`
27894  new_path="$path"
27895  if test "x$has_colon" = x; then
27896    # Not in mixed or Windows style, start by that.
27897    new_path=`cmd //c echo $path`
27898  fi
27899
27900
27901  input_path="$new_path"
27902  # Check if we need to convert this using DOS-style short mode. If the path
27903  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27904  # take no chances and rewrite it.
27905  # Note: m4 eats our [], so we need to use [ and ] instead.
27906  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27907  if test "x$has_forbidden_chars" != x; then
27908    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27909    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27910  fi
27911
27912
27913  windows_path="$new_path"
27914  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27915    unix_path=`$CYGPATH -u "$windows_path"`
27916    new_path="$unix_path"
27917  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27918    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27919    new_path="$unix_path"
27920  fi
27921
27922  if test "x$path" != "x$new_path"; then
27923    BOOT_JDK="$new_path"
27924    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27925$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27926  fi
27927
27928  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27929  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27930
27931    else
27932      # We're on a unix platform. Hooray! :)
27933      path="$BOOT_JDK"
27934      has_space=`$ECHO "$path" | $GREP " "`
27935      if test "x$has_space" != x; then
27936        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27937$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27938        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27939      fi
27940
27941      # Use eval to expand a potential ~
27942      eval path="$path"
27943      if test ! -f "$path" && test ! -d "$path"; then
27944        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27945      fi
27946
27947      if test -d "$path"; then
27948        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27949      else
27950        dir="`$DIRNAME "$path"`"
27951        base="`$BASENAME "$path"`"
27952        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27953      fi
27954    fi
27955  fi
27956
27957            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27958$as_echo_n "checking for Boot JDK... " >&6; }
27959            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27960$as_echo "$BOOT_JDK" >&6; }
27961            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27962$as_echo_n "checking Boot JDK version... " >&6; }
27963            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27964            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27965$as_echo "$BOOT_JDK_VERSION" >&6; }
27966          fi # end check jdk version
27967        fi # end check javac
27968      fi # end check java
27969    fi # end check boot jdk found
27970  fi
27971
27972    done
27973  fi
27974
27975  fi
27976
27977
27978    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27979    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27980      # Do we have a bin/java?
27981      if test ! -x "$BOOT_JDK/bin/java"; then
27982        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27983$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27984        BOOT_JDK_FOUND=no
27985      else
27986        # Do we have a bin/javac?
27987        if test ! -x "$BOOT_JDK/bin/javac"; then
27988          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27989$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27990          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27991$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27992          BOOT_JDK_FOUND=no
27993        else
27994          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27995          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27996
27997          # Extra M4 quote needed to protect [] in grep expression.
27998          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27999          if test "x$FOUND_CORRECT_VERSION" = x; then
28000            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28001$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28002            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28003$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28004            BOOT_JDK_FOUND=no
28005          else
28006            # We're done! :-)
28007            BOOT_JDK_FOUND=yes
28008
28009  # Only process if variable expands to non-empty
28010
28011  if test "x$BOOT_JDK" != x; then
28012    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28013
28014  # Input might be given as Windows format, start by converting to
28015  # unix format.
28016  path="$BOOT_JDK"
28017  new_path=`$CYGPATH -u "$path"`
28018
28019  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28020  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28021  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28022  # "foo.exe" is OK but "foo" is an error.
28023  #
28024  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28025  # It is also a way to make sure we got the proper file name for the real test later on.
28026  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28027  if test "x$test_shortpath" = x; then
28028    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28029$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28030    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28031  fi
28032
28033  # Call helper function which possibly converts this using DOS-style short mode.
28034  # If so, the updated path is stored in $new_path.
28035
28036  input_path="$new_path"
28037  # Check if we need to convert this using DOS-style short mode. If the path
28038  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28039  # take no chances and rewrite it.
28040  # Note: m4 eats our [], so we need to use [ and ] instead.
28041  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28042  if test "x$has_forbidden_chars" != x; then
28043    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28044    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28045    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28046    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28047      # Going to short mode and back again did indeed matter. Since short mode is
28048      # case insensitive, let's make it lowercase to improve readability.
28049      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28050      # Now convert it back to Unix-style (cygpath)
28051      input_path=`$CYGPATH -u "$shortmode_path"`
28052      new_path="$input_path"
28053    fi
28054  fi
28055
28056  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28057  if test "x$test_cygdrive_prefix" = x; then
28058    # As a simple fix, exclude /usr/bin since it's not a real path.
28059    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28060      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28061      # a path prefixed by /cygdrive for fixpath to work.
28062      new_path="$CYGWIN_ROOT_PATH$input_path"
28063    fi
28064  fi
28065
28066
28067  if test "x$path" != "x$new_path"; then
28068    BOOT_JDK="$new_path"
28069    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28070$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28071  fi
28072
28073    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28074
28075  path="$BOOT_JDK"
28076  has_colon=`$ECHO $path | $GREP ^.:`
28077  new_path="$path"
28078  if test "x$has_colon" = x; then
28079    # Not in mixed or Windows style, start by that.
28080    new_path=`cmd //c echo $path`
28081  fi
28082
28083
28084  input_path="$new_path"
28085  # Check if we need to convert this using DOS-style short mode. If the path
28086  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28087  # take no chances and rewrite it.
28088  # Note: m4 eats our [], so we need to use [ and ] instead.
28089  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28090  if test "x$has_forbidden_chars" != x; then
28091    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28092    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28093  fi
28094
28095
28096  windows_path="$new_path"
28097  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28098    unix_path=`$CYGPATH -u "$windows_path"`
28099    new_path="$unix_path"
28100  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28101    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28102    new_path="$unix_path"
28103  fi
28104
28105  if test "x$path" != "x$new_path"; then
28106    BOOT_JDK="$new_path"
28107    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28108$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28109  fi
28110
28111  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28112  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28113
28114    else
28115      # We're on a unix platform. Hooray! :)
28116      path="$BOOT_JDK"
28117      has_space=`$ECHO "$path" | $GREP " "`
28118      if test "x$has_space" != x; then
28119        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28120$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28121        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28122      fi
28123
28124      # Use eval to expand a potential ~
28125      eval path="$path"
28126      if test ! -f "$path" && test ! -d "$path"; then
28127        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28128      fi
28129
28130      if test -d "$path"; then
28131        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28132      else
28133        dir="`$DIRNAME "$path"`"
28134        base="`$BASENAME "$path"`"
28135        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28136      fi
28137    fi
28138  fi
28139
28140            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28141$as_echo_n "checking for Boot JDK... " >&6; }
28142            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28143$as_echo "$BOOT_JDK" >&6; }
28144            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28145$as_echo_n "checking Boot JDK version... " >&6; }
28146            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28147            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28148$as_echo "$BOOT_JDK_VERSION" >&6; }
28149          fi # end check jdk version
28150        fi # end check javac
28151      fi # end check java
28152    fi # end check boot jdk found
28153  fi
28154
28155
28156  if test "x$BOOT_JDK_FOUND" = xno; then
28157    # Now execute the test
28158
28159  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
28160  BOOT_JDK_SUFFIX=""
28161  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28162  if test "x$ALL_JDKS_FOUND" != x; then
28163    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28164
28165  if test "x$BOOT_JDK_FOUND" = xno; then
28166    # Now execute the test
28167
28168        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28169        if test -d "$BOOT_JDK"; then
28170          BOOT_JDK_FOUND=maybe
28171          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28172$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28173        fi
28174
28175
28176    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28177    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28178      # Do we have a bin/java?
28179      if test ! -x "$BOOT_JDK/bin/java"; then
28180        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28181$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28182        BOOT_JDK_FOUND=no
28183      else
28184        # Do we have a bin/javac?
28185        if test ! -x "$BOOT_JDK/bin/javac"; then
28186          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28187$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28188          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28189$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28190          BOOT_JDK_FOUND=no
28191        else
28192          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28193          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28194
28195          # Extra M4 quote needed to protect [] in grep expression.
28196          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28197          if test "x$FOUND_CORRECT_VERSION" = x; then
28198            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28199$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28200            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28201$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28202            BOOT_JDK_FOUND=no
28203          else
28204            # We're done! :-)
28205            BOOT_JDK_FOUND=yes
28206
28207  # Only process if variable expands to non-empty
28208
28209  if test "x$BOOT_JDK" != x; then
28210    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28211
28212  # Input might be given as Windows format, start by converting to
28213  # unix format.
28214  path="$BOOT_JDK"
28215  new_path=`$CYGPATH -u "$path"`
28216
28217  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28218  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28219  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28220  # "foo.exe" is OK but "foo" is an error.
28221  #
28222  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28223  # It is also a way to make sure we got the proper file name for the real test later on.
28224  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28225  if test "x$test_shortpath" = x; then
28226    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28227$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28228    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28229  fi
28230
28231  # Call helper function which possibly converts this using DOS-style short mode.
28232  # If so, the updated path is stored in $new_path.
28233
28234  input_path="$new_path"
28235  # Check if we need to convert this using DOS-style short mode. If the path
28236  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28237  # take no chances and rewrite it.
28238  # Note: m4 eats our [], so we need to use [ and ] instead.
28239  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28240  if test "x$has_forbidden_chars" != x; then
28241    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28242    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28243    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28244    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28245      # Going to short mode and back again did indeed matter. Since short mode is
28246      # case insensitive, let's make it lowercase to improve readability.
28247      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28248      # Now convert it back to Unix-style (cygpath)
28249      input_path=`$CYGPATH -u "$shortmode_path"`
28250      new_path="$input_path"
28251    fi
28252  fi
28253
28254  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28255  if test "x$test_cygdrive_prefix" = x; then
28256    # As a simple fix, exclude /usr/bin since it's not a real path.
28257    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28258      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28259      # a path prefixed by /cygdrive for fixpath to work.
28260      new_path="$CYGWIN_ROOT_PATH$input_path"
28261    fi
28262  fi
28263
28264
28265  if test "x$path" != "x$new_path"; then
28266    BOOT_JDK="$new_path"
28267    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28268$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28269  fi
28270
28271    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28272
28273  path="$BOOT_JDK"
28274  has_colon=`$ECHO $path | $GREP ^.:`
28275  new_path="$path"
28276  if test "x$has_colon" = x; then
28277    # Not in mixed or Windows style, start by that.
28278    new_path=`cmd //c echo $path`
28279  fi
28280
28281
28282  input_path="$new_path"
28283  # Check if we need to convert this using DOS-style short mode. If the path
28284  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28285  # take no chances and rewrite it.
28286  # Note: m4 eats our [], so we need to use [ and ] instead.
28287  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28288  if test "x$has_forbidden_chars" != x; then
28289    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28290    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28291  fi
28292
28293
28294  windows_path="$new_path"
28295  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28296    unix_path=`$CYGPATH -u "$windows_path"`
28297    new_path="$unix_path"
28298  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28299    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28300    new_path="$unix_path"
28301  fi
28302
28303  if test "x$path" != "x$new_path"; then
28304    BOOT_JDK="$new_path"
28305    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28306$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28307  fi
28308
28309  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28310  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28311
28312    else
28313      # We're on a unix platform. Hooray! :)
28314      path="$BOOT_JDK"
28315      has_space=`$ECHO "$path" | $GREP " "`
28316      if test "x$has_space" != x; then
28317        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28318$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28319        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28320      fi
28321
28322      # Use eval to expand a potential ~
28323      eval path="$path"
28324      if test ! -f "$path" && test ! -d "$path"; then
28325        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28326      fi
28327
28328      if test -d "$path"; then
28329        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28330      else
28331        dir="`$DIRNAME "$path"`"
28332        base="`$BASENAME "$path"`"
28333        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28334      fi
28335    fi
28336  fi
28337
28338            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28339$as_echo_n "checking for Boot JDK... " >&6; }
28340            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28341$as_echo "$BOOT_JDK" >&6; }
28342            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28343$as_echo_n "checking Boot JDK version... " >&6; }
28344            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28345            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28346$as_echo "$BOOT_JDK_VERSION" >&6; }
28347          fi # end check jdk version
28348        fi # end check javac
28349      fi # end check java
28350    fi # end check boot jdk found
28351  fi
28352
28353    done
28354  fi
28355
28356
28357    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28358    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28359      # Do we have a bin/java?
28360      if test ! -x "$BOOT_JDK/bin/java"; then
28361        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28362$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28363        BOOT_JDK_FOUND=no
28364      else
28365        # Do we have a bin/javac?
28366        if test ! -x "$BOOT_JDK/bin/javac"; then
28367          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28368$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28369          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28370$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28371          BOOT_JDK_FOUND=no
28372        else
28373          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28374          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28375
28376          # Extra M4 quote needed to protect [] in grep expression.
28377          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28378          if test "x$FOUND_CORRECT_VERSION" = x; then
28379            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28380$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28381            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28382$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28383            BOOT_JDK_FOUND=no
28384          else
28385            # We're done! :-)
28386            BOOT_JDK_FOUND=yes
28387
28388  # Only process if variable expands to non-empty
28389
28390  if test "x$BOOT_JDK" != x; then
28391    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28392
28393  # Input might be given as Windows format, start by converting to
28394  # unix format.
28395  path="$BOOT_JDK"
28396  new_path=`$CYGPATH -u "$path"`
28397
28398  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28399  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28400  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28401  # "foo.exe" is OK but "foo" is an error.
28402  #
28403  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28404  # It is also a way to make sure we got the proper file name for the real test later on.
28405  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28406  if test "x$test_shortpath" = x; then
28407    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28408$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28409    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28410  fi
28411
28412  # Call helper function which possibly converts this using DOS-style short mode.
28413  # If so, the updated path is stored in $new_path.
28414
28415  input_path="$new_path"
28416  # Check if we need to convert this using DOS-style short mode. If the path
28417  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28418  # take no chances and rewrite it.
28419  # Note: m4 eats our [], so we need to use [ and ] instead.
28420  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28421  if test "x$has_forbidden_chars" != x; then
28422    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28423    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28424    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28425    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28426      # Going to short mode and back again did indeed matter. Since short mode is
28427      # case insensitive, let's make it lowercase to improve readability.
28428      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28429      # Now convert it back to Unix-style (cygpath)
28430      input_path=`$CYGPATH -u "$shortmode_path"`
28431      new_path="$input_path"
28432    fi
28433  fi
28434
28435  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28436  if test "x$test_cygdrive_prefix" = x; then
28437    # As a simple fix, exclude /usr/bin since it's not a real path.
28438    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28439      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28440      # a path prefixed by /cygdrive for fixpath to work.
28441      new_path="$CYGWIN_ROOT_PATH$input_path"
28442    fi
28443  fi
28444
28445
28446  if test "x$path" != "x$new_path"; then
28447    BOOT_JDK="$new_path"
28448    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28449$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28450  fi
28451
28452    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28453
28454  path="$BOOT_JDK"
28455  has_colon=`$ECHO $path | $GREP ^.:`
28456  new_path="$path"
28457  if test "x$has_colon" = x; then
28458    # Not in mixed or Windows style, start by that.
28459    new_path=`cmd //c echo $path`
28460  fi
28461
28462
28463  input_path="$new_path"
28464  # Check if we need to convert this using DOS-style short mode. If the path
28465  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28466  # take no chances and rewrite it.
28467  # Note: m4 eats our [], so we need to use [ and ] instead.
28468  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28469  if test "x$has_forbidden_chars" != x; then
28470    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28471    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28472  fi
28473
28474
28475  windows_path="$new_path"
28476  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28477    unix_path=`$CYGPATH -u "$windows_path"`
28478    new_path="$unix_path"
28479  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28480    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28481    new_path="$unix_path"
28482  fi
28483
28484  if test "x$path" != "x$new_path"; then
28485    BOOT_JDK="$new_path"
28486    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28487$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28488  fi
28489
28490  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28491  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28492
28493    else
28494      # We're on a unix platform. Hooray! :)
28495      path="$BOOT_JDK"
28496      has_space=`$ECHO "$path" | $GREP " "`
28497      if test "x$has_space" != x; then
28498        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28499$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28500        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28501      fi
28502
28503      # Use eval to expand a potential ~
28504      eval path="$path"
28505      if test ! -f "$path" && test ! -d "$path"; then
28506        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28507      fi
28508
28509      if test -d "$path"; then
28510        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28511      else
28512        dir="`$DIRNAME "$path"`"
28513        base="`$BASENAME "$path"`"
28514        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28515      fi
28516    fi
28517  fi
28518
28519            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28520$as_echo_n "checking for Boot JDK... " >&6; }
28521            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28522$as_echo "$BOOT_JDK" >&6; }
28523            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28524$as_echo_n "checking Boot JDK version... " >&6; }
28525            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28526            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28527$as_echo "$BOOT_JDK_VERSION" >&6; }
28528          fi # end check jdk version
28529        fi # end check javac
28530      fi # end check java
28531    fi # end check boot jdk found
28532  fi
28533
28534  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
28535
28536  if test "x$BOOT_JDK_FOUND" = xno; then
28537    # Now execute the test
28538
28539  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
28540  BOOT_JDK_SUFFIX="/Contents/Home"
28541  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28542  if test "x$ALL_JDKS_FOUND" != x; then
28543    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28544
28545  if test "x$BOOT_JDK_FOUND" = xno; then
28546    # Now execute the test
28547
28548        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28549        if test -d "$BOOT_JDK"; then
28550          BOOT_JDK_FOUND=maybe
28551          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28552$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28553        fi
28554
28555
28556    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28557    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28558      # Do we have a bin/java?
28559      if test ! -x "$BOOT_JDK/bin/java"; then
28560        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28561$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28562        BOOT_JDK_FOUND=no
28563      else
28564        # Do we have a bin/javac?
28565        if test ! -x "$BOOT_JDK/bin/javac"; then
28566          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28567$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28568          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28569$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28570          BOOT_JDK_FOUND=no
28571        else
28572          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28573          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28574
28575          # Extra M4 quote needed to protect [] in grep expression.
28576          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28577          if test "x$FOUND_CORRECT_VERSION" = x; then
28578            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28579$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28580            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28581$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28582            BOOT_JDK_FOUND=no
28583          else
28584            # We're done! :-)
28585            BOOT_JDK_FOUND=yes
28586
28587  # Only process if variable expands to non-empty
28588
28589  if test "x$BOOT_JDK" != x; then
28590    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28591
28592  # Input might be given as Windows format, start by converting to
28593  # unix format.
28594  path="$BOOT_JDK"
28595  new_path=`$CYGPATH -u "$path"`
28596
28597  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28598  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28599  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28600  # "foo.exe" is OK but "foo" is an error.
28601  #
28602  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28603  # It is also a way to make sure we got the proper file name for the real test later on.
28604  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28605  if test "x$test_shortpath" = x; then
28606    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28607$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28608    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28609  fi
28610
28611  # Call helper function which possibly converts this using DOS-style short mode.
28612  # If so, the updated path is stored in $new_path.
28613
28614  input_path="$new_path"
28615  # Check if we need to convert this using DOS-style short mode. If the path
28616  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28617  # take no chances and rewrite it.
28618  # Note: m4 eats our [], so we need to use [ and ] instead.
28619  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28620  if test "x$has_forbidden_chars" != x; then
28621    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28622    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28623    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28624    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28625      # Going to short mode and back again did indeed matter. Since short mode is
28626      # case insensitive, let's make it lowercase to improve readability.
28627      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28628      # Now convert it back to Unix-style (cygpath)
28629      input_path=`$CYGPATH -u "$shortmode_path"`
28630      new_path="$input_path"
28631    fi
28632  fi
28633
28634  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28635  if test "x$test_cygdrive_prefix" = x; then
28636    # As a simple fix, exclude /usr/bin since it's not a real path.
28637    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28638      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28639      # a path prefixed by /cygdrive for fixpath to work.
28640      new_path="$CYGWIN_ROOT_PATH$input_path"
28641    fi
28642  fi
28643
28644
28645  if test "x$path" != "x$new_path"; then
28646    BOOT_JDK="$new_path"
28647    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28648$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28649  fi
28650
28651    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28652
28653  path="$BOOT_JDK"
28654  has_colon=`$ECHO $path | $GREP ^.:`
28655  new_path="$path"
28656  if test "x$has_colon" = x; then
28657    # Not in mixed or Windows style, start by that.
28658    new_path=`cmd //c echo $path`
28659  fi
28660
28661
28662  input_path="$new_path"
28663  # Check if we need to convert this using DOS-style short mode. If the path
28664  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28665  # take no chances and rewrite it.
28666  # Note: m4 eats our [], so we need to use [ and ] instead.
28667  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28668  if test "x$has_forbidden_chars" != x; then
28669    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28670    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28671  fi
28672
28673
28674  windows_path="$new_path"
28675  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28676    unix_path=`$CYGPATH -u "$windows_path"`
28677    new_path="$unix_path"
28678  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28679    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28680    new_path="$unix_path"
28681  fi
28682
28683  if test "x$path" != "x$new_path"; then
28684    BOOT_JDK="$new_path"
28685    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28686$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28687  fi
28688
28689  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28690  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28691
28692    else
28693      # We're on a unix platform. Hooray! :)
28694      path="$BOOT_JDK"
28695      has_space=`$ECHO "$path" | $GREP " "`
28696      if test "x$has_space" != x; then
28697        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28698$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28699        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28700      fi
28701
28702      # Use eval to expand a potential ~
28703      eval path="$path"
28704      if test ! -f "$path" && test ! -d "$path"; then
28705        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28706      fi
28707
28708      if test -d "$path"; then
28709        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28710      else
28711        dir="`$DIRNAME "$path"`"
28712        base="`$BASENAME "$path"`"
28713        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28714      fi
28715    fi
28716  fi
28717
28718            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28719$as_echo_n "checking for Boot JDK... " >&6; }
28720            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28721$as_echo "$BOOT_JDK" >&6; }
28722            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28723$as_echo_n "checking Boot JDK version... " >&6; }
28724            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28725            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28726$as_echo "$BOOT_JDK_VERSION" >&6; }
28727          fi # end check jdk version
28728        fi # end check javac
28729      fi # end check java
28730    fi # end check boot jdk found
28731  fi
28732
28733    done
28734  fi
28735
28736
28737    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28738    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28739      # Do we have a bin/java?
28740      if test ! -x "$BOOT_JDK/bin/java"; then
28741        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28742$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28743        BOOT_JDK_FOUND=no
28744      else
28745        # Do we have a bin/javac?
28746        if test ! -x "$BOOT_JDK/bin/javac"; then
28747          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28748$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28749          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28750$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28751          BOOT_JDK_FOUND=no
28752        else
28753          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28754          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28755
28756          # Extra M4 quote needed to protect [] in grep expression.
28757          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28758          if test "x$FOUND_CORRECT_VERSION" = x; then
28759            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28760$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28761            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28762$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28763            BOOT_JDK_FOUND=no
28764          else
28765            # We're done! :-)
28766            BOOT_JDK_FOUND=yes
28767
28768  # Only process if variable expands to non-empty
28769
28770  if test "x$BOOT_JDK" != x; then
28771    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28772
28773  # Input might be given as Windows format, start by converting to
28774  # unix format.
28775  path="$BOOT_JDK"
28776  new_path=`$CYGPATH -u "$path"`
28777
28778  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28779  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28780  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28781  # "foo.exe" is OK but "foo" is an error.
28782  #
28783  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28784  # It is also a way to make sure we got the proper file name for the real test later on.
28785  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28786  if test "x$test_shortpath" = x; then
28787    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28788$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28789    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28790  fi
28791
28792  # Call helper function which possibly converts this using DOS-style short mode.
28793  # If so, the updated path is stored in $new_path.
28794
28795  input_path="$new_path"
28796  # Check if we need to convert this using DOS-style short mode. If the path
28797  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28798  # take no chances and rewrite it.
28799  # Note: m4 eats our [], so we need to use [ and ] instead.
28800  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28801  if test "x$has_forbidden_chars" != x; then
28802    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28803    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28804    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28805    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28806      # Going to short mode and back again did indeed matter. Since short mode is
28807      # case insensitive, let's make it lowercase to improve readability.
28808      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28809      # Now convert it back to Unix-style (cygpath)
28810      input_path=`$CYGPATH -u "$shortmode_path"`
28811      new_path="$input_path"
28812    fi
28813  fi
28814
28815  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28816  if test "x$test_cygdrive_prefix" = x; then
28817    # As a simple fix, exclude /usr/bin since it's not a real path.
28818    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28819      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28820      # a path prefixed by /cygdrive for fixpath to work.
28821      new_path="$CYGWIN_ROOT_PATH$input_path"
28822    fi
28823  fi
28824
28825
28826  if test "x$path" != "x$new_path"; then
28827    BOOT_JDK="$new_path"
28828    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28829$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28830  fi
28831
28832    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28833
28834  path="$BOOT_JDK"
28835  has_colon=`$ECHO $path | $GREP ^.:`
28836  new_path="$path"
28837  if test "x$has_colon" = x; then
28838    # Not in mixed or Windows style, start by that.
28839    new_path=`cmd //c echo $path`
28840  fi
28841
28842
28843  input_path="$new_path"
28844  # Check if we need to convert this using DOS-style short mode. If the path
28845  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28846  # take no chances and rewrite it.
28847  # Note: m4 eats our [], so we need to use [ and ] instead.
28848  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28849  if test "x$has_forbidden_chars" != x; then
28850    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28851    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28852  fi
28853
28854
28855  windows_path="$new_path"
28856  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28857    unix_path=`$CYGPATH -u "$windows_path"`
28858    new_path="$unix_path"
28859  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28860    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28861    new_path="$unix_path"
28862  fi
28863
28864  if test "x$path" != "x$new_path"; then
28865    BOOT_JDK="$new_path"
28866    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28867$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28868  fi
28869
28870  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28871  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28872
28873    else
28874      # We're on a unix platform. Hooray! :)
28875      path="$BOOT_JDK"
28876      has_space=`$ECHO "$path" | $GREP " "`
28877      if test "x$has_space" != x; then
28878        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28879$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28880        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28881      fi
28882
28883      # Use eval to expand a potential ~
28884      eval path="$path"
28885      if test ! -f "$path" && test ! -d "$path"; then
28886        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28887      fi
28888
28889      if test -d "$path"; then
28890        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28891      else
28892        dir="`$DIRNAME "$path"`"
28893        base="`$BASENAME "$path"`"
28894        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28895      fi
28896    fi
28897  fi
28898
28899            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28900$as_echo_n "checking for Boot JDK... " >&6; }
28901            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28902$as_echo "$BOOT_JDK" >&6; }
28903            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28904$as_echo_n "checking Boot JDK version... " >&6; }
28905            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28906            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28907$as_echo "$BOOT_JDK_VERSION" >&6; }
28908          fi # end check jdk version
28909        fi # end check javac
28910      fi # end check java
28911    fi # end check boot jdk found
28912  fi
28913
28914
28915  if test "x$BOOT_JDK_FOUND" = xno; then
28916    # Now execute the test
28917
28918  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
28919  BOOT_JDK_SUFFIX="/Contents/Home"
28920  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28921  if test "x$ALL_JDKS_FOUND" != x; then
28922    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28923
28924  if test "x$BOOT_JDK_FOUND" = xno; then
28925    # Now execute the test
28926
28927        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28928        if test -d "$BOOT_JDK"; then
28929          BOOT_JDK_FOUND=maybe
28930          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28931$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28932        fi
28933
28934
28935    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28936    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28937      # Do we have a bin/java?
28938      if test ! -x "$BOOT_JDK/bin/java"; then
28939        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28940$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28941        BOOT_JDK_FOUND=no
28942      else
28943        # Do we have a bin/javac?
28944        if test ! -x "$BOOT_JDK/bin/javac"; then
28945          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28946$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28947          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28948$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28949          BOOT_JDK_FOUND=no
28950        else
28951          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28952          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28953
28954          # Extra M4 quote needed to protect [] in grep expression.
28955          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28956          if test "x$FOUND_CORRECT_VERSION" = x; then
28957            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28958$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28959            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28960$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28961            BOOT_JDK_FOUND=no
28962          else
28963            # We're done! :-)
28964            BOOT_JDK_FOUND=yes
28965
28966  # Only process if variable expands to non-empty
28967
28968  if test "x$BOOT_JDK" != x; then
28969    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28970
28971  # Input might be given as Windows format, start by converting to
28972  # unix format.
28973  path="$BOOT_JDK"
28974  new_path=`$CYGPATH -u "$path"`
28975
28976  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28977  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28978  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28979  # "foo.exe" is OK but "foo" is an error.
28980  #
28981  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28982  # It is also a way to make sure we got the proper file name for the real test later on.
28983  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28984  if test "x$test_shortpath" = x; then
28985    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28986$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28987    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28988  fi
28989
28990  # Call helper function which possibly converts this using DOS-style short mode.
28991  # If so, the updated path is stored in $new_path.
28992
28993  input_path="$new_path"
28994  # Check if we need to convert this using DOS-style short mode. If the path
28995  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28996  # take no chances and rewrite it.
28997  # Note: m4 eats our [], so we need to use [ and ] instead.
28998  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28999  if test "x$has_forbidden_chars" != x; then
29000    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29001    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29002    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29003    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29004      # Going to short mode and back again did indeed matter. Since short mode is
29005      # case insensitive, let's make it lowercase to improve readability.
29006      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29007      # Now convert it back to Unix-style (cygpath)
29008      input_path=`$CYGPATH -u "$shortmode_path"`
29009      new_path="$input_path"
29010    fi
29011  fi
29012
29013  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29014  if test "x$test_cygdrive_prefix" = x; then
29015    # As a simple fix, exclude /usr/bin since it's not a real path.
29016    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29017      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29018      # a path prefixed by /cygdrive for fixpath to work.
29019      new_path="$CYGWIN_ROOT_PATH$input_path"
29020    fi
29021  fi
29022
29023
29024  if test "x$path" != "x$new_path"; then
29025    BOOT_JDK="$new_path"
29026    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29027$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29028  fi
29029
29030    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29031
29032  path="$BOOT_JDK"
29033  has_colon=`$ECHO $path | $GREP ^.:`
29034  new_path="$path"
29035  if test "x$has_colon" = x; then
29036    # Not in mixed or Windows style, start by that.
29037    new_path=`cmd //c echo $path`
29038  fi
29039
29040
29041  input_path="$new_path"
29042  # Check if we need to convert this using DOS-style short mode. If the path
29043  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29044  # take no chances and rewrite it.
29045  # Note: m4 eats our [], so we need to use [ and ] instead.
29046  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29047  if test "x$has_forbidden_chars" != x; then
29048    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29049    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29050  fi
29051
29052
29053  windows_path="$new_path"
29054  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29055    unix_path=`$CYGPATH -u "$windows_path"`
29056    new_path="$unix_path"
29057  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29058    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29059    new_path="$unix_path"
29060  fi
29061
29062  if test "x$path" != "x$new_path"; then
29063    BOOT_JDK="$new_path"
29064    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29065$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29066  fi
29067
29068  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29069  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29070
29071    else
29072      # We're on a unix platform. Hooray! :)
29073      path="$BOOT_JDK"
29074      has_space=`$ECHO "$path" | $GREP " "`
29075      if test "x$has_space" != x; then
29076        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29077$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29078        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29079      fi
29080
29081      # Use eval to expand a potential ~
29082      eval path="$path"
29083      if test ! -f "$path" && test ! -d "$path"; then
29084        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29085      fi
29086
29087      if test -d "$path"; then
29088        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29089      else
29090        dir="`$DIRNAME "$path"`"
29091        base="`$BASENAME "$path"`"
29092        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29093      fi
29094    fi
29095  fi
29096
29097            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29098$as_echo_n "checking for Boot JDK... " >&6; }
29099            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29100$as_echo "$BOOT_JDK" >&6; }
29101            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29102$as_echo_n "checking Boot JDK version... " >&6; }
29103            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29104            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29105$as_echo "$BOOT_JDK_VERSION" >&6; }
29106          fi # end check jdk version
29107        fi # end check javac
29108      fi # end check java
29109    fi # end check boot jdk found
29110  fi
29111
29112    done
29113  fi
29114
29115
29116    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29117    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29118      # Do we have a bin/java?
29119      if test ! -x "$BOOT_JDK/bin/java"; then
29120        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29121$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29122        BOOT_JDK_FOUND=no
29123      else
29124        # Do we have a bin/javac?
29125        if test ! -x "$BOOT_JDK/bin/javac"; then
29126          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29127$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29128          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29129$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29130          BOOT_JDK_FOUND=no
29131        else
29132          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29133          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29134
29135          # Extra M4 quote needed to protect [] in grep expression.
29136          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29137          if test "x$FOUND_CORRECT_VERSION" = x; then
29138            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29139$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29140            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29141$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29142            BOOT_JDK_FOUND=no
29143          else
29144            # We're done! :-)
29145            BOOT_JDK_FOUND=yes
29146
29147  # Only process if variable expands to non-empty
29148
29149  if test "x$BOOT_JDK" != x; then
29150    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29151
29152  # Input might be given as Windows format, start by converting to
29153  # unix format.
29154  path="$BOOT_JDK"
29155  new_path=`$CYGPATH -u "$path"`
29156
29157  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29158  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29159  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29160  # "foo.exe" is OK but "foo" is an error.
29161  #
29162  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29163  # It is also a way to make sure we got the proper file name for the real test later on.
29164  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29165  if test "x$test_shortpath" = x; then
29166    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29167$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29168    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29169  fi
29170
29171  # Call helper function which possibly converts this using DOS-style short mode.
29172  # If so, the updated path is stored in $new_path.
29173
29174  input_path="$new_path"
29175  # Check if we need to convert this using DOS-style short mode. If the path
29176  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29177  # take no chances and rewrite it.
29178  # Note: m4 eats our [], so we need to use [ and ] instead.
29179  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29180  if test "x$has_forbidden_chars" != x; then
29181    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29182    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29183    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29184    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29185      # Going to short mode and back again did indeed matter. Since short mode is
29186      # case insensitive, let's make it lowercase to improve readability.
29187      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29188      # Now convert it back to Unix-style (cygpath)
29189      input_path=`$CYGPATH -u "$shortmode_path"`
29190      new_path="$input_path"
29191    fi
29192  fi
29193
29194  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29195  if test "x$test_cygdrive_prefix" = x; then
29196    # As a simple fix, exclude /usr/bin since it's not a real path.
29197    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29198      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29199      # a path prefixed by /cygdrive for fixpath to work.
29200      new_path="$CYGWIN_ROOT_PATH$input_path"
29201    fi
29202  fi
29203
29204
29205  if test "x$path" != "x$new_path"; then
29206    BOOT_JDK="$new_path"
29207    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29208$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29209  fi
29210
29211    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29212
29213  path="$BOOT_JDK"
29214  has_colon=`$ECHO $path | $GREP ^.:`
29215  new_path="$path"
29216  if test "x$has_colon" = x; then
29217    # Not in mixed or Windows style, start by that.
29218    new_path=`cmd //c echo $path`
29219  fi
29220
29221
29222  input_path="$new_path"
29223  # Check if we need to convert this using DOS-style short mode. If the path
29224  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29225  # take no chances and rewrite it.
29226  # Note: m4 eats our [], so we need to use [ and ] instead.
29227  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29228  if test "x$has_forbidden_chars" != x; then
29229    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29230    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29231  fi
29232
29233
29234  windows_path="$new_path"
29235  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29236    unix_path=`$CYGPATH -u "$windows_path"`
29237    new_path="$unix_path"
29238  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29239    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29240    new_path="$unix_path"
29241  fi
29242
29243  if test "x$path" != "x$new_path"; then
29244    BOOT_JDK="$new_path"
29245    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29246$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29247  fi
29248
29249  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29250  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29251
29252    else
29253      # We're on a unix platform. Hooray! :)
29254      path="$BOOT_JDK"
29255      has_space=`$ECHO "$path" | $GREP " "`
29256      if test "x$has_space" != x; then
29257        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29258$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29259        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29260      fi
29261
29262      # Use eval to expand a potential ~
29263      eval path="$path"
29264      if test ! -f "$path" && test ! -d "$path"; then
29265        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29266      fi
29267
29268      if test -d "$path"; then
29269        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29270      else
29271        dir="`$DIRNAME "$path"`"
29272        base="`$BASENAME "$path"`"
29273        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29274      fi
29275    fi
29276  fi
29277
29278            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29279$as_echo_n "checking for Boot JDK... " >&6; }
29280            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29281$as_echo "$BOOT_JDK" >&6; }
29282            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29283$as_echo_n "checking Boot JDK version... " >&6; }
29284            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29285            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29286$as_echo "$BOOT_JDK_VERSION" >&6; }
29287          fi # end check jdk version
29288        fi # end check javac
29289      fi # end check java
29290    fi # end check boot jdk found
29291  fi
29292
29293  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
29294
29295  if test "x$BOOT_JDK_FOUND" = xno; then
29296    # Now execute the test
29297
29298  BOOT_JDK_PREFIX="/usr/lib/jvm"
29299  BOOT_JDK_SUFFIX=""
29300  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29301  if test "x$ALL_JDKS_FOUND" != x; then
29302    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29303
29304  if test "x$BOOT_JDK_FOUND" = xno; then
29305    # Now execute the test
29306
29307        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29308        if test -d "$BOOT_JDK"; then
29309          BOOT_JDK_FOUND=maybe
29310          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29311$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29312        fi
29313
29314
29315    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29316    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29317      # Do we have a bin/java?
29318      if test ! -x "$BOOT_JDK/bin/java"; then
29319        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29320$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29321        BOOT_JDK_FOUND=no
29322      else
29323        # Do we have a bin/javac?
29324        if test ! -x "$BOOT_JDK/bin/javac"; then
29325          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29326$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29327          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29328$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29329          BOOT_JDK_FOUND=no
29330        else
29331          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29332          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29333
29334          # Extra M4 quote needed to protect [] in grep expression.
29335          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29336          if test "x$FOUND_CORRECT_VERSION" = x; then
29337            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29338$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29339            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29340$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29341            BOOT_JDK_FOUND=no
29342          else
29343            # We're done! :-)
29344            BOOT_JDK_FOUND=yes
29345
29346  # Only process if variable expands to non-empty
29347
29348  if test "x$BOOT_JDK" != x; then
29349    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29350
29351  # Input might be given as Windows format, start by converting to
29352  # unix format.
29353  path="$BOOT_JDK"
29354  new_path=`$CYGPATH -u "$path"`
29355
29356  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29357  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29358  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29359  # "foo.exe" is OK but "foo" is an error.
29360  #
29361  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29362  # It is also a way to make sure we got the proper file name for the real test later on.
29363  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29364  if test "x$test_shortpath" = x; then
29365    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29366$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29367    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29368  fi
29369
29370  # Call helper function which possibly converts this using DOS-style short mode.
29371  # If so, the updated path is stored in $new_path.
29372
29373  input_path="$new_path"
29374  # Check if we need to convert this using DOS-style short mode. If the path
29375  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29376  # take no chances and rewrite it.
29377  # Note: m4 eats our [], so we need to use [ and ] instead.
29378  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29379  if test "x$has_forbidden_chars" != x; then
29380    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29381    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29382    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29383    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29384      # Going to short mode and back again did indeed matter. Since short mode is
29385      # case insensitive, let's make it lowercase to improve readability.
29386      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29387      # Now convert it back to Unix-style (cygpath)
29388      input_path=`$CYGPATH -u "$shortmode_path"`
29389      new_path="$input_path"
29390    fi
29391  fi
29392
29393  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29394  if test "x$test_cygdrive_prefix" = x; then
29395    # As a simple fix, exclude /usr/bin since it's not a real path.
29396    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29397      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29398      # a path prefixed by /cygdrive for fixpath to work.
29399      new_path="$CYGWIN_ROOT_PATH$input_path"
29400    fi
29401  fi
29402
29403
29404  if test "x$path" != "x$new_path"; then
29405    BOOT_JDK="$new_path"
29406    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29407$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29408  fi
29409
29410    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29411
29412  path="$BOOT_JDK"
29413  has_colon=`$ECHO $path | $GREP ^.:`
29414  new_path="$path"
29415  if test "x$has_colon" = x; then
29416    # Not in mixed or Windows style, start by that.
29417    new_path=`cmd //c echo $path`
29418  fi
29419
29420
29421  input_path="$new_path"
29422  # Check if we need to convert this using DOS-style short mode. If the path
29423  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29424  # take no chances and rewrite it.
29425  # Note: m4 eats our [], so we need to use [ and ] instead.
29426  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29427  if test "x$has_forbidden_chars" != x; then
29428    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29429    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29430  fi
29431
29432
29433  windows_path="$new_path"
29434  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29435    unix_path=`$CYGPATH -u "$windows_path"`
29436    new_path="$unix_path"
29437  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29438    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29439    new_path="$unix_path"
29440  fi
29441
29442  if test "x$path" != "x$new_path"; then
29443    BOOT_JDK="$new_path"
29444    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29445$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29446  fi
29447
29448  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29449  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29450
29451    else
29452      # We're on a unix platform. Hooray! :)
29453      path="$BOOT_JDK"
29454      has_space=`$ECHO "$path" | $GREP " "`
29455      if test "x$has_space" != x; then
29456        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29457$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29458        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29459      fi
29460
29461      # Use eval to expand a potential ~
29462      eval path="$path"
29463      if test ! -f "$path" && test ! -d "$path"; then
29464        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29465      fi
29466
29467      if test -d "$path"; then
29468        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29469      else
29470        dir="`$DIRNAME "$path"`"
29471        base="`$BASENAME "$path"`"
29472        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29473      fi
29474    fi
29475  fi
29476
29477            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29478$as_echo_n "checking for Boot JDK... " >&6; }
29479            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29480$as_echo "$BOOT_JDK" >&6; }
29481            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29482$as_echo_n "checking Boot JDK version... " >&6; }
29483            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29484            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29485$as_echo "$BOOT_JDK_VERSION" >&6; }
29486          fi # end check jdk version
29487        fi # end check javac
29488      fi # end check java
29489    fi # end check boot jdk found
29490  fi
29491
29492    done
29493  fi
29494
29495
29496    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29497    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29498      # Do we have a bin/java?
29499      if test ! -x "$BOOT_JDK/bin/java"; then
29500        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29501$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29502        BOOT_JDK_FOUND=no
29503      else
29504        # Do we have a bin/javac?
29505        if test ! -x "$BOOT_JDK/bin/javac"; then
29506          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29507$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29508          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29509$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29510          BOOT_JDK_FOUND=no
29511        else
29512          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29513          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29514
29515          # Extra M4 quote needed to protect [] in grep expression.
29516          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29517          if test "x$FOUND_CORRECT_VERSION" = x; then
29518            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29519$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29520            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29521$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29522            BOOT_JDK_FOUND=no
29523          else
29524            # We're done! :-)
29525            BOOT_JDK_FOUND=yes
29526
29527  # Only process if variable expands to non-empty
29528
29529  if test "x$BOOT_JDK" != x; then
29530    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29531
29532  # Input might be given as Windows format, start by converting to
29533  # unix format.
29534  path="$BOOT_JDK"
29535  new_path=`$CYGPATH -u "$path"`
29536
29537  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29538  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29539  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29540  # "foo.exe" is OK but "foo" is an error.
29541  #
29542  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29543  # It is also a way to make sure we got the proper file name for the real test later on.
29544  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29545  if test "x$test_shortpath" = x; then
29546    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29547$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29548    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29549  fi
29550
29551  # Call helper function which possibly converts this using DOS-style short mode.
29552  # If so, the updated path is stored in $new_path.
29553
29554  input_path="$new_path"
29555  # Check if we need to convert this using DOS-style short mode. If the path
29556  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29557  # take no chances and rewrite it.
29558  # Note: m4 eats our [], so we need to use [ and ] instead.
29559  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29560  if test "x$has_forbidden_chars" != x; then
29561    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29562    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29563    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29564    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29565      # Going to short mode and back again did indeed matter. Since short mode is
29566      # case insensitive, let's make it lowercase to improve readability.
29567      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29568      # Now convert it back to Unix-style (cygpath)
29569      input_path=`$CYGPATH -u "$shortmode_path"`
29570      new_path="$input_path"
29571    fi
29572  fi
29573
29574  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29575  if test "x$test_cygdrive_prefix" = x; then
29576    # As a simple fix, exclude /usr/bin since it's not a real path.
29577    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29578      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29579      # a path prefixed by /cygdrive for fixpath to work.
29580      new_path="$CYGWIN_ROOT_PATH$input_path"
29581    fi
29582  fi
29583
29584
29585  if test "x$path" != "x$new_path"; then
29586    BOOT_JDK="$new_path"
29587    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29588$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29589  fi
29590
29591    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29592
29593  path="$BOOT_JDK"
29594  has_colon=`$ECHO $path | $GREP ^.:`
29595  new_path="$path"
29596  if test "x$has_colon" = x; then
29597    # Not in mixed or Windows style, start by that.
29598    new_path=`cmd //c echo $path`
29599  fi
29600
29601
29602  input_path="$new_path"
29603  # Check if we need to convert this using DOS-style short mode. If the path
29604  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29605  # take no chances and rewrite it.
29606  # Note: m4 eats our [], so we need to use [ and ] instead.
29607  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29608  if test "x$has_forbidden_chars" != x; then
29609    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29610    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29611  fi
29612
29613
29614  windows_path="$new_path"
29615  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29616    unix_path=`$CYGPATH -u "$windows_path"`
29617    new_path="$unix_path"
29618  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29619    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29620    new_path="$unix_path"
29621  fi
29622
29623  if test "x$path" != "x$new_path"; then
29624    BOOT_JDK="$new_path"
29625    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29626$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29627  fi
29628
29629  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29630  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29631
29632    else
29633      # We're on a unix platform. Hooray! :)
29634      path="$BOOT_JDK"
29635      has_space=`$ECHO "$path" | $GREP " "`
29636      if test "x$has_space" != x; then
29637        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29638$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29639        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29640      fi
29641
29642      # Use eval to expand a potential ~
29643      eval path="$path"
29644      if test ! -f "$path" && test ! -d "$path"; then
29645        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29646      fi
29647
29648      if test -d "$path"; then
29649        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29650      else
29651        dir="`$DIRNAME "$path"`"
29652        base="`$BASENAME "$path"`"
29653        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29654      fi
29655    fi
29656  fi
29657
29658            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29659$as_echo_n "checking for Boot JDK... " >&6; }
29660            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29661$as_echo "$BOOT_JDK" >&6; }
29662            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29663$as_echo_n "checking Boot JDK version... " >&6; }
29664            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29665            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29666$as_echo "$BOOT_JDK_VERSION" >&6; }
29667          fi # end check jdk version
29668        fi # end check javac
29669      fi # end check java
29670    fi # end check boot jdk found
29671  fi
29672
29673  fi
29674
29675
29676    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29677    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29678      # Do we have a bin/java?
29679      if test ! -x "$BOOT_JDK/bin/java"; then
29680        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29681$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29682        BOOT_JDK_FOUND=no
29683      else
29684        # Do we have a bin/javac?
29685        if test ! -x "$BOOT_JDK/bin/javac"; then
29686          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29687$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29688          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29689$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29690          BOOT_JDK_FOUND=no
29691        else
29692          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29693          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29694
29695          # Extra M4 quote needed to protect [] in grep expression.
29696          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29697          if test "x$FOUND_CORRECT_VERSION" = x; then
29698            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29699$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29700            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29701$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29702            BOOT_JDK_FOUND=no
29703          else
29704            # We're done! :-)
29705            BOOT_JDK_FOUND=yes
29706
29707  # Only process if variable expands to non-empty
29708
29709  if test "x$BOOT_JDK" != x; then
29710    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29711
29712  # Input might be given as Windows format, start by converting to
29713  # unix format.
29714  path="$BOOT_JDK"
29715  new_path=`$CYGPATH -u "$path"`
29716
29717  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29718  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29719  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29720  # "foo.exe" is OK but "foo" is an error.
29721  #
29722  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29723  # It is also a way to make sure we got the proper file name for the real test later on.
29724  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29725  if test "x$test_shortpath" = x; then
29726    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29727$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29728    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29729  fi
29730
29731  # Call helper function which possibly converts this using DOS-style short mode.
29732  # If so, the updated path is stored in $new_path.
29733
29734  input_path="$new_path"
29735  # Check if we need to convert this using DOS-style short mode. If the path
29736  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29737  # take no chances and rewrite it.
29738  # Note: m4 eats our [], so we need to use [ and ] instead.
29739  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29740  if test "x$has_forbidden_chars" != x; then
29741    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29742    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29743    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29744    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29745      # Going to short mode and back again did indeed matter. Since short mode is
29746      # case insensitive, let's make it lowercase to improve readability.
29747      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29748      # Now convert it back to Unix-style (cygpath)
29749      input_path=`$CYGPATH -u "$shortmode_path"`
29750      new_path="$input_path"
29751    fi
29752  fi
29753
29754  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29755  if test "x$test_cygdrive_prefix" = x; then
29756    # As a simple fix, exclude /usr/bin since it's not a real path.
29757    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29758      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29759      # a path prefixed by /cygdrive for fixpath to work.
29760      new_path="$CYGWIN_ROOT_PATH$input_path"
29761    fi
29762  fi
29763
29764
29765  if test "x$path" != "x$new_path"; then
29766    BOOT_JDK="$new_path"
29767    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29768$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29769  fi
29770
29771    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29772
29773  path="$BOOT_JDK"
29774  has_colon=`$ECHO $path | $GREP ^.:`
29775  new_path="$path"
29776  if test "x$has_colon" = x; then
29777    # Not in mixed or Windows style, start by that.
29778    new_path=`cmd //c echo $path`
29779  fi
29780
29781
29782  input_path="$new_path"
29783  # Check if we need to convert this using DOS-style short mode. If the path
29784  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29785  # take no chances and rewrite it.
29786  # Note: m4 eats our [], so we need to use [ and ] instead.
29787  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29788  if test "x$has_forbidden_chars" != x; then
29789    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29790    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29791  fi
29792
29793
29794  windows_path="$new_path"
29795  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29796    unix_path=`$CYGPATH -u "$windows_path"`
29797    new_path="$unix_path"
29798  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29799    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29800    new_path="$unix_path"
29801  fi
29802
29803  if test "x$path" != "x$new_path"; then
29804    BOOT_JDK="$new_path"
29805    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29806$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29807  fi
29808
29809  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29810  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29811
29812    else
29813      # We're on a unix platform. Hooray! :)
29814      path="$BOOT_JDK"
29815      has_space=`$ECHO "$path" | $GREP " "`
29816      if test "x$has_space" != x; then
29817        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29818$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29819        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29820      fi
29821
29822      # Use eval to expand a potential ~
29823      eval path="$path"
29824      if test ! -f "$path" && test ! -d "$path"; then
29825        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29826      fi
29827
29828      if test -d "$path"; then
29829        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29830      else
29831        dir="`$DIRNAME "$path"`"
29832        base="`$BASENAME "$path"`"
29833        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29834      fi
29835    fi
29836  fi
29837
29838            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29839$as_echo_n "checking for Boot JDK... " >&6; }
29840            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29841$as_echo "$BOOT_JDK" >&6; }
29842            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29843$as_echo_n "checking Boot JDK version... " >&6; }
29844            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29845            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29846$as_echo "$BOOT_JDK_VERSION" >&6; }
29847          fi # end check jdk version
29848        fi # end check javac
29849      fi # end check java
29850    fi # end check boot jdk found
29851  fi
29852
29853
29854  # If we haven't found anything yet, we've truly lost. Give up.
29855  if test "x$BOOT_JDK_FOUND" = xno; then
29856
29857  # Print a helpful message on how to acquire the necessary build dependency.
29858  # openjdk is the help tag: freetype, cups, alsa etc
29859  MISSING_DEPENDENCY=openjdk
29860
29861  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29862    cygwin_help $MISSING_DEPENDENCY
29863  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29864    msys_help $MISSING_DEPENDENCY
29865  else
29866    PKGHANDLER_COMMAND=
29867
29868    case $PKGHANDLER in
29869      apt-get)
29870        apt_help     $MISSING_DEPENDENCY ;;
29871      yum)
29872        yum_help     $MISSING_DEPENDENCY ;;
29873      port)
29874        port_help    $MISSING_DEPENDENCY ;;
29875      pkgutil)
29876        pkgutil_help $MISSING_DEPENDENCY ;;
29877      pkgadd)
29878        pkgadd_help  $MISSING_DEPENDENCY ;;
29879    esac
29880
29881    if test "x$PKGHANDLER_COMMAND" != x; then
29882      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29883    fi
29884  fi
29885
29886    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
29887$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
29888    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
29889$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29890    as_fn_error $? "Cannot continue" "$LINENO" 5
29891  fi
29892
29893
29894
29895  # Setup tools from the Boot JDK.
29896
29897  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29898
29899  # Publish this variable in the help.
29900
29901
29902  if [ -z "${JAVA+x}" ]; then
29903    # The variable is not set by user, try to locate tool using the code snippet
29904
29905      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29906$as_echo_n "checking for java in Boot JDK... " >&6; }
29907      JAVA=$BOOT_JDK/bin/java
29908      if test ! -x $JAVA; then
29909        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29910$as_echo "not found" >&6; }
29911        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29912$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29913        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29914      fi
29915      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29916$as_echo "ok" >&6; }
29917
29918
29919  else
29920    # The variable is set, but is it from the command line or the environment?
29921
29922    # Try to remove the string !JAVA! from our list.
29923    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
29924    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29925      # If it failed, the variable was not from the command line. Ignore it,
29926      # but warn the user (except for BASH, which is always set by the calling BASH).
29927      if test "xJAVA" != xBASH; then
29928        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
29929$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
29930      fi
29931      # Try to locate tool using the code snippet
29932
29933      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29934$as_echo_n "checking for java in Boot JDK... " >&6; }
29935      JAVA=$BOOT_JDK/bin/java
29936      if test ! -x $JAVA; then
29937        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29938$as_echo "not found" >&6; }
29939        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29940$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29941        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29942      fi
29943      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29944$as_echo "ok" >&6; }
29945
29946
29947    else
29948      # If it succeeded, then it was overridden by the user. We will use it
29949      # for the tool.
29950
29951      # First remove it from the list of overridden variables, so we can test
29952      # for unknown variables in the end.
29953      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29954
29955      # Check if we try to supply an empty value
29956      if test "x$JAVA" = x; then
29957        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
29958$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
29959        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
29960$as_echo_n "checking for JAVA... " >&6; }
29961        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29962$as_echo "disabled" >&6; }
29963      else
29964        # Check if the provided tool contains a complete path.
29965        tool_specified="$JAVA"
29966        tool_basename="${tool_specified##*/}"
29967        if test "x$tool_basename" = "x$tool_specified"; then
29968          # A command without a complete path is provided, search $PATH.
29969          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
29970$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
29971          # Extract the first word of "$tool_basename", so it can be a program name with args.
29972set dummy $tool_basename; ac_word=$2
29973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29974$as_echo_n "checking for $ac_word... " >&6; }
29975if ${ac_cv_path_JAVA+:} false; then :
29976  $as_echo_n "(cached) " >&6
29977else
29978  case $JAVA in
29979  [\\/]* | ?:[\\/]*)
29980  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
29981  ;;
29982  *)
29983  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29984for as_dir in $PATH
29985do
29986  IFS=$as_save_IFS
29987  test -z "$as_dir" && as_dir=.
29988    for ac_exec_ext in '' $ac_executable_extensions; do
29989  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29990    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
29991    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29992    break 2
29993  fi
29994done
29995  done
29996IFS=$as_save_IFS
29997
29998  ;;
29999esac
30000fi
30001JAVA=$ac_cv_path_JAVA
30002if test -n "$JAVA"; then
30003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
30004$as_echo "$JAVA" >&6; }
30005else
30006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30007$as_echo "no" >&6; }
30008fi
30009
30010
30011          if test "x$JAVA" = x; then
30012            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30013          fi
30014        else
30015          # Otherwise we believe it is a complete path. Use it as it is.
30016          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
30017$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
30018          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30019$as_echo_n "checking for JAVA... " >&6; }
30020          if test ! -x "$tool_specified"; then
30021            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30022$as_echo "not found" >&6; }
30023            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
30024          fi
30025          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30026$as_echo "$tool_specified" >&6; }
30027        fi
30028      fi
30029    fi
30030
30031  fi
30032
30033
30034
30035  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30036
30037  # Publish this variable in the help.
30038
30039
30040  if [ -z "${JAVAC+x}" ]; then
30041    # The variable is not set by user, try to locate tool using the code snippet
30042
30043      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30044$as_echo_n "checking for javac in Boot JDK... " >&6; }
30045      JAVAC=$BOOT_JDK/bin/javac
30046      if test ! -x $JAVAC; then
30047        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30048$as_echo "not found" >&6; }
30049        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30050$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30051        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30052      fi
30053      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30054$as_echo "ok" >&6; }
30055
30056
30057  else
30058    # The variable is set, but is it from the command line or the environment?
30059
30060    # Try to remove the string !JAVAC! from our list.
30061    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
30062    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30063      # If it failed, the variable was not from the command line. Ignore it,
30064      # but warn the user (except for BASH, which is always set by the calling BASH).
30065      if test "xJAVAC" != xBASH; then
30066        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
30067$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
30068      fi
30069      # Try to locate tool using the code snippet
30070
30071      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30072$as_echo_n "checking for javac in Boot JDK... " >&6; }
30073      JAVAC=$BOOT_JDK/bin/javac
30074      if test ! -x $JAVAC; then
30075        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30076$as_echo "not found" >&6; }
30077        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30078$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30079        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30080      fi
30081      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30082$as_echo "ok" >&6; }
30083
30084
30085    else
30086      # If it succeeded, then it was overridden by the user. We will use it
30087      # for the tool.
30088
30089      # First remove it from the list of overridden variables, so we can test
30090      # for unknown variables in the end.
30091      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30092
30093      # Check if we try to supply an empty value
30094      if test "x$JAVAC" = x; then
30095        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
30096$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
30097        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30098$as_echo_n "checking for JAVAC... " >&6; }
30099        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30100$as_echo "disabled" >&6; }
30101      else
30102        # Check if the provided tool contains a complete path.
30103        tool_specified="$JAVAC"
30104        tool_basename="${tool_specified##*/}"
30105        if test "x$tool_basename" = "x$tool_specified"; then
30106          # A command without a complete path is provided, search $PATH.
30107          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
30108$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
30109          # Extract the first word of "$tool_basename", so it can be a program name with args.
30110set dummy $tool_basename; ac_word=$2
30111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30112$as_echo_n "checking for $ac_word... " >&6; }
30113if ${ac_cv_path_JAVAC+:} false; then :
30114  $as_echo_n "(cached) " >&6
30115else
30116  case $JAVAC in
30117  [\\/]* | ?:[\\/]*)
30118  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
30119  ;;
30120  *)
30121  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30122for as_dir in $PATH
30123do
30124  IFS=$as_save_IFS
30125  test -z "$as_dir" && as_dir=.
30126    for ac_exec_ext in '' $ac_executable_extensions; do
30127  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30128    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
30129    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30130    break 2
30131  fi
30132done
30133  done
30134IFS=$as_save_IFS
30135
30136  ;;
30137esac
30138fi
30139JAVAC=$ac_cv_path_JAVAC
30140if test -n "$JAVAC"; then
30141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
30142$as_echo "$JAVAC" >&6; }
30143else
30144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30145$as_echo "no" >&6; }
30146fi
30147
30148
30149          if test "x$JAVAC" = x; then
30150            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30151          fi
30152        else
30153          # Otherwise we believe it is a complete path. Use it as it is.
30154          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
30155$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
30156          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30157$as_echo_n "checking for JAVAC... " >&6; }
30158          if test ! -x "$tool_specified"; then
30159            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30160$as_echo "not found" >&6; }
30161            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
30162          fi
30163          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30164$as_echo "$tool_specified" >&6; }
30165        fi
30166      fi
30167    fi
30168
30169  fi
30170
30171
30172
30173  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30174
30175  # Publish this variable in the help.
30176
30177
30178  if [ -z "${JAVAH+x}" ]; then
30179    # The variable is not set by user, try to locate tool using the code snippet
30180
30181      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30182$as_echo_n "checking for javah in Boot JDK... " >&6; }
30183      JAVAH=$BOOT_JDK/bin/javah
30184      if test ! -x $JAVAH; then
30185        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30186$as_echo "not found" >&6; }
30187        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30188$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30189        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30190      fi
30191      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30192$as_echo "ok" >&6; }
30193
30194
30195  else
30196    # The variable is set, but is it from the command line or the environment?
30197
30198    # Try to remove the string !JAVAH! from our list.
30199    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
30200    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30201      # If it failed, the variable was not from the command line. Ignore it,
30202      # but warn the user (except for BASH, which is always set by the calling BASH).
30203      if test "xJAVAH" != xBASH; then
30204        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
30205$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
30206      fi
30207      # Try to locate tool using the code snippet
30208
30209      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30210$as_echo_n "checking for javah in Boot JDK... " >&6; }
30211      JAVAH=$BOOT_JDK/bin/javah
30212      if test ! -x $JAVAH; then
30213        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30214$as_echo "not found" >&6; }
30215        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30216$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30217        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30218      fi
30219      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30220$as_echo "ok" >&6; }
30221
30222
30223    else
30224      # If it succeeded, then it was overridden by the user. We will use it
30225      # for the tool.
30226
30227      # First remove it from the list of overridden variables, so we can test
30228      # for unknown variables in the end.
30229      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30230
30231      # Check if we try to supply an empty value
30232      if test "x$JAVAH" = x; then
30233        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
30234$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
30235        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30236$as_echo_n "checking for JAVAH... " >&6; }
30237        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30238$as_echo "disabled" >&6; }
30239      else
30240        # Check if the provided tool contains a complete path.
30241        tool_specified="$JAVAH"
30242        tool_basename="${tool_specified##*/}"
30243        if test "x$tool_basename" = "x$tool_specified"; then
30244          # A command without a complete path is provided, search $PATH.
30245          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
30246$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
30247          # Extract the first word of "$tool_basename", so it can be a program name with args.
30248set dummy $tool_basename; ac_word=$2
30249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30250$as_echo_n "checking for $ac_word... " >&6; }
30251if ${ac_cv_path_JAVAH+:} false; then :
30252  $as_echo_n "(cached) " >&6
30253else
30254  case $JAVAH in
30255  [\\/]* | ?:[\\/]*)
30256  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
30257  ;;
30258  *)
30259  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30260for as_dir in $PATH
30261do
30262  IFS=$as_save_IFS
30263  test -z "$as_dir" && as_dir=.
30264    for ac_exec_ext in '' $ac_executable_extensions; do
30265  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30266    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
30267    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30268    break 2
30269  fi
30270done
30271  done
30272IFS=$as_save_IFS
30273
30274  ;;
30275esac
30276fi
30277JAVAH=$ac_cv_path_JAVAH
30278if test -n "$JAVAH"; then
30279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
30280$as_echo "$JAVAH" >&6; }
30281else
30282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30283$as_echo "no" >&6; }
30284fi
30285
30286
30287          if test "x$JAVAH" = x; then
30288            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30289          fi
30290        else
30291          # Otherwise we believe it is a complete path. Use it as it is.
30292          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
30293$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
30294          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30295$as_echo_n "checking for JAVAH... " >&6; }
30296          if test ! -x "$tool_specified"; then
30297            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30298$as_echo "not found" >&6; }
30299            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
30300          fi
30301          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30302$as_echo "$tool_specified" >&6; }
30303        fi
30304      fi
30305    fi
30306
30307  fi
30308
30309
30310
30311  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30312
30313  # Publish this variable in the help.
30314
30315
30316  if [ -z "${JAR+x}" ]; then
30317    # The variable is not set by user, try to locate tool using the code snippet
30318
30319      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30320$as_echo_n "checking for jar in Boot JDK... " >&6; }
30321      JAR=$BOOT_JDK/bin/jar
30322      if test ! -x $JAR; then
30323        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30324$as_echo "not found" >&6; }
30325        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30326$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30327        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30328      fi
30329      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30330$as_echo "ok" >&6; }
30331
30332
30333  else
30334    # The variable is set, but is it from the command line or the environment?
30335
30336    # Try to remove the string !JAR! from our list.
30337    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
30338    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30339      # If it failed, the variable was not from the command line. Ignore it,
30340      # but warn the user (except for BASH, which is always set by the calling BASH).
30341      if test "xJAR" != xBASH; then
30342        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
30343$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
30344      fi
30345      # Try to locate tool using the code snippet
30346
30347      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30348$as_echo_n "checking for jar in Boot JDK... " >&6; }
30349      JAR=$BOOT_JDK/bin/jar
30350      if test ! -x $JAR; then
30351        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30352$as_echo "not found" >&6; }
30353        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30354$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30355        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30356      fi
30357      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30358$as_echo "ok" >&6; }
30359
30360
30361    else
30362      # If it succeeded, then it was overridden by the user. We will use it
30363      # for the tool.
30364
30365      # First remove it from the list of overridden variables, so we can test
30366      # for unknown variables in the end.
30367      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30368
30369      # Check if we try to supply an empty value
30370      if test "x$JAR" = x; then
30371        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
30372$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
30373        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30374$as_echo_n "checking for JAR... " >&6; }
30375        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30376$as_echo "disabled" >&6; }
30377      else
30378        # Check if the provided tool contains a complete path.
30379        tool_specified="$JAR"
30380        tool_basename="${tool_specified##*/}"
30381        if test "x$tool_basename" = "x$tool_specified"; then
30382          # A command without a complete path is provided, search $PATH.
30383          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
30384$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
30385          # Extract the first word of "$tool_basename", so it can be a program name with args.
30386set dummy $tool_basename; ac_word=$2
30387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30388$as_echo_n "checking for $ac_word... " >&6; }
30389if ${ac_cv_path_JAR+:} false; then :
30390  $as_echo_n "(cached) " >&6
30391else
30392  case $JAR in
30393  [\\/]* | ?:[\\/]*)
30394  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
30395  ;;
30396  *)
30397  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30398for as_dir in $PATH
30399do
30400  IFS=$as_save_IFS
30401  test -z "$as_dir" && as_dir=.
30402    for ac_exec_ext in '' $ac_executable_extensions; do
30403  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30404    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
30405    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30406    break 2
30407  fi
30408done
30409  done
30410IFS=$as_save_IFS
30411
30412  ;;
30413esac
30414fi
30415JAR=$ac_cv_path_JAR
30416if test -n "$JAR"; then
30417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
30418$as_echo "$JAR" >&6; }
30419else
30420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30421$as_echo "no" >&6; }
30422fi
30423
30424
30425          if test "x$JAR" = x; then
30426            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30427          fi
30428        else
30429          # Otherwise we believe it is a complete path. Use it as it is.
30430          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
30431$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
30432          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30433$as_echo_n "checking for JAR... " >&6; }
30434          if test ! -x "$tool_specified"; then
30435            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30436$as_echo "not found" >&6; }
30437            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
30438          fi
30439          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30440$as_echo "$tool_specified" >&6; }
30441        fi
30442      fi
30443    fi
30444
30445  fi
30446
30447
30448
30449  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30450
30451  # Publish this variable in the help.
30452
30453
30454  if [ -z "${JARSIGNER+x}" ]; then
30455    # The variable is not set by user, try to locate tool using the code snippet
30456
30457      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30458$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30459      JARSIGNER=$BOOT_JDK/bin/jarsigner
30460      if test ! -x $JARSIGNER; then
30461        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30462$as_echo "not found" >&6; }
30463        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30464$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30465        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30466      fi
30467      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30468$as_echo "ok" >&6; }
30469
30470
30471  else
30472    # The variable is set, but is it from the command line or the environment?
30473
30474    # Try to remove the string !JARSIGNER! from our list.
30475    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
30476    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30477      # If it failed, the variable was not from the command line. Ignore it,
30478      # but warn the user (except for BASH, which is always set by the calling BASH).
30479      if test "xJARSIGNER" != xBASH; then
30480        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
30481$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
30482      fi
30483      # Try to locate tool using the code snippet
30484
30485      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30486$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30487      JARSIGNER=$BOOT_JDK/bin/jarsigner
30488      if test ! -x $JARSIGNER; then
30489        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30490$as_echo "not found" >&6; }
30491        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30492$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30493        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30494      fi
30495      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30496$as_echo "ok" >&6; }
30497
30498
30499    else
30500      # If it succeeded, then it was overridden by the user. We will use it
30501      # for the tool.
30502
30503      # First remove it from the list of overridden variables, so we can test
30504      # for unknown variables in the end.
30505      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30506
30507      # Check if we try to supply an empty value
30508      if test "x$JARSIGNER" = x; then
30509        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
30510$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
30511        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30512$as_echo_n "checking for JARSIGNER... " >&6; }
30513        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30514$as_echo "disabled" >&6; }
30515      else
30516        # Check if the provided tool contains a complete path.
30517        tool_specified="$JARSIGNER"
30518        tool_basename="${tool_specified##*/}"
30519        if test "x$tool_basename" = "x$tool_specified"; then
30520          # A command without a complete path is provided, search $PATH.
30521          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
30522$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
30523          # Extract the first word of "$tool_basename", so it can be a program name with args.
30524set dummy $tool_basename; ac_word=$2
30525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30526$as_echo_n "checking for $ac_word... " >&6; }
30527if ${ac_cv_path_JARSIGNER+:} false; then :
30528  $as_echo_n "(cached) " >&6
30529else
30530  case $JARSIGNER in
30531  [\\/]* | ?:[\\/]*)
30532  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
30533  ;;
30534  *)
30535  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30536for as_dir in $PATH
30537do
30538  IFS=$as_save_IFS
30539  test -z "$as_dir" && as_dir=.
30540    for ac_exec_ext in '' $ac_executable_extensions; do
30541  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30542    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
30543    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30544    break 2
30545  fi
30546done
30547  done
30548IFS=$as_save_IFS
30549
30550  ;;
30551esac
30552fi
30553JARSIGNER=$ac_cv_path_JARSIGNER
30554if test -n "$JARSIGNER"; then
30555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
30556$as_echo "$JARSIGNER" >&6; }
30557else
30558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30559$as_echo "no" >&6; }
30560fi
30561
30562
30563          if test "x$JARSIGNER" = x; then
30564            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30565          fi
30566        else
30567          # Otherwise we believe it is a complete path. Use it as it is.
30568          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
30569$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
30570          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30571$as_echo_n "checking for JARSIGNER... " >&6; }
30572          if test ! -x "$tool_specified"; then
30573            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30574$as_echo "not found" >&6; }
30575            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
30576          fi
30577          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30578$as_echo "$tool_specified" >&6; }
30579        fi
30580      fi
30581    fi
30582
30583  fi
30584
30585
30586
30587  # Finally, set some other options...
30588
30589  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
30590  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
30591
30592
30593
30594  $ECHO "Check if jvm arg is ok: --patch-module foo=bar" >&5
30595  $ECHO "Command: $JAVA --patch-module foo=bar -version" >&5
30596  OUTPUT=`$JAVA --patch-module foo=bar -version 2>&1`
30597  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
30598  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
30599  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30600    dummy="$dummy --patch-module foo=bar"
30601    JVM_ARG_OK=true
30602  else
30603    $ECHO "Arg failed:" >&5
30604    $ECHO "$OUTPUT" >&5
30605    JVM_ARG_OK=false
30606  fi
30607
30608  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
30609$as_echo_n "checking if Boot JDK supports modules... " >&6; }
30610  if test "x$JVM_ARG_OK" = "xtrue"; then
30611    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30612$as_echo "yes" >&6; }
30613    BOOT_JDK_MODULAR="true"
30614  else
30615    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30616$as_echo "no" >&6; }
30617    BOOT_JDK_MODULAR="false"
30618  fi
30619
30620
30621
30622
30623  # Check if the boot jdk is 32 or 64 bit
30624  if "$JAVA" -d64 -version > /dev/null 2>&1; then
30625    BOOT_JDK_BITS="64"
30626  else
30627    BOOT_JDK_BITS="32"
30628  fi
30629  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
30630$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
30631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
30632$as_echo "$BOOT_JDK_BITS" >&6; }
30633
30634
30635
30636
30637# Check whether --with-build-jdk was given.
30638if test "${with_build_jdk+set}" = set; then :
30639  withval=$with_build_jdk;
30640fi
30641
30642
30643  CREATE_BUILDJDK=false
30644  EXTERNAL_BUILDJDK=false
30645  BUILD_JDK_FOUND="no"
30646  if test "x$with_build_jdk" != "x"; then
30647
30648  if test "x$BUILD_JDK_FOUND" = xno; then
30649    # Execute the test
30650
30651       if test "x$with_build_jdk" != x; then
30652         BUILD_JDK=$with_build_jdk
30653         BUILD_JDK_FOUND=maybe
30654         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
30655$as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
30656       fi
30657
30658    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30659    if test "x$BUILD_JDK_FOUND" = xmaybe; then
30660      # Do we have a bin/java?
30661      if test ! -x "$BUILD_JDK/bin/java"; then
30662        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
30663$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
30664        BUILD_JDK_FOUND=no
30665      elif test ! -x "$BUILD_JDK/bin/jlink"; then
30666        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
30667$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
30668        BUILD_JDK_FOUND=no
30669      elif test ! -x "$BUILD_JDK/bin/jmod"; then
30670        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&5
30671$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&6;}
30672        BUILD_JDK_FOUND=no
30673      elif test ! -x "$BUILD_JDK/bin/javac"; then
30674        # Do we have a bin/javac?
30675        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
30676$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
30677        { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
30678$as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
30679        BUILD_JDK_FOUND=no
30680      else
30681        # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30682        BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30683
30684        # Extra M4 quote needed to protect [] in grep expression.
30685        FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
30686        if test "x$FOUND_CORRECT_VERSION" = x; then
30687          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
30688$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
30689          { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
30690$as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
30691          BUILD_JDK_FOUND=no
30692        else
30693          # We're done!
30694          BUILD_JDK_FOUND=yes
30695
30696  # Only process if variable expands to non-empty
30697
30698  if test "x$BUILD_JDK" != x; then
30699    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30700
30701  # Input might be given as Windows format, start by converting to
30702  # unix format.
30703  path="$BUILD_JDK"
30704  new_path=`$CYGPATH -u "$path"`
30705
30706  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30707  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30708  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30709  # "foo.exe" is OK but "foo" is an error.
30710  #
30711  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30712  # It is also a way to make sure we got the proper file name for the real test later on.
30713  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30714  if test "x$test_shortpath" = x; then
30715    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30716$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30717    as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
30718  fi
30719
30720  # Call helper function which possibly converts this using DOS-style short mode.
30721  # If so, the updated path is stored in $new_path.
30722
30723  input_path="$new_path"
30724  # Check if we need to convert this using DOS-style short mode. If the path
30725  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30726  # take no chances and rewrite it.
30727  # Note: m4 eats our [], so we need to use [ and ] instead.
30728  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30729  if test "x$has_forbidden_chars" != x; then
30730    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30731    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30732    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30733    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30734      # Going to short mode and back again did indeed matter. Since short mode is
30735      # case insensitive, let's make it lowercase to improve readability.
30736      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30737      # Now convert it back to Unix-style (cygpath)
30738      input_path=`$CYGPATH -u "$shortmode_path"`
30739      new_path="$input_path"
30740    fi
30741  fi
30742
30743  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30744  if test "x$test_cygdrive_prefix" = x; then
30745    # As a simple fix, exclude /usr/bin since it's not a real path.
30746    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30747      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30748      # a path prefixed by /cygdrive for fixpath to work.
30749      new_path="$CYGWIN_ROOT_PATH$input_path"
30750    fi
30751  fi
30752
30753
30754  if test "x$path" != "x$new_path"; then
30755    BUILD_JDK="$new_path"
30756    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30757$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30758  fi
30759
30760    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30761
30762  path="$BUILD_JDK"
30763  has_colon=`$ECHO $path | $GREP ^.:`
30764  new_path="$path"
30765  if test "x$has_colon" = x; then
30766    # Not in mixed or Windows style, start by that.
30767    new_path=`cmd //c echo $path`
30768  fi
30769
30770
30771  input_path="$new_path"
30772  # Check if we need to convert this using DOS-style short mode. If the path
30773  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30774  # take no chances and rewrite it.
30775  # Note: m4 eats our [], so we need to use [ and ] instead.
30776  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30777  if test "x$has_forbidden_chars" != x; then
30778    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30779    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30780  fi
30781
30782
30783  windows_path="$new_path"
30784  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30785    unix_path=`$CYGPATH -u "$windows_path"`
30786    new_path="$unix_path"
30787  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30788    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30789    new_path="$unix_path"
30790  fi
30791
30792  if test "x$path" != "x$new_path"; then
30793    BUILD_JDK="$new_path"
30794    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30795$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30796  fi
30797
30798  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30799  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30800
30801    else
30802      # We're on a unix platform. Hooray! :)
30803      path="$BUILD_JDK"
30804      has_space=`$ECHO "$path" | $GREP " "`
30805      if test "x$has_space" != x; then
30806        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30807$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30808        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30809      fi
30810
30811      # Use eval to expand a potential ~
30812      eval path="$path"
30813      if test ! -f "$path" && test ! -d "$path"; then
30814        as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30815      fi
30816
30817      if test -d "$path"; then
30818        BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
30819      else
30820        dir="`$DIRNAME "$path"`"
30821        base="`$BASENAME "$path"`"
30822        BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30823      fi
30824    fi
30825  fi
30826
30827          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30828$as_echo_n "checking for Build JDK... " >&6; }
30829          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
30830$as_echo "$BUILD_JDK" >&6; }
30831          { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
30832$as_echo_n "checking Build JDK version... " >&6; }
30833          BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30834          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
30835$as_echo "$BUILD_JDK_VERSION" >&6; }
30836        fi # end check jdk version
30837      fi # end check java
30838    fi # end check build jdk found
30839  fi
30840
30841    EXTERNAL_BUILDJDK=true
30842  else
30843    if test "x$COMPILE_TYPE" = "xcross"; then
30844      BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
30845      BUILD_JDK_FOUND=yes
30846      CREATE_BUILDJDK=true
30847      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30848$as_echo_n "checking for Build JDK... " >&6; }
30849      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
30850$as_echo "yes, will build it for the host platform" >&6; }
30851    else
30852      BUILD_JDK="\$(JDK_OUTPUTDIR)"
30853      BUILD_JDK_FOUND=yes
30854      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30855$as_echo_n "checking for Build JDK... " >&6; }
30856      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
30857$as_echo "yes, will use output dir" >&6; }
30858    fi
30859  fi
30860
30861  JMOD="$BUILD_JDK/bin/jmod"
30862  JLINK="$BUILD_JDK/bin/jlink"
30863
30864
30865
30866  if test "x$BUILD_JDK_FOUND" != "xyes"; then
30867    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30868$as_echo_n "checking for Build JDK... " >&6; }
30869    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30870$as_echo "no" >&6; }
30871    as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
30872  fi
30873
30874
30875
30876
30877
30878
30879###############################################################################
30880#
30881# Configure the sources to use. We can add or override individual directories.
30882#
30883###############################################################################
30884
30885
30886  # Where are the sources.
30887  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
30888  CORBA_TOPDIR="$SRC_ROOT/corba"
30889  JAXP_TOPDIR="$SRC_ROOT/jaxp"
30890  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
30891  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
30892  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
30893  JDK_TOPDIR="$SRC_ROOT/jdk"
30894
30895
30896
30897
30898
30899
30900
30901
30902
30903  # This feature is no longer supported.
30904
30905
30906
30907# Check whether --with-add-source-root was given.
30908if test "${with_add_source_root+set}" = set; then :
30909  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
30910$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
30911fi
30912
30913
30914
30915
30916# Check whether --with-override-source-root was given.
30917if test "${with_override_source_root+set}" = set; then :
30918  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
30919$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
30920fi
30921
30922
30923
30924
30925# Check whether --with-adds-and-overrides was given.
30926if test "${with_adds_and_overrides+set}" = set; then :
30927  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
30928$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
30929fi
30930
30931
30932
30933
30934# Check whether --with-override-langtools was given.
30935if test "${with_override_langtools+set}" = set; then :
30936  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
30937$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
30938fi
30939
30940
30941
30942
30943# Check whether --with-override-corba was given.
30944if test "${with_override_corba+set}" = set; then :
30945  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
30946$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
30947fi
30948
30949
30950
30951
30952# Check whether --with-override-jaxp was given.
30953if test "${with_override_jaxp+set}" = set; then :
30954  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
30955$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
30956fi
30957
30958
30959
30960
30961# Check whether --with-override-jaxws was given.
30962if test "${with_override_jaxws+set}" = set; then :
30963  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
30964$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
30965fi
30966
30967
30968
30969
30970# Check whether --with-override-hotspot was given.
30971if test "${with_override_hotspot+set}" = set; then :
30972  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
30973$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
30974fi
30975
30976
30977
30978
30979# Check whether --with-override-nashorn was given.
30980if test "${with_override_nashorn+set}" = set; then :
30981  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
30982$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
30983fi
30984
30985
30986
30987
30988# Check whether --with-override-jdk was given.
30989if test "${with_override_jdk+set}" = set; then :
30990  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
30991$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
30992fi
30993
30994
30995
30996
30997  BUILD_OUTPUT="$OUTPUT_ROOT"
30998
30999
31000  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
31001  BUILD_HOTSPOT=true
31002
31003
31004
31005# Check whether --with-import-hotspot was given.
31006if test "${with_import_hotspot+set}" = set; then :
31007  withval=$with_import_hotspot;
31008fi
31009
31010  if test "x$with_import_hotspot" != x; then
31011    CURDIR="$PWD"
31012    cd "$with_import_hotspot"
31013    HOTSPOT_DIST="`pwd`"
31014    cd "$CURDIR"
31015    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
31016      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
31017    fi
31018    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
31019$as_echo_n "checking if hotspot should be imported... " >&6; }
31020    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
31021$as_echo "yes from $HOTSPOT_DIST" >&6; }
31022    BUILD_HOTSPOT=false
31023  fi
31024
31025  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
31026
31027
31028
31029
31030# Check whether --with-import-modules was given.
31031if test "${with_import_modules+set}" = set; then :
31032  withval=$with_import_modules;
31033fi
31034
31035
31036  if test "x$with_import_modules" != x \
31037      && test "x$with_import_modules" != "xno"; then
31038    if test -d "$with_import_modules"; then
31039      IMPORT_MODULES_TOPDIR="$with_import_modules"
31040
31041  # Only process if variable expands to non-empty
31042
31043  if test "x$IMPORT_MODULES_TOPDIR" != x; then
31044    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31045
31046  # Input might be given as Windows format, start by converting to
31047  # unix format.
31048  path="$IMPORT_MODULES_TOPDIR"
31049  new_path=`$CYGPATH -u "$path"`
31050
31051  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31052  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31053  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31054  # "foo.exe" is OK but "foo" is an error.
31055  #
31056  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31057  # It is also a way to make sure we got the proper file name for the real test later on.
31058  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31059  if test "x$test_shortpath" = x; then
31060    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31061$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31062    as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
31063  fi
31064
31065  # Call helper function which possibly converts this using DOS-style short mode.
31066  # If so, the updated path is stored in $new_path.
31067
31068  input_path="$new_path"
31069  # Check if we need to convert this using DOS-style short mode. If the path
31070  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31071  # take no chances and rewrite it.
31072  # Note: m4 eats our [], so we need to use [ and ] instead.
31073  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31074  if test "x$has_forbidden_chars" != x; then
31075    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31076    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31077    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31078    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31079      # Going to short mode and back again did indeed matter. Since short mode is
31080      # case insensitive, let's make it lowercase to improve readability.
31081      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31082      # Now convert it back to Unix-style (cygpath)
31083      input_path=`$CYGPATH -u "$shortmode_path"`
31084      new_path="$input_path"
31085    fi
31086  fi
31087
31088  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31089  if test "x$test_cygdrive_prefix" = x; then
31090    # As a simple fix, exclude /usr/bin since it's not a real path.
31091    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31092      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31093      # a path prefixed by /cygdrive for fixpath to work.
31094      new_path="$CYGWIN_ROOT_PATH$input_path"
31095    fi
31096  fi
31097
31098
31099  if test "x$path" != "x$new_path"; then
31100    IMPORT_MODULES_TOPDIR="$new_path"
31101    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31102$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31103  fi
31104
31105    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31106
31107  path="$IMPORT_MODULES_TOPDIR"
31108  has_colon=`$ECHO $path | $GREP ^.:`
31109  new_path="$path"
31110  if test "x$has_colon" = x; then
31111    # Not in mixed or Windows style, start by that.
31112    new_path=`cmd //c echo $path`
31113  fi
31114
31115
31116  input_path="$new_path"
31117  # Check if we need to convert this using DOS-style short mode. If the path
31118  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31119  # take no chances and rewrite it.
31120  # Note: m4 eats our [], so we need to use [ and ] instead.
31121  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31122  if test "x$has_forbidden_chars" != x; then
31123    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31124    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31125  fi
31126
31127
31128  windows_path="$new_path"
31129  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31130    unix_path=`$CYGPATH -u "$windows_path"`
31131    new_path="$unix_path"
31132  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31133    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31134    new_path="$unix_path"
31135  fi
31136
31137  if test "x$path" != "x$new_path"; then
31138    IMPORT_MODULES_TOPDIR="$new_path"
31139    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31140$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31141  fi
31142
31143  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31144  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31145
31146    else
31147      # We're on a unix platform. Hooray! :)
31148      path="$IMPORT_MODULES_TOPDIR"
31149      has_space=`$ECHO "$path" | $GREP " "`
31150      if test "x$has_space" != x; then
31151        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31152$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31153        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31154      fi
31155
31156      # Use eval to expand a potential ~
31157      eval path="$path"
31158      if test ! -f "$path" && test ! -d "$path"; then
31159        as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
31160      fi
31161
31162      if test -d "$path"; then
31163        IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
31164      else
31165        dir="`$DIRNAME "$path"`"
31166        base="`$BASENAME "$path"`"
31167        IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
31168      fi
31169    fi
31170  fi
31171
31172    elif test -e "$with_import_modules"; then
31173      IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
31174      $RM -rf "$IMPORT_MODULES_TOPDIR"
31175      $MKDIR -p "$IMPORT_MODULES_TOPDIR"
31176      if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
31177        as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31178      fi
31179    else
31180      as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31181    fi
31182  fi
31183
31184  if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
31185    IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
31186  fi
31187  if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
31188    IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
31189  fi
31190  if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
31191    IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
31192  fi
31193  if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
31194    IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
31195  fi
31196  if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
31197    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
31198  fi
31199  if test -d "$IMPORT_MODULES_TOPDIR/make"; then
31200    IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
31201  fi
31202
31203
31204
31205
31206
31207
31208
31209
31210
31211###############################################################################
31212#
31213# Setup the toolchain (compilers etc), i.e. tools used to compile and process
31214# native code.
31215#
31216###############################################################################
31217
31218# See if we are doing a complete static build or not
31219
31220  # Check whether --enable-static-build was given.
31221if test "${enable_static_build+set}" = set; then :
31222  enableval=$enable_static_build;
31223fi
31224
31225  STATIC_BUILD=false
31226  if test "x$enable_static_build" = "xyes"; then
31227    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31228$as_echo_n "checking if static build is enabled... " >&6; }
31229    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31230$as_echo "yes" >&6; }
31231    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
31232      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
31233    fi
31234    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
31235    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
31236    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
31237    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31238    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31239    STATIC_BUILD=true
31240  elif test "x$enable_static_build" = "xno"; then
31241    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31242$as_echo_n "checking if static build is enabled... " >&6; }
31243    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31244$as_echo "no" >&6; }
31245  elif test "x$enable_static_build" != "x"; then
31246    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
31247  fi
31248
31249
31250
31251
31252# First determine the toolchain type (compiler family)
31253
31254
31255# Check whether --with-toolchain-type was given.
31256if test "${with_toolchain_type+set}" = set; then :
31257  withval=$with_toolchain_type;
31258fi
31259
31260
31261  # Use indirect variable referencing
31262  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
31263  VALID_TOOLCHAINS=${!toolchain_var_name}
31264
31265  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31266    if test -n "$XCODEBUILD"; then
31267      # On Mac OS X, default toolchain to clang after Xcode 5
31268      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
31269      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
31270      if test $? -ne 0; then
31271        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
31272      fi
31273      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
31274          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
31275          $CUT -f 1 -d .`
31276      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
31277$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
31278      if test $XCODE_MAJOR_VERSION -ge 5; then
31279          DEFAULT_TOOLCHAIN="clang"
31280      else
31281          DEFAULT_TOOLCHAIN="gcc"
31282      fi
31283    else
31284      # If Xcode is not installed, but the command line tools are
31285      # then we can't run xcodebuild. On these systems we should
31286      # default to clang
31287      DEFAULT_TOOLCHAIN="clang"
31288    fi
31289  else
31290    # First toolchain type in the list is the default
31291    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
31292  fi
31293
31294  if test "x$with_toolchain_type" = xlist; then
31295    # List all toolchains
31296    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
31297$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
31298    for toolchain in $VALID_TOOLCHAINS; do
31299      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
31300      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31301      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
31302    done
31303
31304    exit 0
31305  elif test "x$with_toolchain_type" != x; then
31306    # User override; check that it is valid
31307    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
31308      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
31309$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
31310      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
31311$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
31312      as_fn_error $? "Cannot continue." "$LINENO" 5
31313    fi
31314    TOOLCHAIN_TYPE=$with_toolchain_type
31315  else
31316    # No flag given, use default
31317    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
31318  fi
31319
31320
31321  TOOLCHAIN_CC_BINARY_clang="clang"
31322  TOOLCHAIN_CC_BINARY_gcc="gcc"
31323  TOOLCHAIN_CC_BINARY_microsoft="cl"
31324  TOOLCHAIN_CC_BINARY_solstudio="cc"
31325  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
31326
31327  TOOLCHAIN_CXX_BINARY_clang="clang++"
31328  TOOLCHAIN_CXX_BINARY_gcc="g++"
31329  TOOLCHAIN_CXX_BINARY_microsoft="cl"
31330  TOOLCHAIN_CXX_BINARY_solstudio="CC"
31331  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
31332
31333  # Use indirect variable referencing
31334  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
31335  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31336  toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
31337  TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
31338  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
31339  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
31340  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
31341  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
31342
31343
31344  # Define filename patterns
31345  if test "x$OPENJDK_TARGET_OS" = xwindows; then
31346    LIBRARY_PREFIX=
31347    SHARED_LIBRARY_SUFFIX='.dll'
31348    STATIC_LIBRARY_SUFFIX='.lib'
31349    SHARED_LIBRARY='$1.dll'
31350    STATIC_LIBRARY='$1.lib'
31351    OBJ_SUFFIX='.obj'
31352    EXE_SUFFIX='.exe'
31353  else
31354    LIBRARY_PREFIX=lib
31355    SHARED_LIBRARY_SUFFIX='.so'
31356    STATIC_LIBRARY_SUFFIX='.a'
31357    SHARED_LIBRARY='lib$1.so'
31358    STATIC_LIBRARY='lib$1.a'
31359    OBJ_SUFFIX='.o'
31360    EXE_SUFFIX=''
31361    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31362      # For full static builds, we're overloading the SHARED_LIBRARY
31363      # variables in order to limit the amount of changes required.
31364      # It would be better to remove SHARED and just use LIBRARY and
31365      # LIBRARY_SUFFIX for libraries that can be built either
31366      # shared or static and use STATIC_* for libraries that are
31367      # always built statically.
31368      if test "x$STATIC_BUILD" = xtrue; then
31369        SHARED_LIBRARY='lib$1.a'
31370        SHARED_LIBRARY_SUFFIX='.a'
31371      else
31372        SHARED_LIBRARY='lib$1.dylib'
31373        SHARED_LIBRARY_SUFFIX='.dylib'
31374      fi
31375    fi
31376  fi
31377
31378
31379
31380
31381
31382
31383
31384
31385
31386
31387  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
31388    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
31389$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
31390  else
31391    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
31392$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
31393  fi
31394
31395
31396# User supplied flags should be used when configure detects compilers
31397
31398  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
31399    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
31400$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
31401  fi
31402
31403  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
31404    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
31405$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
31406  fi
31407
31408  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
31409    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
31410$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
31411  fi
31412
31413
31414# Check whether --with-extra-cflags was given.
31415if test "${with_extra_cflags+set}" = set; then :
31416  withval=$with_extra_cflags;
31417fi
31418
31419
31420
31421# Check whether --with-extra-cxxflags was given.
31422if test "${with_extra_cxxflags+set}" = set; then :
31423  withval=$with_extra_cxxflags;
31424fi
31425
31426
31427
31428# Check whether --with-extra-ldflags was given.
31429if test "${with_extra_ldflags+set}" = set; then :
31430  withval=$with_extra_ldflags;
31431fi
31432
31433
31434  EXTRA_CFLAGS="$with_extra_cflags"
31435  EXTRA_CXXFLAGS="$with_extra_cxxflags"
31436  EXTRA_LDFLAGS="$with_extra_ldflags"
31437
31438  # Hotspot needs these set in their legacy form
31439  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
31440  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
31441  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
31442
31443
31444
31445
31446
31447
31448
31449
31450
31451  # The global CFLAGS and LDLAGS variables are used by configure tests and
31452  # should include the extra parameters
31453  CFLAGS="$EXTRA_CFLAGS"
31454  CXXFLAGS="$EXTRA_CXXFLAGS"
31455  LDFLAGS="$EXTRA_LDFLAGS"
31456  CPPFLAGS=""
31457
31458# The sysroot cflags are needed for configure to be able to run the compilers
31459
31460  if test "x$SYSROOT" != "x"; then
31461    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31462      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31463        # Solaris Studio does not have a concept of sysroot. Instead we must
31464        # make sure the default include and lib dirs are appended to each
31465        # compile and link command line. Must also add -I-xbuiltin to enable
31466        # inlining of system functions and intrinsics.
31467        SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
31468        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
31469            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
31470      fi
31471    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
31472      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
31473      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
31474    elif test "x$TOOLCHAIN_TYPE" = xclang; then
31475      SYSROOT_CFLAGS="-isysroot $SYSROOT"
31476      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
31477    fi
31478    # Propagate the sysroot args to hotspot
31479    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
31480    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
31481    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
31482    # The global CFLAGS and LDFLAGS variables need these for configure to function
31483    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
31484    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
31485    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
31486    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
31487  fi
31488
31489  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31490    # We also need -iframework<path>/System/Library/Frameworks
31491    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31492    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31493    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
31494    # set this here so it doesn't have to be peppered throughout the forest
31495    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31496    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31497  fi
31498
31499
31500
31501
31502
31503# Then detect the actual binaries needed
31504
31505  # FIXME: Is this needed?
31506  ac_ext=cpp
31507ac_cpp='$CXXCPP $CPPFLAGS'
31508ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31509ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31510ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31511
31512
31513  # Store the CFLAGS etc passed to the configure script.
31514  ORG_CFLAGS="$CFLAGS"
31515  ORG_CXXFLAGS="$CXXFLAGS"
31516
31517  # autoconf magic only relies on PATH, so update it if tools dir is specified
31518  OLD_PATH="$PATH"
31519
31520  # On Windows, we need to detect the visual studio installation first.
31521  # This will change the PATH, but we need to keep that new PATH even
31522  # after toolchain detection is done, since the compiler (on x86) uses
31523  # it for DLL resolution in runtime.
31524  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
31525      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
31526
31527  # Store path to cygwin link.exe to help excluding it when searching for
31528  # VS linker. This must be done before changing the PATH when looking for VS.
31529  # Extract the first word of "link", so it can be a program name with args.
31530set dummy link; ac_word=$2
31531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31532$as_echo_n "checking for $ac_word... " >&6; }
31533if ${ac_cv_path_CYGWIN_LINK+:} false; then :
31534  $as_echo_n "(cached) " >&6
31535else
31536  case $CYGWIN_LINK in
31537  [\\/]* | ?:[\\/]*)
31538  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
31539  ;;
31540  *)
31541  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31542for as_dir in $PATH
31543do
31544  IFS=$as_save_IFS
31545  test -z "$as_dir" && as_dir=.
31546    for ac_exec_ext in '' $ac_executable_extensions; do
31547  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31548    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
31549    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31550    break 2
31551  fi
31552done
31553  done
31554IFS=$as_save_IFS
31555
31556  ;;
31557esac
31558fi
31559CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
31560if test -n "$CYGWIN_LINK"; then
31561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
31562$as_echo "$CYGWIN_LINK" >&6; }
31563else
31564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31565$as_echo "no" >&6; }
31566fi
31567
31568
31569  if test "x$CYGWIN_LINK" != x; then
31570    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
31571$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
31572    "$CYGWIN_LINK" --version > /dev/null
31573    if test $? -eq 0 ; then
31574      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31575$as_echo "yes" >&6; }
31576    else
31577      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31578$as_echo "no" >&6; }
31579      # This might be the VS linker. Don't exclude it later on.
31580      CYGWIN_LINK=""
31581    fi
31582  fi
31583
31584  # First-hand choice is to locate and run the vsvars bat file.
31585
31586
31587# Check whether --with-toolchain-version was given.
31588if test "${with_toolchain_version+set}" = set; then :
31589  withval=$with_toolchain_version;
31590fi
31591
31592
31593  if test "x$with_toolchain_version" = xlist; then
31594    # List all toolchains
31595    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
31596$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
31597    for version in $VALID_VS_VERSIONS; do
31598      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
31599      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
31600    done
31601
31602    exit 0
31603  elif test "x$DEVKIT_VS_VERSION" != x; then
31604    VS_VERSION=$DEVKIT_VS_VERSION
31605    TOOLCHAIN_VERSION=$VS_VERSION
31606    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
31607    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
31608    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
31609    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
31610    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31611    VS_PATH="$TOOLCHAIN_PATH:$PATH"
31612
31613    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
31614    # can still be exported as INCLUDE for compiler invocations without
31615    # SYSROOT_CFLAGS
31616    OLDIFS="$IFS"
31617    IFS=";"
31618    for i in $DEVKIT_VS_INCLUDE; do
31619      ipath=$i
31620
31621  unix_path="$ipath"
31622  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31623    windows_path=`$CYGPATH -m "$unix_path"`
31624    ipath="$windows_path"
31625  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31626    windows_path=`cmd //c echo $unix_path`
31627    ipath="$windows_path"
31628  fi
31629
31630      VS_INCLUDE="$VS_INCLUDE;$ipath"
31631    done
31632    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
31633    # as LIB for compiler invocations without SYSROOT_LDFLAGS
31634    for i in $DEVKIT_VS_LIB; do
31635      libpath=$i
31636
31637  unix_path="$libpath"
31638  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31639    windows_path=`$CYGPATH -m "$unix_path"`
31640    libpath="$windows_path"
31641  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31642    windows_path=`cmd //c echo $unix_path`
31643    libpath="$windows_path"
31644  fi
31645
31646      VS_LIB="$VS_LIB;$libpath"
31647    done
31648    IFS="$OLDIFS"
31649
31650    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
31651$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
31652
31653  elif test "x$with_toolchain_version" != x; then
31654    # User override; check that it is valid
31655    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
31656      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
31657$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
31658      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
31659$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
31660      as_fn_error $? "Cannot continue." "$LINENO" 5
31661    fi
31662    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
31663  else
31664    # No flag given, use default
31665    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
31666  fi
31667
31668  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
31669
31670  VS_VERSION="$VS_VERSION"
31671  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
31672  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
31673  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
31674  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
31675
31676  # When using --with-tools-dir, assume it points to the correct and default
31677  # version of Visual Studio or that --with-toolchain-version was also set.
31678  if test "x$with_tools_dir" != x; then
31679
31680  if test "x$VS_ENV_CMD" = x; then
31681    VS_VERSION="${VS_VERSION}"
31682    VS_BASE="$with_tools_dir/../.."
31683    METHOD="--with-tools-dir"
31684
31685    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31686      VCVARSFILE="vc/bin/vcvars32.bat"
31687    else
31688      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31689    fi
31690
31691
31692  windows_path="$VS_BASE"
31693  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31694    unix_path=`$CYGPATH -u "$windows_path"`
31695    VS_BASE="$unix_path"
31696  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31697    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31698    VS_BASE="$unix_path"
31699  fi
31700
31701    if test -d "$VS_BASE"; then
31702      if test -f "$VS_BASE/$VCVARSFILE"; then
31703        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31704$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31705        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31706        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31707        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31708        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31709      else
31710        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31711$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31712        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31713$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31714      fi
31715    fi
31716  fi
31717
31718
31719  if test "x$VS_ENV_CMD" = x; then
31720    VS_VERSION="${VS_VERSION}"
31721    VS_BASE="$with_tools_dir/../../.."
31722    METHOD="--with-tools-dir"
31723
31724    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31725      VCVARSFILE="vc/bin/vcvars32.bat"
31726    else
31727      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31728    fi
31729
31730
31731  windows_path="$VS_BASE"
31732  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31733    unix_path=`$CYGPATH -u "$windows_path"`
31734    VS_BASE="$unix_path"
31735  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31736    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31737    VS_BASE="$unix_path"
31738  fi
31739
31740    if test -d "$VS_BASE"; then
31741      if test -f "$VS_BASE/$VCVARSFILE"; then
31742        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31743$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31744        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31745        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31746        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31747        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31748      else
31749        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31750$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31751        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31752$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31753      fi
31754    fi
31755  fi
31756
31757    if test "x$VS_ENV_CMD" = x; then
31758      # Having specified an argument which is incorrect will produce an instant failure;
31759      # we should not go on looking
31760      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
31761$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
31762      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
31763$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
31764      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
31765$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
31766      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
31767    fi
31768  fi
31769
31770  VS_ENV_CMD=""
31771  VS_ENV_ARGS=""
31772
31773  if test "x$VS_COMNTOOLS" != x; then
31774
31775  if test "x$VS_ENV_CMD" = x; then
31776    VS_VERSION="${VS_VERSION}"
31777    VS_BASE="$VS_COMNTOOLS/../.."
31778    METHOD="$VS_COMNTOOLS_VAR variable"
31779
31780    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31781      VCVARSFILE="vc/bin/vcvars32.bat"
31782    else
31783      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31784    fi
31785
31786
31787  windows_path="$VS_BASE"
31788  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31789    unix_path=`$CYGPATH -u "$windows_path"`
31790    VS_BASE="$unix_path"
31791  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31792    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31793    VS_BASE="$unix_path"
31794  fi
31795
31796    if test -d "$VS_BASE"; then
31797      if test -f "$VS_BASE/$VCVARSFILE"; then
31798        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31799$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31800        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31801        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31802        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31803        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31804      else
31805        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31806$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31807        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31808$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31809      fi
31810    fi
31811  fi
31812
31813  fi
31814  if test "x$PROGRAMFILES" != x; then
31815
31816  if test "x$VS_ENV_CMD" = x; then
31817    VS_VERSION="${VS_VERSION}"
31818    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
31819    METHOD="well-known name"
31820
31821    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31822      VCVARSFILE="vc/bin/vcvars32.bat"
31823    else
31824      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31825    fi
31826
31827
31828  windows_path="$VS_BASE"
31829  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31830    unix_path=`$CYGPATH -u "$windows_path"`
31831    VS_BASE="$unix_path"
31832  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31833    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31834    VS_BASE="$unix_path"
31835  fi
31836
31837    if test -d "$VS_BASE"; then
31838      if test -f "$VS_BASE/$VCVARSFILE"; then
31839        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31840$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31841        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31842        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31843        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31844        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31845      else
31846        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31847$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31848        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31849$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31850      fi
31851    fi
31852  fi
31853
31854  fi
31855  # Work around the insanely named ProgramFiles(x86) env variable
31856  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
31857  if test "x$PROGRAMFILES_X86" != x; then
31858
31859  if test "x$VS_ENV_CMD" = x; then
31860    VS_VERSION="${VS_VERSION}"
31861    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
31862    METHOD="well-known name"
31863
31864    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31865      VCVARSFILE="vc/bin/vcvars32.bat"
31866    else
31867      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31868    fi
31869
31870
31871  windows_path="$VS_BASE"
31872  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31873    unix_path=`$CYGPATH -u "$windows_path"`
31874    VS_BASE="$unix_path"
31875  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31876    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31877    VS_BASE="$unix_path"
31878  fi
31879
31880    if test -d "$VS_BASE"; then
31881      if test -f "$VS_BASE/$VCVARSFILE"; then
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        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31885        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31886        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31887        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31888      else
31889        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31890$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31891        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31892$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31893      fi
31894    fi
31895  fi
31896
31897  fi
31898
31899  if test "x$VS_ENV_CMD" = x; then
31900    VS_VERSION="${VS_VERSION}"
31901    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
31902    METHOD="well-known name"
31903
31904    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31905      VCVARSFILE="vc/bin/vcvars32.bat"
31906    else
31907      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31908    fi
31909
31910
31911  windows_path="$VS_BASE"
31912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31913    unix_path=`$CYGPATH -u "$windows_path"`
31914    VS_BASE="$unix_path"
31915  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31916    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31917    VS_BASE="$unix_path"
31918  fi
31919
31920    if test -d "$VS_BASE"; then
31921      if test -f "$VS_BASE/$VCVARSFILE"; then
31922        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31923$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31924        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31925        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31926        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31927        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31928      else
31929        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31930$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31931        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31932$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31933      fi
31934    fi
31935  fi
31936
31937
31938  if test "x$VS_ENV_CMD" = x; then
31939    VS_VERSION="${VS_VERSION}"
31940    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
31941    METHOD="well-known name"
31942
31943    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31944      VCVARSFILE="vc/bin/vcvars32.bat"
31945    else
31946      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31947    fi
31948
31949
31950  windows_path="$VS_BASE"
31951  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31952    unix_path=`$CYGPATH -u "$windows_path"`
31953    VS_BASE="$unix_path"
31954  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31955    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31956    VS_BASE="$unix_path"
31957  fi
31958
31959    if test -d "$VS_BASE"; then
31960      if test -f "$VS_BASE/$VCVARSFILE"; then
31961        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31962$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31963        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31964        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31965        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31966        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31967      else
31968        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31969$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31970        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31971$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31972      fi
31973    fi
31974  fi
31975
31976
31977  if test "x$SDK_INSTALL_DIR" != x; then
31978    if test "x$ProgramW6432" != x; then
31979
31980  if test "x$VS_ENV_CMD" = x; then
31981    VS_VERSION="${VS_VERSION}"
31982    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
31983    METHOD="well-known name"
31984
31985  windows_path="$WIN_SDK_BASE"
31986  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31987    unix_path=`$CYGPATH -u "$windows_path"`
31988    WIN_SDK_BASE="$unix_path"
31989  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31990    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31991    WIN_SDK_BASE="$unix_path"
31992  fi
31993
31994    if test -d "$WIN_SDK_BASE"; then
31995      # There have been cases of partial or broken SDK installations. A missing
31996      # lib dir is not going to work.
31997      if test ! -d "$WIN_SDK_BASE/lib"; then
31998        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31999$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32000        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32001$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32002      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32003        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32004$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32005        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32006        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32007          VS_ENV_ARGS="/x86"
32008        else
32009          VS_ENV_ARGS="/x64"
32010        fi
32011        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32012        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32013        # TODO: improve detection for other versions of SDK
32014        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32015      else
32016        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32017$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32018        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32019$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32020      fi
32021    fi
32022  fi
32023
32024    fi
32025    if test "x$PROGRAMW6432" != x; then
32026
32027  if test "x$VS_ENV_CMD" = x; then
32028    VS_VERSION="${VS_VERSION}"
32029    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
32030    METHOD="well-known name"
32031
32032  windows_path="$WIN_SDK_BASE"
32033  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32034    unix_path=`$CYGPATH -u "$windows_path"`
32035    WIN_SDK_BASE="$unix_path"
32036  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32037    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32038    WIN_SDK_BASE="$unix_path"
32039  fi
32040
32041    if test -d "$WIN_SDK_BASE"; then
32042      # There have been cases of partial or broken SDK installations. A missing
32043      # lib dir is not going to work.
32044      if test ! -d "$WIN_SDK_BASE/lib"; then
32045        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32046$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32047        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32048$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32049      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32050        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32051$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32052        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32053        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32054          VS_ENV_ARGS="/x86"
32055        else
32056          VS_ENV_ARGS="/x64"
32057        fi
32058        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32059        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32060        # TODO: improve detection for other versions of SDK
32061        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32062      else
32063        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32064$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32065        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32066$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32067      fi
32068    fi
32069  fi
32070
32071    fi
32072    if test "x$PROGRAMFILES" != x; then
32073
32074  if test "x$VS_ENV_CMD" = x; then
32075    VS_VERSION="${VS_VERSION}"
32076    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
32077    METHOD="well-known name"
32078
32079  windows_path="$WIN_SDK_BASE"
32080  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32081    unix_path=`$CYGPATH -u "$windows_path"`
32082    WIN_SDK_BASE="$unix_path"
32083  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32084    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32085    WIN_SDK_BASE="$unix_path"
32086  fi
32087
32088    if test -d "$WIN_SDK_BASE"; then
32089      # There have been cases of partial or broken SDK installations. A missing
32090      # lib dir is not going to work.
32091      if test ! -d "$WIN_SDK_BASE/lib"; then
32092        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32093$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32094        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32095$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32096      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32097        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32098$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32099        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32100        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32101          VS_ENV_ARGS="/x86"
32102        else
32103          VS_ENV_ARGS="/x64"
32104        fi
32105        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32106        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32107        # TODO: improve detection for other versions of SDK
32108        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32109      else
32110        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32111$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32112        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32113$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32114      fi
32115    fi
32116  fi
32117
32118    fi
32119
32120  if test "x$VS_ENV_CMD" = x; then
32121    VS_VERSION="${VS_VERSION}"
32122    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
32123    METHOD="well-known name"
32124
32125  windows_path="$WIN_SDK_BASE"
32126  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32127    unix_path=`$CYGPATH -u "$windows_path"`
32128    WIN_SDK_BASE="$unix_path"
32129  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32130    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32131    WIN_SDK_BASE="$unix_path"
32132  fi
32133
32134    if test -d "$WIN_SDK_BASE"; then
32135      # There have been cases of partial or broken SDK installations. A missing
32136      # lib dir is not going to work.
32137      if test ! -d "$WIN_SDK_BASE/lib"; then
32138        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32139$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32140        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32141$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32142      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32143        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32144$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32145        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32146        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32147          VS_ENV_ARGS="/x86"
32148        else
32149          VS_ENV_ARGS="/x64"
32150        fi
32151        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32152        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32153        # TODO: improve detection for other versions of SDK
32154        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32155      else
32156        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32157$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32158        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32159$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32160      fi
32161    fi
32162  fi
32163
32164
32165  if test "x$VS_ENV_CMD" = x; then
32166    VS_VERSION="${VS_VERSION}"
32167    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
32168    METHOD="well-known name"
32169
32170  windows_path="$WIN_SDK_BASE"
32171  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32172    unix_path=`$CYGPATH -u "$windows_path"`
32173    WIN_SDK_BASE="$unix_path"
32174  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32175    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32176    WIN_SDK_BASE="$unix_path"
32177  fi
32178
32179    if test -d "$WIN_SDK_BASE"; then
32180      # There have been cases of partial or broken SDK installations. A missing
32181      # lib dir is not going to work.
32182      if test ! -d "$WIN_SDK_BASE/lib"; then
32183        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32184$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32185        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32186$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32187      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32188        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32189$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32190        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32191        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32192          VS_ENV_ARGS="/x86"
32193        else
32194          VS_ENV_ARGS="/x64"
32195        fi
32196        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32197        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32198        # TODO: improve detection for other versions of SDK
32199        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32200      else
32201        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32202$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32203        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32204$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32205      fi
32206    fi
32207  fi
32208
32209  fi
32210
32211    if test "x$VS_ENV_CMD" != x; then
32212      TOOLCHAIN_VERSION=$VS_VERSION
32213      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32214      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32215      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32216      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32217      # The rest of the variables are already evaled while probing
32218      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
32219$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
32220      break
32221    fi
32222  done
32223
32224
32225  # If we have a devkit, skip all of the below.
32226  if test "x$DEVKIT_VS_VERSION" = x; then
32227    if test "x$VS_ENV_CMD" != x; then
32228      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
32229
32230  # Only process if variable expands to non-empty
32231
32232  if test "x$VS_ENV_CMD" != x; then
32233    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32234
32235  # First separate the path from the arguments. This will split at the first
32236  # space.
32237  complete="$VS_ENV_CMD"
32238  path="${complete%% *}"
32239  tmp="$complete EOL"
32240  arguments="${tmp#* }"
32241
32242  # Input might be given as Windows format, start by converting to
32243  # unix format.
32244  new_path=`$CYGPATH -u "$path"`
32245
32246  # Now try to locate executable using which
32247  new_path=`$WHICH "$new_path" 2> /dev/null`
32248  # bat and cmd files are not always considered executable in cygwin causing which
32249  # to not find them
32250  if test "x$new_path" = x \
32251      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32252      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32253    new_path=`$CYGPATH -u "$path"`
32254  fi
32255  if test "x$new_path" = x; then
32256    # Oops. Which didn't find the executable.
32257    # The splitting of arguments from the executable at a space might have been incorrect,
32258    # since paths with space are more likely in Windows. Give it another try with the whole
32259    # argument.
32260    path="$complete"
32261    arguments="EOL"
32262    new_path=`$CYGPATH -u "$path"`
32263    new_path=`$WHICH "$new_path" 2> /dev/null`
32264    # bat and cmd files are not always considered executable in cygwin causing which
32265    # to not find them
32266    if test "x$new_path" = x \
32267        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32268        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32269      new_path=`$CYGPATH -u "$path"`
32270    fi
32271    if test "x$new_path" = x; then
32272      # It's still not found. Now this is an unrecoverable error.
32273      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32274$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32275      has_space=`$ECHO "$complete" | $GREP " "`
32276      if test "x$has_space" != x; then
32277        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32278$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32279      fi
32280      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32281    fi
32282  fi
32283
32284  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32285  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32286  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32287  # "foo.exe" is OK but "foo" is an error.
32288  #
32289  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32290  # It is also a way to make sure we got the proper file name for the real test later on.
32291  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32292  if test "x$test_shortpath" = x; then
32293    # Short path failed, file does not exist as specified.
32294    # Try adding .exe or .cmd
32295    if test -f "${new_path}.exe"; then
32296      input_to_shortpath="${new_path}.exe"
32297    elif test -f "${new_path}.cmd"; then
32298      input_to_shortpath="${new_path}.cmd"
32299    else
32300      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
32301$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
32302      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32303$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32304      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32305    fi
32306  else
32307    input_to_shortpath="$new_path"
32308  fi
32309
32310  # Call helper function which possibly converts this using DOS-style short mode.
32311  # If so, the updated path is stored in $new_path.
32312  new_path="$input_to_shortpath"
32313
32314  input_path="$input_to_shortpath"
32315  # Check if we need to convert this using DOS-style short mode. If the path
32316  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32317  # take no chances and rewrite it.
32318  # Note: m4 eats our [], so we need to use [ and ] instead.
32319  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32320  if test "x$has_forbidden_chars" != x; then
32321    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32322    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32323    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32324    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32325      # Going to short mode and back again did indeed matter. Since short mode is
32326      # case insensitive, let's make it lowercase to improve readability.
32327      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32328      # Now convert it back to Unix-style (cygpath)
32329      input_path=`$CYGPATH -u "$shortmode_path"`
32330      new_path="$input_path"
32331    fi
32332  fi
32333
32334  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32335  if test "x$test_cygdrive_prefix" = x; then
32336    # As a simple fix, exclude /usr/bin since it's not a real path.
32337    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32338      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32339      # a path prefixed by /cygdrive for fixpath to work.
32340      new_path="$CYGWIN_ROOT_PATH$input_path"
32341    fi
32342  fi
32343
32344  # remove trailing .exe if any
32345  new_path="${new_path/%.exe/}"
32346
32347    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32348
32349  # First separate the path from the arguments. This will split at the first
32350  # space.
32351  complete="$VS_ENV_CMD"
32352  path="${complete%% *}"
32353  tmp="$complete EOL"
32354  arguments="${tmp#* }"
32355
32356  # Input might be given as Windows format, start by converting to
32357  # unix format.
32358  new_path="$path"
32359
32360  windows_path="$new_path"
32361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32362    unix_path=`$CYGPATH -u "$windows_path"`
32363    new_path="$unix_path"
32364  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32365    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32366    new_path="$unix_path"
32367  fi
32368
32369
32370  # Now try to locate executable using which
32371  new_path=`$WHICH "$new_path" 2> /dev/null`
32372
32373  if test "x$new_path" = x; then
32374    # Oops. Which didn't find the executable.
32375    # The splitting of arguments from the executable at a space might have been incorrect,
32376    # since paths with space are more likely in Windows. Give it another try with the whole
32377    # argument.
32378    path="$complete"
32379    arguments="EOL"
32380    new_path="$path"
32381
32382  windows_path="$new_path"
32383  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32384    unix_path=`$CYGPATH -u "$windows_path"`
32385    new_path="$unix_path"
32386  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32387    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32388    new_path="$unix_path"
32389  fi
32390
32391
32392    new_path=`$WHICH "$new_path" 2> /dev/null`
32393    # bat and cmd files are not always considered executable in MSYS causing which
32394    # to not find them
32395    if test "x$new_path" = x \
32396        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32397        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32398      new_path="$path"
32399
32400  windows_path="$new_path"
32401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32402    unix_path=`$CYGPATH -u "$windows_path"`
32403    new_path="$unix_path"
32404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32405    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32406    new_path="$unix_path"
32407  fi
32408
32409    fi
32410
32411    if test "x$new_path" = x; then
32412      # It's still not found. Now this is an unrecoverable error.
32413      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32414$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32415      has_space=`$ECHO "$complete" | $GREP " "`
32416      if test "x$has_space" != x; then
32417        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32418$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32419      fi
32420      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32421    fi
32422  fi
32423
32424  # Now new_path has a complete unix path to the binary
32425  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32426    # Keep paths in /bin as-is, but remove trailing .exe if any
32427    new_path="${new_path/%.exe/}"
32428    # Do not save /bin paths to all_fixpath_prefixes!
32429  else
32430    # Not in mixed or Windows style, start by that.
32431    new_path=`cmd //c echo $new_path`
32432
32433  input_path="$new_path"
32434  # Check if we need to convert this using DOS-style short mode. If the path
32435  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32436  # take no chances and rewrite it.
32437  # Note: m4 eats our [], so we need to use [ and ] instead.
32438  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32439  if test "x$has_forbidden_chars" != x; then
32440    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32441    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32442  fi
32443
32444    # Output is in $new_path
32445
32446  windows_path="$new_path"
32447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32448    unix_path=`$CYGPATH -u "$windows_path"`
32449    new_path="$unix_path"
32450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32451    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32452    new_path="$unix_path"
32453  fi
32454
32455    # remove trailing .exe if any
32456    new_path="${new_path/%.exe/}"
32457
32458    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32459    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32460  fi
32461
32462    else
32463      # We're on a unix platform. Hooray! :)
32464      # First separate the path from the arguments. This will split at the first
32465      # space.
32466      complete="$VS_ENV_CMD"
32467      path="${complete%% *}"
32468      tmp="$complete EOL"
32469      arguments="${tmp#* }"
32470
32471      # Cannot rely on the command "which" here since it doesn't always work.
32472      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32473      if test -z "$is_absolute_path"; then
32474        # Path to executable is not absolute. Find it.
32475        IFS_save="$IFS"
32476        IFS=:
32477        for p in $PATH; do
32478          if test -f "$p/$path" && test -x "$p/$path"; then
32479            new_path="$p/$path"
32480            break
32481          fi
32482        done
32483        IFS="$IFS_save"
32484      else
32485        # This is an absolute path, we can use it without further modifications.
32486        new_path="$path"
32487      fi
32488
32489      if test "x$new_path" = x; then
32490        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32491$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32492        has_space=`$ECHO "$complete" | $GREP " "`
32493        if test "x$has_space" != x; then
32494          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32495$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32496        fi
32497        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32498      fi
32499    fi
32500
32501    # Now join together the path and the arguments once again
32502    if test "x$arguments" != xEOL; then
32503      new_complete="$new_path ${arguments% *}"
32504    else
32505      new_complete="$new_path"
32506    fi
32507
32508    if test "x$complete" != "x$new_complete"; then
32509      VS_ENV_CMD="$new_complete"
32510      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
32511$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
32512    fi
32513  fi
32514
32515
32516      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
32517      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
32518$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
32519
32520      # We need to create a couple of temporary files.
32521      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
32522      $MKDIR -p $VS_ENV_TMP_DIR
32523
32524      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
32525      # Instead create a shell script which will set the relevant variables when run.
32526      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
32527
32528  unix_path="$WINPATH_VS_ENV_CMD"
32529  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32530    windows_path=`$CYGPATH -m "$unix_path"`
32531    WINPATH_VS_ENV_CMD="$windows_path"
32532  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32533    windows_path=`cmd //c echo $unix_path`
32534    WINPATH_VS_ENV_CMD="$windows_path"
32535  fi
32536
32537      WINPATH_BASH="$BASH"
32538
32539  unix_path="$WINPATH_BASH"
32540  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32541    windows_path=`$CYGPATH -m "$unix_path"`
32542    WINPATH_BASH="$windows_path"
32543  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32544    windows_path=`cmd //c echo $unix_path`
32545    WINPATH_BASH="$windows_path"
32546  fi
32547
32548
32549      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
32550      # script (executable by bash) that will setup the important variables.
32551      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
32552      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
32553      # This will end up something like:
32554      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
32555      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
32556      # These will end up something like:
32557      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
32558      # The trailing space for everyone except PATH is no typo, but is needed due
32559      # to trailing \ in the Windows paths. These will be stripped later.
32560      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
32561          >> $EXTRACT_VC_ENV_BAT_FILE
32562      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
32563          >> $EXTRACT_VC_ENV_BAT_FILE
32564      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
32565          >> $EXTRACT_VC_ENV_BAT_FILE
32566      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
32567          >> $EXTRACT_VC_ENV_BAT_FILE
32568      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
32569          >> $EXTRACT_VC_ENV_BAT_FILE
32570      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
32571          >> $EXTRACT_VC_ENV_BAT_FILE
32572
32573      # Now execute the newly created bat file.
32574      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
32575      # Change directory so we don't need to mess with Windows paths in redirects.
32576      cd $VS_ENV_TMP_DIR
32577      cmd /c extract-vs-env.bat | $CAT
32578      cd $CURDIR
32579
32580      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
32581        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
32582$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
32583        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32584$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32585        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32586$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32587        as_fn_error $? "Cannot continue" "$LINENO" 5
32588      fi
32589
32590      # Now set all paths and other env variables. This will allow the rest of
32591      # the configure script to find and run the compiler in the proper way.
32592      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
32593$as_echo "$as_me: Setting extracted environment variables" >&6;}
32594      . $VS_ENV_TMP_DIR/set-vs-env.sh
32595      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
32596      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
32597    else
32598      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
32599      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
32600$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
32601    fi
32602  fi
32603
32604  # At this point, we should have correct variables in the environment, or we can't continue.
32605  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
32606$as_echo_n "checking for Visual Studio variables... " >&6; }
32607
32608  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
32609      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
32610    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
32611      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
32612$as_echo "present but broken" >&6; }
32613      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
32614    else
32615      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
32616$as_echo "ok" >&6; }
32617      # Remove any trailing "\" ";" and " " from the variables.
32618      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
32619      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
32620      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
32621      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
32622      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
32623      # Remove any paths containing # (typically F#) as that messes up make. This
32624      # is needed if visual studio was installed with F# support.
32625      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
32626
32627
32628
32629
32630
32631      # Convert VS_INCLUDE into SYSROOT_CFLAGS
32632      OLDIFS="$IFS"
32633      IFS=";"
32634      for i in $VS_INCLUDE; do
32635        ipath=$i
32636        # Only process non-empty elements
32637        if test "x$ipath" != x; then
32638          IFS="$OLDIFS"
32639          # Check that directory exists before calling fixup_path
32640          testpath=$ipath
32641
32642  windows_path="$testpath"
32643  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32644    unix_path=`$CYGPATH -u "$windows_path"`
32645    testpath="$unix_path"
32646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32647    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32648    testpath="$unix_path"
32649  fi
32650
32651          if test -d "$testpath"; then
32652
32653  # Only process if variable expands to non-empty
32654
32655  if test "x$ipath" != x; then
32656    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32657
32658  # Input might be given as Windows format, start by converting to
32659  # unix format.
32660  path="$ipath"
32661  new_path=`$CYGPATH -u "$path"`
32662
32663  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32664  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32665  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32666  # "foo.exe" is OK but "foo" is an error.
32667  #
32668  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32669  # It is also a way to make sure we got the proper file name for the real test later on.
32670  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32671  if test "x$test_shortpath" = x; then
32672    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32673$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32674    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
32675  fi
32676
32677  # Call helper function which possibly converts this using DOS-style short mode.
32678  # If so, the updated path is stored in $new_path.
32679
32680  input_path="$new_path"
32681  # Check if we need to convert this using DOS-style short mode. If the path
32682  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32683  # take no chances and rewrite it.
32684  # Note: m4 eats our [], so we need to use [ and ] instead.
32685  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32686  if test "x$has_forbidden_chars" != x; then
32687    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32688    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32689    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32690    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32691      # Going to short mode and back again did indeed matter. Since short mode is
32692      # case insensitive, let's make it lowercase to improve readability.
32693      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32694      # Now convert it back to Unix-style (cygpath)
32695      input_path=`$CYGPATH -u "$shortmode_path"`
32696      new_path="$input_path"
32697    fi
32698  fi
32699
32700  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32701  if test "x$test_cygdrive_prefix" = x; then
32702    # As a simple fix, exclude /usr/bin since it's not a real path.
32703    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32704      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32705      # a path prefixed by /cygdrive for fixpath to work.
32706      new_path="$CYGWIN_ROOT_PATH$input_path"
32707    fi
32708  fi
32709
32710
32711  if test "x$path" != "x$new_path"; then
32712    ipath="$new_path"
32713    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32714$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32715  fi
32716
32717    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32718
32719  path="$ipath"
32720  has_colon=`$ECHO $path | $GREP ^.:`
32721  new_path="$path"
32722  if test "x$has_colon" = x; then
32723    # Not in mixed or Windows style, start by that.
32724    new_path=`cmd //c echo $path`
32725  fi
32726
32727
32728  input_path="$new_path"
32729  # Check if we need to convert this using DOS-style short mode. If the path
32730  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32731  # take no chances and rewrite it.
32732  # Note: m4 eats our [], so we need to use [ and ] instead.
32733  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32734  if test "x$has_forbidden_chars" != x; then
32735    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32736    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32737  fi
32738
32739
32740  windows_path="$new_path"
32741  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32742    unix_path=`$CYGPATH -u "$windows_path"`
32743    new_path="$unix_path"
32744  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32745    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32746    new_path="$unix_path"
32747  fi
32748
32749  if test "x$path" != "x$new_path"; then
32750    ipath="$new_path"
32751    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32752$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32753  fi
32754
32755  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32756  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32757
32758    else
32759      # We're on a unix platform. Hooray! :)
32760      path="$ipath"
32761      has_space=`$ECHO "$path" | $GREP " "`
32762      if test "x$has_space" != x; then
32763        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32764$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32765        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32766      fi
32767
32768      # Use eval to expand a potential ~
32769      eval path="$path"
32770      if test ! -f "$path" && test ! -d "$path"; then
32771        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
32772      fi
32773
32774      if test -d "$path"; then
32775        ipath="`cd "$path"; $THEPWDCMD -L`"
32776      else
32777        dir="`$DIRNAME "$path"`"
32778        base="`$BASENAME "$path"`"
32779        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
32780      fi
32781    fi
32782  fi
32783
32784            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
32785          fi
32786          IFS=";"
32787        fi
32788      done
32789      # Convert VS_LIB into SYSROOT_LDFLAGS
32790      for i in $VS_LIB; do
32791        libpath=$i
32792        # Only process non-empty elements
32793        if test "x$libpath" != x; then
32794          IFS="$OLDIFS"
32795          # Check that directory exists before calling fixup_path
32796          testpath=$libpath
32797
32798  windows_path="$testpath"
32799  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32800    unix_path=`$CYGPATH -u "$windows_path"`
32801    testpath="$unix_path"
32802  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32803    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32804    testpath="$unix_path"
32805  fi
32806
32807          if test -d "$testpath"; then
32808
32809  # Only process if variable expands to non-empty
32810
32811  if test "x$libpath" != x; then
32812    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32813
32814  # Input might be given as Windows format, start by converting to
32815  # unix format.
32816  path="$libpath"
32817  new_path=`$CYGPATH -u "$path"`
32818
32819  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32820  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32821  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32822  # "foo.exe" is OK but "foo" is an error.
32823  #
32824  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32825  # It is also a way to make sure we got the proper file name for the real test later on.
32826  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32827  if test "x$test_shortpath" = x; then
32828    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32829$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32830    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
32831  fi
32832
32833  # Call helper function which possibly converts this using DOS-style short mode.
32834  # If so, the updated path is stored in $new_path.
32835
32836  input_path="$new_path"
32837  # Check if we need to convert this using DOS-style short mode. If the path
32838  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32839  # take no chances and rewrite it.
32840  # Note: m4 eats our [], so we need to use [ and ] instead.
32841  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32842  if test "x$has_forbidden_chars" != x; then
32843    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32844    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32845    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32846    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32847      # Going to short mode and back again did indeed matter. Since short mode is
32848      # case insensitive, let's make it lowercase to improve readability.
32849      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32850      # Now convert it back to Unix-style (cygpath)
32851      input_path=`$CYGPATH -u "$shortmode_path"`
32852      new_path="$input_path"
32853    fi
32854  fi
32855
32856  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32857  if test "x$test_cygdrive_prefix" = x; then
32858    # As a simple fix, exclude /usr/bin since it's not a real path.
32859    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32860      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32861      # a path prefixed by /cygdrive for fixpath to work.
32862      new_path="$CYGWIN_ROOT_PATH$input_path"
32863    fi
32864  fi
32865
32866
32867  if test "x$path" != "x$new_path"; then
32868    libpath="$new_path"
32869    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32870$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32871  fi
32872
32873    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32874
32875  path="$libpath"
32876  has_colon=`$ECHO $path | $GREP ^.:`
32877  new_path="$path"
32878  if test "x$has_colon" = x; then
32879    # Not in mixed or Windows style, start by that.
32880    new_path=`cmd //c echo $path`
32881  fi
32882
32883
32884  input_path="$new_path"
32885  # Check if we need to convert this using DOS-style short mode. If the path
32886  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32887  # take no chances and rewrite it.
32888  # Note: m4 eats our [], so we need to use [ and ] instead.
32889  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32890  if test "x$has_forbidden_chars" != x; then
32891    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32892    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32893  fi
32894
32895
32896  windows_path="$new_path"
32897  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32898    unix_path=`$CYGPATH -u "$windows_path"`
32899    new_path="$unix_path"
32900  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32901    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32902    new_path="$unix_path"
32903  fi
32904
32905  if test "x$path" != "x$new_path"; then
32906    libpath="$new_path"
32907    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32908$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32909  fi
32910
32911  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32912  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32913
32914    else
32915      # We're on a unix platform. Hooray! :)
32916      path="$libpath"
32917      has_space=`$ECHO "$path" | $GREP " "`
32918      if test "x$has_space" != x; then
32919        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32920$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32921        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32922      fi
32923
32924      # Use eval to expand a potential ~
32925      eval path="$path"
32926      if test ! -f "$path" && test ! -d "$path"; then
32927        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
32928      fi
32929
32930      if test -d "$path"; then
32931        libpath="`cd "$path"; $THEPWDCMD -L`"
32932      else
32933        dir="`$DIRNAME "$path"`"
32934        base="`$BASENAME "$path"`"
32935        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
32936      fi
32937    fi
32938  fi
32939
32940            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
32941          fi
32942          IFS=";"
32943        fi
32944      done
32945      IFS="$OLDIFS"
32946    fi
32947  else
32948    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32949$as_echo "not found" >&6; }
32950
32951    if test "x$VS_ENV_CMD" = x; then
32952      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
32953$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
32954      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
32955$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
32956    else
32957      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
32958$as_echo "$as_me: Running the extraction script failed." >&6;}
32959    fi
32960    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32961$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32962    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32963$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32964    as_fn_error $? "Cannot continue" "$LINENO" 5
32965  fi
32966
32967    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
32968    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
32969    PATH="$VS_PATH"
32970    # The microsoft toolchain also requires INCLUDE and LIB to be set.
32971    export INCLUDE="$VS_INCLUDE"
32972    export LIB="$VS_LIB"
32973  else
32974    if test "x$XCODE_VERSION_OUTPUT" != x; then
32975      # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
32976      TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
32977      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
32978    else
32979      # Currently we do not define this for other toolchains. This might change as the need arise.
32980      TOOLCHAIN_VERSION=
32981    fi
32982  fi
32983
32984
32985  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
32986  # override all other locations.
32987  if test "x$TOOLCHAIN_PATH" != x; then
32988    PATH=$TOOLCHAIN_PATH:$PATH
32989  fi
32990
32991
32992  #
32993  # Setup the compilers (CC and CXX)
32994  #
32995
32996  COMPILER_NAME=C
32997  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
32998
32999  if test "x$CC" != x; then
33000    # User has supplied compiler name already, always let that override.
33001    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
33002$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
33003    if test "x`basename $CC`" = "x$CC"; then
33004      # A command without a complete path is provided, search $PATH.
33005
33006      for ac_prog in $CC
33007do
33008  # Extract the first word of "$ac_prog", so it can be a program name with args.
33009set dummy $ac_prog; ac_word=$2
33010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33011$as_echo_n "checking for $ac_word... " >&6; }
33012if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33013  $as_echo_n "(cached) " >&6
33014else
33015  case $POTENTIAL_CC in
33016  [\\/]* | ?:[\\/]*)
33017  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33018  ;;
33019  *)
33020  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33021for as_dir in $PATH
33022do
33023  IFS=$as_save_IFS
33024  test -z "$as_dir" && as_dir=.
33025    for ac_exec_ext in '' $ac_executable_extensions; do
33026  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33027    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33028    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33029    break 2
33030  fi
33031done
33032  done
33033IFS=$as_save_IFS
33034
33035  ;;
33036esac
33037fi
33038POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33039if test -n "$POTENTIAL_CC"; then
33040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33041$as_echo "$POTENTIAL_CC" >&6; }
33042else
33043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33044$as_echo "no" >&6; }
33045fi
33046
33047
33048  test -n "$POTENTIAL_CC" && break
33049done
33050
33051      if test "x$POTENTIAL_CC" != x; then
33052        CC=$POTENTIAL_CC
33053      else
33054        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
33055      fi
33056    else
33057      # Otherwise it might already be a complete path
33058      if test ! -x "$CC"; then
33059        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
33060      fi
33061    fi
33062  else
33063    # No user supplied value. Locate compiler ourselves.
33064
33065    # If we are cross compiling, assume cross compilation tools follows the
33066    # cross compilation standard where they are prefixed with the autoconf
33067    # standard name for the target. For example the binary
33068    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33069    # If we are not cross compiling, then the default compiler name will be
33070    # used.
33071
33072    CC=
33073    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33074    # before checking the rest of the PATH.
33075    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33076    # step, this should not be necessary.
33077    if test -n "$TOOLCHAIN_PATH"; then
33078      PATH_save="$PATH"
33079      PATH="$TOOLCHAIN_PATH"
33080      for ac_prog in $SEARCH_LIST
33081do
33082  # Extract the first word of "$ac_prog", so it can be a program name with args.
33083set dummy $ac_prog; ac_word=$2
33084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33085$as_echo_n "checking for $ac_word... " >&6; }
33086if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
33087  $as_echo_n "(cached) " >&6
33088else
33089  case $TOOLCHAIN_PATH_CC in
33090  [\\/]* | ?:[\\/]*)
33091  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33092  ;;
33093  *)
33094  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33095for as_dir in $PATH
33096do
33097  IFS=$as_save_IFS
33098  test -z "$as_dir" && as_dir=.
33099    for ac_exec_ext in '' $ac_executable_extensions; do
33100  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33101    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33102    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33103    break 2
33104  fi
33105done
33106  done
33107IFS=$as_save_IFS
33108
33109  ;;
33110esac
33111fi
33112TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
33113if test -n "$TOOLCHAIN_PATH_CC"; then
33114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
33115$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
33116else
33117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33118$as_echo "no" >&6; }
33119fi
33120
33121
33122  test -n "$TOOLCHAIN_PATH_CC" && break
33123done
33124
33125      CC=$TOOLCHAIN_PATH_CC
33126      PATH="$PATH_save"
33127    fi
33128
33129    # AC_PATH_PROGS can't be run multiple times with the same variable,
33130    # so create a new name for this run.
33131    if test "x$CC" = x; then
33132      for ac_prog in $SEARCH_LIST
33133do
33134  # Extract the first word of "$ac_prog", so it can be a program name with args.
33135set dummy $ac_prog; ac_word=$2
33136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33137$as_echo_n "checking for $ac_word... " >&6; }
33138if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33139  $as_echo_n "(cached) " >&6
33140else
33141  case $POTENTIAL_CC in
33142  [\\/]* | ?:[\\/]*)
33143  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33144  ;;
33145  *)
33146  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33147for as_dir in $PATH
33148do
33149  IFS=$as_save_IFS
33150  test -z "$as_dir" && as_dir=.
33151    for ac_exec_ext in '' $ac_executable_extensions; do
33152  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33153    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33154    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33155    break 2
33156  fi
33157done
33158  done
33159IFS=$as_save_IFS
33160
33161  ;;
33162esac
33163fi
33164POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33165if test -n "$POTENTIAL_CC"; then
33166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33167$as_echo "$POTENTIAL_CC" >&6; }
33168else
33169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33170$as_echo "no" >&6; }
33171fi
33172
33173
33174  test -n "$POTENTIAL_CC" && break
33175done
33176
33177      CC=$POTENTIAL_CC
33178    fi
33179
33180    if test "x$CC" = x; then
33181
33182  # Print a helpful message on how to acquire the necessary build dependency.
33183  # devkit is the help tag: freetype, cups, alsa etc
33184  MISSING_DEPENDENCY=devkit
33185
33186  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33187    cygwin_help $MISSING_DEPENDENCY
33188  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33189    msys_help $MISSING_DEPENDENCY
33190  else
33191    PKGHANDLER_COMMAND=
33192
33193    case $PKGHANDLER in
33194      apt-get)
33195        apt_help     $MISSING_DEPENDENCY ;;
33196      yum)
33197        yum_help     $MISSING_DEPENDENCY ;;
33198      port)
33199        port_help    $MISSING_DEPENDENCY ;;
33200      pkgutil)
33201        pkgutil_help $MISSING_DEPENDENCY ;;
33202      pkgadd)
33203        pkgadd_help  $MISSING_DEPENDENCY ;;
33204    esac
33205
33206    if test "x$PKGHANDLER_COMMAND" != x; then
33207      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33208    fi
33209  fi
33210
33211      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33212    fi
33213  fi
33214
33215  # Now we have a compiler binary in CC. Make sure it's okay.
33216
33217  # Only process if variable expands to non-empty
33218
33219  if test "x$CC" != x; then
33220    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33221
33222  # First separate the path from the arguments. This will split at the first
33223  # space.
33224  complete="$CC"
33225  path="${complete%% *}"
33226  tmp="$complete EOL"
33227  arguments="${tmp#* }"
33228
33229  # Input might be given as Windows format, start by converting to
33230  # unix format.
33231  new_path=`$CYGPATH -u "$path"`
33232
33233  # Now try to locate executable using which
33234  new_path=`$WHICH "$new_path" 2> /dev/null`
33235  # bat and cmd files are not always considered executable in cygwin causing which
33236  # to not find them
33237  if test "x$new_path" = x \
33238      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33239      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33240    new_path=`$CYGPATH -u "$path"`
33241  fi
33242  if test "x$new_path" = x; then
33243    # Oops. Which didn't find the executable.
33244    # The splitting of arguments from the executable at a space might have been incorrect,
33245    # since paths with space are more likely in Windows. Give it another try with the whole
33246    # argument.
33247    path="$complete"
33248    arguments="EOL"
33249    new_path=`$CYGPATH -u "$path"`
33250    new_path=`$WHICH "$new_path" 2> /dev/null`
33251    # bat and cmd files are not always considered executable in cygwin causing which
33252    # to not find them
33253    if test "x$new_path" = x \
33254        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33255        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33256      new_path=`$CYGPATH -u "$path"`
33257    fi
33258    if test "x$new_path" = x; then
33259      # It's still not found. Now this is an unrecoverable error.
33260      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33261$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33262      has_space=`$ECHO "$complete" | $GREP " "`
33263      if test "x$has_space" != x; then
33264        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33265$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33266      fi
33267      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33268    fi
33269  fi
33270
33271  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33272  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33273  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33274  # "foo.exe" is OK but "foo" is an error.
33275  #
33276  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33277  # It is also a way to make sure we got the proper file name for the real test later on.
33278  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33279  if test "x$test_shortpath" = x; then
33280    # Short path failed, file does not exist as specified.
33281    # Try adding .exe or .cmd
33282    if test -f "${new_path}.exe"; then
33283      input_to_shortpath="${new_path}.exe"
33284    elif test -f "${new_path}.cmd"; then
33285      input_to_shortpath="${new_path}.cmd"
33286    else
33287      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
33288$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
33289      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33290$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33291      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33292    fi
33293  else
33294    input_to_shortpath="$new_path"
33295  fi
33296
33297  # Call helper function which possibly converts this using DOS-style short mode.
33298  # If so, the updated path is stored in $new_path.
33299  new_path="$input_to_shortpath"
33300
33301  input_path="$input_to_shortpath"
33302  # Check if we need to convert this using DOS-style short mode. If the path
33303  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33304  # take no chances and rewrite it.
33305  # Note: m4 eats our [], so we need to use [ and ] instead.
33306  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33307  if test "x$has_forbidden_chars" != x; then
33308    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33309    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33310    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33311    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33312      # Going to short mode and back again did indeed matter. Since short mode is
33313      # case insensitive, let's make it lowercase to improve readability.
33314      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33315      # Now convert it back to Unix-style (cygpath)
33316      input_path=`$CYGPATH -u "$shortmode_path"`
33317      new_path="$input_path"
33318    fi
33319  fi
33320
33321  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33322  if test "x$test_cygdrive_prefix" = x; then
33323    # As a simple fix, exclude /usr/bin since it's not a real path.
33324    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33325      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33326      # a path prefixed by /cygdrive for fixpath to work.
33327      new_path="$CYGWIN_ROOT_PATH$input_path"
33328    fi
33329  fi
33330
33331  # remove trailing .exe if any
33332  new_path="${new_path/%.exe/}"
33333
33334    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33335
33336  # First separate the path from the arguments. This will split at the first
33337  # space.
33338  complete="$CC"
33339  path="${complete%% *}"
33340  tmp="$complete EOL"
33341  arguments="${tmp#* }"
33342
33343  # Input might be given as Windows format, start by converting to
33344  # unix format.
33345  new_path="$path"
33346
33347  windows_path="$new_path"
33348  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33349    unix_path=`$CYGPATH -u "$windows_path"`
33350    new_path="$unix_path"
33351  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33352    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33353    new_path="$unix_path"
33354  fi
33355
33356
33357  # Now try to locate executable using which
33358  new_path=`$WHICH "$new_path" 2> /dev/null`
33359
33360  if test "x$new_path" = x; then
33361    # Oops. Which didn't find the executable.
33362    # The splitting of arguments from the executable at a space might have been incorrect,
33363    # since paths with space are more likely in Windows. Give it another try with the whole
33364    # argument.
33365    path="$complete"
33366    arguments="EOL"
33367    new_path="$path"
33368
33369  windows_path="$new_path"
33370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33371    unix_path=`$CYGPATH -u "$windows_path"`
33372    new_path="$unix_path"
33373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33374    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33375    new_path="$unix_path"
33376  fi
33377
33378
33379    new_path=`$WHICH "$new_path" 2> /dev/null`
33380    # bat and cmd files are not always considered executable in MSYS causing which
33381    # to not find them
33382    if test "x$new_path" = x \
33383        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33384        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33385      new_path="$path"
33386
33387  windows_path="$new_path"
33388  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33389    unix_path=`$CYGPATH -u "$windows_path"`
33390    new_path="$unix_path"
33391  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33392    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33393    new_path="$unix_path"
33394  fi
33395
33396    fi
33397
33398    if test "x$new_path" = x; then
33399      # It's still not found. Now this is an unrecoverable error.
33400      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33401$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33402      has_space=`$ECHO "$complete" | $GREP " "`
33403      if test "x$has_space" != x; then
33404        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33405$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33406      fi
33407      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33408    fi
33409  fi
33410
33411  # Now new_path has a complete unix path to the binary
33412  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33413    # Keep paths in /bin as-is, but remove trailing .exe if any
33414    new_path="${new_path/%.exe/}"
33415    # Do not save /bin paths to all_fixpath_prefixes!
33416  else
33417    # Not in mixed or Windows style, start by that.
33418    new_path=`cmd //c echo $new_path`
33419
33420  input_path="$new_path"
33421  # Check if we need to convert this using DOS-style short mode. If the path
33422  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33423  # take no chances and rewrite it.
33424  # Note: m4 eats our [], so we need to use [ and ] instead.
33425  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33426  if test "x$has_forbidden_chars" != x; then
33427    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33428    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33429  fi
33430
33431    # Output is in $new_path
33432
33433  windows_path="$new_path"
33434  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33435    unix_path=`$CYGPATH -u "$windows_path"`
33436    new_path="$unix_path"
33437  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33438    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33439    new_path="$unix_path"
33440  fi
33441
33442    # remove trailing .exe if any
33443    new_path="${new_path/%.exe/}"
33444
33445    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33446    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33447  fi
33448
33449    else
33450      # We're on a unix platform. Hooray! :)
33451      # First separate the path from the arguments. This will split at the first
33452      # space.
33453      complete="$CC"
33454      path="${complete%% *}"
33455      tmp="$complete EOL"
33456      arguments="${tmp#* }"
33457
33458      # Cannot rely on the command "which" here since it doesn't always work.
33459      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33460      if test -z "$is_absolute_path"; then
33461        # Path to executable is not absolute. Find it.
33462        IFS_save="$IFS"
33463        IFS=:
33464        for p in $PATH; do
33465          if test -f "$p/$path" && test -x "$p/$path"; then
33466            new_path="$p/$path"
33467            break
33468          fi
33469        done
33470        IFS="$IFS_save"
33471      else
33472        # This is an absolute path, we can use it without further modifications.
33473        new_path="$path"
33474      fi
33475
33476      if test "x$new_path" = x; then
33477        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33478$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33479        has_space=`$ECHO "$complete" | $GREP " "`
33480        if test "x$has_space" != x; then
33481          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33482$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33483        fi
33484        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33485      fi
33486    fi
33487
33488    # Now join together the path and the arguments once again
33489    if test "x$arguments" != xEOL; then
33490      new_complete="$new_path ${arguments% *}"
33491    else
33492      new_complete="$new_path"
33493    fi
33494
33495    if test "x$complete" != "x$new_complete"; then
33496      CC="$new_complete"
33497      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
33498$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
33499    fi
33500  fi
33501
33502  TEST_COMPILER="$CC"
33503
33504  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
33505$as_echo_n "checking resolved symbolic links for CC... " >&6; }
33506  SYMLINK_ORIGINAL="$TEST_COMPILER"
33507
33508  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33509    # Follow a chain of symbolic links. Use readlink
33510    # where it exists, else fall back to horribly
33511    # complicated shell code.
33512    if test "x$READLINK_TESTED" != yes; then
33513      # On MacOSX there is a readlink tool with a different
33514      # purpose than the GNU readlink tool. Check the found readlink.
33515      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33516      if test "x$ISGNU" = x; then
33517        # A readlink that we do not know how to use.
33518        # Are there other non-GNU readlinks out there?
33519        READLINK_TESTED=yes
33520        READLINK=
33521      fi
33522    fi
33523
33524    if test "x$READLINK" != x; then
33525      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
33526    else
33527      # Save the current directory for restoring afterwards
33528      STARTDIR=$PWD
33529      COUNTER=0
33530      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
33531      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
33532      cd $sym_link_dir
33533      # Use -P flag to resolve symlinks in directories.
33534      cd `$THEPWDCMD -P`
33535      sym_link_dir=`$THEPWDCMD -P`
33536      # Resolve file symlinks
33537      while test $COUNTER -lt 20; do
33538        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33539        if test "x$ISLINK" == x; then
33540          # This is not a symbolic link! We are done!
33541          break
33542        fi
33543        # Again resolve directory symlinks since the target of the just found
33544        # link could be in a different directory
33545        cd `$DIRNAME $ISLINK`
33546        sym_link_dir=`$THEPWDCMD -P`
33547        sym_link_file=`$BASENAME $ISLINK`
33548        let COUNTER=COUNTER+1
33549      done
33550      cd $STARTDIR
33551      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
33552    fi
33553  fi
33554
33555  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
33556    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
33557$as_echo "no symlink" >&6; }
33558  else
33559    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
33560$as_echo "$SYMLINK_ORIGINAL" >&6; }
33561
33562    # We can't handle ccache by gcc wrappers, since we need to know if we're
33563    # using ccache. Instead ccache usage must be controlled by a configure option.
33564    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
33565    if test "x$COMPILER_BASENAME" = "xccache"; then
33566      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
33567$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
33568      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
33569    fi
33570  fi
33571
33572
33573  COMPILER=$CC
33574  COMPILER_NAME=$COMPILER_NAME
33575
33576  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33577    # cc -V output typically looks like
33578    #     cc: Sun C 5.12 Linux_i386 2011/11/16
33579    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33580    # Check that this is likely to be the Solaris Studio cc.
33581    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
33582    if test $? -ne 0; then
33583      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33584      { $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
33585$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33586      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33587$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33588      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33589$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33590      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33591    fi
33592    # Remove usage instructions (if present), and
33593    # collapse compiler output into a single line
33594    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33595        $SED -e 's/ *[Uu]sage:.*//'`
33596    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33597        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33598  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
33599    # xlc -qversion output typically looks like
33600    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
33601    #     Version: 11.01.0000.0015
33602    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
33603    # Check that this is likely to be the IBM XL C compiler.
33604    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
33605    if test $? -ne 0; then
33606      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33607      { $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
33608$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33609      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33610$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33611      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33612$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33613      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33614    fi
33615    # Collapse compiler output into a single line
33616    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33617    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33618        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
33619  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33620    # There is no specific version flag, but all output starts with a version string.
33621    # First line typically looks something like:
33622    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
33623    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
33624    # Check that this is likely to be Microsoft CL.EXE.
33625    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
33626    if test $? -ne 0; then
33627      { $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
33628$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33629      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33630$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33631      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33632    fi
33633    # Collapse compiler output into a single line
33634    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33635    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33636        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
33637  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
33638    # gcc --version output typically looks like
33639    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
33640    #     Copyright (C) 2013 Free Software Foundation, Inc.
33641    #     This is free software; see the source for copying conditions.  There is NO
33642    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33643    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33644    # Check that this is likely to be GCC.
33645    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
33646    if test $? -ne 0; then
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 --version was: \"$COMPILER_VERSION\"" >&5
33650$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
33651      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33652    fi
33653    # Remove Copyright and legalese from version string, and
33654    # collapse into a single line
33655    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33656        $SED -e 's/ *Copyright .*//'`
33657    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33658        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
33659  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
33660    # clang --version output typically looks like
33661    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
33662    #    clang version 3.3 (tags/RELEASE_33/final)
33663    # or
33664    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
33665    #    Target: x86_64-pc-linux-gnu
33666    #    Thread model: posix
33667    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33668    # Check that this is likely to be clang
33669    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
33670    if test $? -ne 0; then
33671      { $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
33672$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33673      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33674$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33675      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33676    fi
33677    # Collapse compiler output into a single line
33678    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33679    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33680        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
33681  else
33682      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
33683  fi
33684  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
33685  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
33686  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
33687  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
33688
33689  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
33690$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
33691
33692
33693  # Now that we have resolved CC ourself, let autoconf have its go at it
33694  ac_ext=c
33695ac_cpp='$CPP $CPPFLAGS'
33696ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33697ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33698ac_compiler_gnu=$ac_cv_c_compiler_gnu
33699if test -n "$ac_tool_prefix"; then
33700  for ac_prog in $CC
33701  do
33702    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33703set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33705$as_echo_n "checking for $ac_word... " >&6; }
33706if ${ac_cv_prog_CC+:} false; then :
33707  $as_echo_n "(cached) " >&6
33708else
33709  if test -n "$CC"; then
33710  ac_cv_prog_CC="$CC" # Let the user override the test.
33711else
33712as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33713for as_dir in $PATH
33714do
33715  IFS=$as_save_IFS
33716  test -z "$as_dir" && as_dir=.
33717    for ac_exec_ext in '' $ac_executable_extensions; do
33718  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33719    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
33720    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33721    break 2
33722  fi
33723done
33724  done
33725IFS=$as_save_IFS
33726
33727fi
33728fi
33729CC=$ac_cv_prog_CC
33730if test -n "$CC"; then
33731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
33732$as_echo "$CC" >&6; }
33733else
33734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33735$as_echo "no" >&6; }
33736fi
33737
33738
33739    test -n "$CC" && break
33740  done
33741fi
33742if test -z "$CC"; then
33743  ac_ct_CC=$CC
33744  for ac_prog in $CC
33745do
33746  # Extract the first word of "$ac_prog", so it can be a program name with args.
33747set dummy $ac_prog; ac_word=$2
33748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33749$as_echo_n "checking for $ac_word... " >&6; }
33750if ${ac_cv_prog_ac_ct_CC+:} false; then :
33751  $as_echo_n "(cached) " >&6
33752else
33753  if test -n "$ac_ct_CC"; then
33754  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
33755else
33756as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33757for as_dir in $PATH
33758do
33759  IFS=$as_save_IFS
33760  test -z "$as_dir" && as_dir=.
33761    for ac_exec_ext in '' $ac_executable_extensions; do
33762  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33763    ac_cv_prog_ac_ct_CC="$ac_prog"
33764    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33765    break 2
33766  fi
33767done
33768  done
33769IFS=$as_save_IFS
33770
33771fi
33772fi
33773ac_ct_CC=$ac_cv_prog_ac_ct_CC
33774if test -n "$ac_ct_CC"; then
33775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
33776$as_echo "$ac_ct_CC" >&6; }
33777else
33778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33779$as_echo "no" >&6; }
33780fi
33781
33782
33783  test -n "$ac_ct_CC" && break
33784done
33785
33786  if test "x$ac_ct_CC" = x; then
33787    CC=""
33788  else
33789    case $cross_compiling:$ac_tool_warned in
33790yes:)
33791{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33792$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33793ac_tool_warned=yes ;;
33794esac
33795    CC=$ac_ct_CC
33796  fi
33797fi
33798
33799
33800test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33801$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33802as_fn_error $? "no acceptable C compiler found in \$PATH
33803See \`config.log' for more details" "$LINENO" 5; }
33804
33805# Provide some information about the compiler.
33806$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
33807set X $ac_compile
33808ac_compiler=$2
33809for ac_option in --version -v -V -qversion; do
33810  { { ac_try="$ac_compiler $ac_option >&5"
33811case "(($ac_try" in
33812  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33813  *) ac_try_echo=$ac_try;;
33814esac
33815eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33816$as_echo "$ac_try_echo"; } >&5
33817  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33818  ac_status=$?
33819  if test -s conftest.err; then
33820    sed '10a\
33821... rest of stderr output deleted ...
33822         10q' conftest.err >conftest.er1
33823    cat conftest.er1 >&5
33824  fi
33825  rm -f conftest.er1 conftest.err
33826  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33827  test $ac_status = 0; }
33828done
33829
33830cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33831/* end confdefs.h.  */
33832
33833int
33834main ()
33835{
33836
33837  ;
33838  return 0;
33839}
33840_ACEOF
33841ac_clean_files_save=$ac_clean_files
33842ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
33843# Try to create an executable without -o first, disregard a.out.
33844# It will help us diagnose broken compilers, and finding out an intuition
33845# of exeext.
33846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
33847$as_echo_n "checking whether the C compiler works... " >&6; }
33848ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
33849
33850# The possible output files:
33851ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
33852
33853ac_rmfiles=
33854for ac_file in $ac_files
33855do
33856  case $ac_file in
33857    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33858    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
33859  esac
33860done
33861rm -f $ac_rmfiles
33862
33863if { { ac_try="$ac_link_default"
33864case "(($ac_try" in
33865  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33866  *) ac_try_echo=$ac_try;;
33867esac
33868eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33869$as_echo "$ac_try_echo"; } >&5
33870  (eval "$ac_link_default") 2>&5
33871  ac_status=$?
33872  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33873  test $ac_status = 0; }; then :
33874  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
33875# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
33876# in a Makefile.  We should not override ac_cv_exeext if it was cached,
33877# so that the user can short-circuit this test for compilers unknown to
33878# Autoconf.
33879for ac_file in $ac_files ''
33880do
33881  test -f "$ac_file" || continue
33882  case $ac_file in
33883    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
33884	;;
33885    [ab].out )
33886	# We found the default executable, but exeext='' is most
33887	# certainly right.
33888	break;;
33889    *.* )
33890	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
33891	then :; else
33892	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33893	fi
33894	# We set ac_cv_exeext here because the later test for it is not
33895	# safe: cross compilers may not add the suffix if given an `-o'
33896	# argument, so we may need to know it at that point already.
33897	# Even if this section looks crufty: it has the advantage of
33898	# actually working.
33899	break;;
33900    * )
33901	break;;
33902  esac
33903done
33904test "$ac_cv_exeext" = no && ac_cv_exeext=
33905
33906else
33907  ac_file=''
33908fi
33909if test -z "$ac_file"; then :
33910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33911$as_echo "no" >&6; }
33912$as_echo "$as_me: failed program was:" >&5
33913sed 's/^/| /' conftest.$ac_ext >&5
33914
33915{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33916$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33917as_fn_error 77 "C compiler cannot create executables
33918See \`config.log' for more details" "$LINENO" 5; }
33919else
33920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33921$as_echo "yes" >&6; }
33922fi
33923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
33924$as_echo_n "checking for C compiler default output file name... " >&6; }
33925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
33926$as_echo "$ac_file" >&6; }
33927ac_exeext=$ac_cv_exeext
33928
33929rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
33930ac_clean_files=$ac_clean_files_save
33931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
33932$as_echo_n "checking for suffix of executables... " >&6; }
33933if { { ac_try="$ac_link"
33934case "(($ac_try" in
33935  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33936  *) ac_try_echo=$ac_try;;
33937esac
33938eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33939$as_echo "$ac_try_echo"; } >&5
33940  (eval "$ac_link") 2>&5
33941  ac_status=$?
33942  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33943  test $ac_status = 0; }; then :
33944  # If both `conftest.exe' and `conftest' are `present' (well, observable)
33945# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
33946# work properly (i.e., refer to `conftest.exe'), while it won't with
33947# `rm'.
33948for ac_file in conftest.exe conftest conftest.*; do
33949  test -f "$ac_file" || continue
33950  case $ac_file in
33951    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33952    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33953	  break;;
33954    * ) break;;
33955  esac
33956done
33957else
33958  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33959$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33960as_fn_error $? "cannot compute suffix of executables: cannot compile and link
33961See \`config.log' for more details" "$LINENO" 5; }
33962fi
33963rm -f conftest conftest$ac_cv_exeext
33964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
33965$as_echo "$ac_cv_exeext" >&6; }
33966
33967rm -f conftest.$ac_ext
33968EXEEXT=$ac_cv_exeext
33969ac_exeext=$EXEEXT
33970cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33971/* end confdefs.h.  */
33972#include <stdio.h>
33973int
33974main ()
33975{
33976FILE *f = fopen ("conftest.out", "w");
33977 return ferror (f) || fclose (f) != 0;
33978
33979  ;
33980  return 0;
33981}
33982_ACEOF
33983ac_clean_files="$ac_clean_files conftest.out"
33984# Check that the compiler produces executables we can run.  If not, either
33985# the compiler is broken, or we cross compile.
33986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
33987$as_echo_n "checking whether we are cross compiling... " >&6; }
33988if test "$cross_compiling" != yes; then
33989  { { ac_try="$ac_link"
33990case "(($ac_try" in
33991  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33992  *) ac_try_echo=$ac_try;;
33993esac
33994eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33995$as_echo "$ac_try_echo"; } >&5
33996  (eval "$ac_link") 2>&5
33997  ac_status=$?
33998  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33999  test $ac_status = 0; }
34000  if { ac_try='./conftest$ac_cv_exeext'
34001  { { case "(($ac_try" in
34002  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34003  *) ac_try_echo=$ac_try;;
34004esac
34005eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34006$as_echo "$ac_try_echo"; } >&5
34007  (eval "$ac_try") 2>&5
34008  ac_status=$?
34009  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34010  test $ac_status = 0; }; }; then
34011    cross_compiling=no
34012  else
34013    if test "$cross_compiling" = maybe; then
34014	cross_compiling=yes
34015    else
34016	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34017$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34018as_fn_error $? "cannot run C compiled programs.
34019If you meant to cross compile, use \`--host'.
34020See \`config.log' for more details" "$LINENO" 5; }
34021    fi
34022  fi
34023fi
34024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
34025$as_echo "$cross_compiling" >&6; }
34026
34027rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
34028ac_clean_files=$ac_clean_files_save
34029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
34030$as_echo_n "checking for suffix of object files... " >&6; }
34031if ${ac_cv_objext+:} false; then :
34032  $as_echo_n "(cached) " >&6
34033else
34034  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34035/* end confdefs.h.  */
34036
34037int
34038main ()
34039{
34040
34041  ;
34042  return 0;
34043}
34044_ACEOF
34045rm -f conftest.o conftest.obj
34046if { { ac_try="$ac_compile"
34047case "(($ac_try" in
34048  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34049  *) ac_try_echo=$ac_try;;
34050esac
34051eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34052$as_echo "$ac_try_echo"; } >&5
34053  (eval "$ac_compile") 2>&5
34054  ac_status=$?
34055  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34056  test $ac_status = 0; }; then :
34057  for ac_file in conftest.o conftest.obj conftest.*; do
34058  test -f "$ac_file" || continue;
34059  case $ac_file in
34060    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
34061    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
34062       break;;
34063  esac
34064done
34065else
34066  $as_echo "$as_me: failed program was:" >&5
34067sed 's/^/| /' conftest.$ac_ext >&5
34068
34069{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34070$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34071as_fn_error $? "cannot compute suffix of object files: cannot compile
34072See \`config.log' for more details" "$LINENO" 5; }
34073fi
34074rm -f conftest.$ac_cv_objext conftest.$ac_ext
34075fi
34076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
34077$as_echo "$ac_cv_objext" >&6; }
34078OBJEXT=$ac_cv_objext
34079ac_objext=$OBJEXT
34080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
34081$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
34082if ${ac_cv_c_compiler_gnu+:} false; then :
34083  $as_echo_n "(cached) " >&6
34084else
34085  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34086/* end confdefs.h.  */
34087
34088int
34089main ()
34090{
34091#ifndef __GNUC__
34092       choke me
34093#endif
34094
34095  ;
34096  return 0;
34097}
34098_ACEOF
34099if ac_fn_c_try_compile "$LINENO"; then :
34100  ac_compiler_gnu=yes
34101else
34102  ac_compiler_gnu=no
34103fi
34104rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34105ac_cv_c_compiler_gnu=$ac_compiler_gnu
34106
34107fi
34108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
34109$as_echo "$ac_cv_c_compiler_gnu" >&6; }
34110if test $ac_compiler_gnu = yes; then
34111  GCC=yes
34112else
34113  GCC=
34114fi
34115ac_test_CFLAGS=${CFLAGS+set}
34116ac_save_CFLAGS=$CFLAGS
34117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
34118$as_echo_n "checking whether $CC accepts -g... " >&6; }
34119if ${ac_cv_prog_cc_g+:} false; then :
34120  $as_echo_n "(cached) " >&6
34121else
34122  ac_save_c_werror_flag=$ac_c_werror_flag
34123   ac_c_werror_flag=yes
34124   ac_cv_prog_cc_g=no
34125   CFLAGS="-g"
34126   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34127/* end confdefs.h.  */
34128
34129int
34130main ()
34131{
34132
34133  ;
34134  return 0;
34135}
34136_ACEOF
34137if ac_fn_c_try_compile "$LINENO"; then :
34138  ac_cv_prog_cc_g=yes
34139else
34140  CFLAGS=""
34141      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34142/* end confdefs.h.  */
34143
34144int
34145main ()
34146{
34147
34148  ;
34149  return 0;
34150}
34151_ACEOF
34152if ac_fn_c_try_compile "$LINENO"; then :
34153
34154else
34155  ac_c_werror_flag=$ac_save_c_werror_flag
34156	 CFLAGS="-g"
34157	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34158/* end confdefs.h.  */
34159
34160int
34161main ()
34162{
34163
34164  ;
34165  return 0;
34166}
34167_ACEOF
34168if ac_fn_c_try_compile "$LINENO"; then :
34169  ac_cv_prog_cc_g=yes
34170fi
34171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34172fi
34173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34174fi
34175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34176   ac_c_werror_flag=$ac_save_c_werror_flag
34177fi
34178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
34179$as_echo "$ac_cv_prog_cc_g" >&6; }
34180if test "$ac_test_CFLAGS" = set; then
34181  CFLAGS=$ac_save_CFLAGS
34182elif test $ac_cv_prog_cc_g = yes; then
34183  if test "$GCC" = yes; then
34184    CFLAGS="-g -O2"
34185  else
34186    CFLAGS="-g"
34187  fi
34188else
34189  if test "$GCC" = yes; then
34190    CFLAGS="-O2"
34191  else
34192    CFLAGS=
34193  fi
34194fi
34195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
34196$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
34197if ${ac_cv_prog_cc_c89+:} false; then :
34198  $as_echo_n "(cached) " >&6
34199else
34200  ac_cv_prog_cc_c89=no
34201ac_save_CC=$CC
34202cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34203/* end confdefs.h.  */
34204#include <stdarg.h>
34205#include <stdio.h>
34206struct stat;
34207/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
34208struct buf { int x; };
34209FILE * (*rcsopen) (struct buf *, struct stat *, int);
34210static char *e (p, i)
34211     char **p;
34212     int i;
34213{
34214  return p[i];
34215}
34216static char *f (char * (*g) (char **, int), char **p, ...)
34217{
34218  char *s;
34219  va_list v;
34220  va_start (v,p);
34221  s = g (p, va_arg (v,int));
34222  va_end (v);
34223  return s;
34224}
34225
34226/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
34227   function prototypes and stuff, but not '\xHH' hex character constants.
34228   These don't provoke an error unfortunately, instead are silently treated
34229   as 'x'.  The following induces an error, until -std is added to get
34230   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
34231   array size at least.  It's necessary to write '\x00'==0 to get something
34232   that's true only with -std.  */
34233int osf4_cc_array ['\x00' == 0 ? 1 : -1];
34234
34235/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
34236   inside strings and character constants.  */
34237#define FOO(x) 'x'
34238int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
34239
34240int test (int i, double x);
34241struct s1 {int (*f) (int a);};
34242struct s2 {int (*f) (double a);};
34243int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
34244int argc;
34245char **argv;
34246int
34247main ()
34248{
34249return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
34250  ;
34251  return 0;
34252}
34253_ACEOF
34254for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
34255	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
34256do
34257  CC="$ac_save_CC $ac_arg"
34258  if ac_fn_c_try_compile "$LINENO"; then :
34259  ac_cv_prog_cc_c89=$ac_arg
34260fi
34261rm -f core conftest.err conftest.$ac_objext
34262  test "x$ac_cv_prog_cc_c89" != "xno" && break
34263done
34264rm -f conftest.$ac_ext
34265CC=$ac_save_CC
34266
34267fi
34268# AC_CACHE_VAL
34269case "x$ac_cv_prog_cc_c89" in
34270  x)
34271    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
34272$as_echo "none needed" >&6; } ;;
34273  xno)
34274    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
34275$as_echo "unsupported" >&6; } ;;
34276  *)
34277    CC="$CC $ac_cv_prog_cc_c89"
34278    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
34279$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
34280esac
34281if test "x$ac_cv_prog_cc_c89" != xno; then :
34282
34283fi
34284
34285ac_ext=cpp
34286ac_cpp='$CXXCPP $CPPFLAGS'
34287ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34288ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34289ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34290
34291
34292
34293  COMPILER_NAME=C++
34294  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
34295
34296  if test "x$CXX" != x; then
34297    # User has supplied compiler name already, always let that override.
34298    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
34299$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
34300    if test "x`basename $CXX`" = "x$CXX"; then
34301      # A command without a complete path is provided, search $PATH.
34302
34303      for ac_prog in $CXX
34304do
34305  # Extract the first word of "$ac_prog", so it can be a program name with args.
34306set dummy $ac_prog; ac_word=$2
34307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34308$as_echo_n "checking for $ac_word... " >&6; }
34309if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34310  $as_echo_n "(cached) " >&6
34311else
34312  case $POTENTIAL_CXX in
34313  [\\/]* | ?:[\\/]*)
34314  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34315  ;;
34316  *)
34317  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34318for as_dir in $PATH
34319do
34320  IFS=$as_save_IFS
34321  test -z "$as_dir" && as_dir=.
34322    for ac_exec_ext in '' $ac_executable_extensions; do
34323  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34324    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34325    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34326    break 2
34327  fi
34328done
34329  done
34330IFS=$as_save_IFS
34331
34332  ;;
34333esac
34334fi
34335POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34336if test -n "$POTENTIAL_CXX"; then
34337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34338$as_echo "$POTENTIAL_CXX" >&6; }
34339else
34340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34341$as_echo "no" >&6; }
34342fi
34343
34344
34345  test -n "$POTENTIAL_CXX" && break
34346done
34347
34348      if test "x$POTENTIAL_CXX" != x; then
34349        CXX=$POTENTIAL_CXX
34350      else
34351        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
34352      fi
34353    else
34354      # Otherwise it might already be a complete path
34355      if test ! -x "$CXX"; then
34356        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
34357      fi
34358    fi
34359  else
34360    # No user supplied value. Locate compiler ourselves.
34361
34362    # If we are cross compiling, assume cross compilation tools follows the
34363    # cross compilation standard where they are prefixed with the autoconf
34364    # standard name for the target. For example the binary
34365    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
34366    # If we are not cross compiling, then the default compiler name will be
34367    # used.
34368
34369    CXX=
34370    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
34371    # before checking the rest of the PATH.
34372    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
34373    # step, this should not be necessary.
34374    if test -n "$TOOLCHAIN_PATH"; then
34375      PATH_save="$PATH"
34376      PATH="$TOOLCHAIN_PATH"
34377      for ac_prog in $SEARCH_LIST
34378do
34379  # Extract the first word of "$ac_prog", so it can be a program name with args.
34380set dummy $ac_prog; ac_word=$2
34381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34382$as_echo_n "checking for $ac_word... " >&6; }
34383if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
34384  $as_echo_n "(cached) " >&6
34385else
34386  case $TOOLCHAIN_PATH_CXX in
34387  [\\/]* | ?:[\\/]*)
34388  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
34389  ;;
34390  *)
34391  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34392for as_dir in $PATH
34393do
34394  IFS=$as_save_IFS
34395  test -z "$as_dir" && as_dir=.
34396    for ac_exec_ext in '' $ac_executable_extensions; do
34397  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34398    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
34399    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34400    break 2
34401  fi
34402done
34403  done
34404IFS=$as_save_IFS
34405
34406  ;;
34407esac
34408fi
34409TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
34410if test -n "$TOOLCHAIN_PATH_CXX"; then
34411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
34412$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
34413else
34414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34415$as_echo "no" >&6; }
34416fi
34417
34418
34419  test -n "$TOOLCHAIN_PATH_CXX" && break
34420done
34421
34422      CXX=$TOOLCHAIN_PATH_CXX
34423      PATH="$PATH_save"
34424    fi
34425
34426    # AC_PATH_PROGS can't be run multiple times with the same variable,
34427    # so create a new name for this run.
34428    if test "x$CXX" = x; then
34429      for ac_prog in $SEARCH_LIST
34430do
34431  # Extract the first word of "$ac_prog", so it can be a program name with args.
34432set dummy $ac_prog; ac_word=$2
34433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34434$as_echo_n "checking for $ac_word... " >&6; }
34435if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34436  $as_echo_n "(cached) " >&6
34437else
34438  case $POTENTIAL_CXX in
34439  [\\/]* | ?:[\\/]*)
34440  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34441  ;;
34442  *)
34443  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34444for as_dir in $PATH
34445do
34446  IFS=$as_save_IFS
34447  test -z "$as_dir" && as_dir=.
34448    for ac_exec_ext in '' $ac_executable_extensions; do
34449  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34450    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34451    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34452    break 2
34453  fi
34454done
34455  done
34456IFS=$as_save_IFS
34457
34458  ;;
34459esac
34460fi
34461POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34462if test -n "$POTENTIAL_CXX"; then
34463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34464$as_echo "$POTENTIAL_CXX" >&6; }
34465else
34466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34467$as_echo "no" >&6; }
34468fi
34469
34470
34471  test -n "$POTENTIAL_CXX" && break
34472done
34473
34474      CXX=$POTENTIAL_CXX
34475    fi
34476
34477    if test "x$CXX" = x; then
34478
34479  # Print a helpful message on how to acquire the necessary build dependency.
34480  # devkit is the help tag: freetype, cups, alsa etc
34481  MISSING_DEPENDENCY=devkit
34482
34483  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34484    cygwin_help $MISSING_DEPENDENCY
34485  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34486    msys_help $MISSING_DEPENDENCY
34487  else
34488    PKGHANDLER_COMMAND=
34489
34490    case $PKGHANDLER in
34491      apt-get)
34492        apt_help     $MISSING_DEPENDENCY ;;
34493      yum)
34494        yum_help     $MISSING_DEPENDENCY ;;
34495      port)
34496        port_help    $MISSING_DEPENDENCY ;;
34497      pkgutil)
34498        pkgutil_help $MISSING_DEPENDENCY ;;
34499      pkgadd)
34500        pkgadd_help  $MISSING_DEPENDENCY ;;
34501    esac
34502
34503    if test "x$PKGHANDLER_COMMAND" != x; then
34504      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34505    fi
34506  fi
34507
34508      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
34509    fi
34510  fi
34511
34512  # Now we have a compiler binary in CXX. Make sure it's okay.
34513
34514  # Only process if variable expands to non-empty
34515
34516  if test "x$CXX" != x; then
34517    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34518
34519  # First separate the path from the arguments. This will split at the first
34520  # space.
34521  complete="$CXX"
34522  path="${complete%% *}"
34523  tmp="$complete EOL"
34524  arguments="${tmp#* }"
34525
34526  # Input might be given as Windows format, start by converting to
34527  # unix format.
34528  new_path=`$CYGPATH -u "$path"`
34529
34530  # Now try to locate executable using which
34531  new_path=`$WHICH "$new_path" 2> /dev/null`
34532  # bat and cmd files are not always considered executable in cygwin causing which
34533  # to not find them
34534  if test "x$new_path" = x \
34535      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34536      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34537    new_path=`$CYGPATH -u "$path"`
34538  fi
34539  if test "x$new_path" = x; then
34540    # Oops. Which didn't find the executable.
34541    # The splitting of arguments from the executable at a space might have been incorrect,
34542    # since paths with space are more likely in Windows. Give it another try with the whole
34543    # argument.
34544    path="$complete"
34545    arguments="EOL"
34546    new_path=`$CYGPATH -u "$path"`
34547    new_path=`$WHICH "$new_path" 2> /dev/null`
34548    # bat and cmd files are not always considered executable in cygwin causing which
34549    # to not find them
34550    if test "x$new_path" = x \
34551        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34552        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34553      new_path=`$CYGPATH -u "$path"`
34554    fi
34555    if test "x$new_path" = x; then
34556      # It's still not found. Now this is an unrecoverable error.
34557      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34558$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34559      has_space=`$ECHO "$complete" | $GREP " "`
34560      if test "x$has_space" != x; then
34561        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34562$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34563      fi
34564      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34565    fi
34566  fi
34567
34568  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34569  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34570  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34571  # "foo.exe" is OK but "foo" is an error.
34572  #
34573  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34574  # It is also a way to make sure we got the proper file name for the real test later on.
34575  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34576  if test "x$test_shortpath" = x; then
34577    # Short path failed, file does not exist as specified.
34578    # Try adding .exe or .cmd
34579    if test -f "${new_path}.exe"; then
34580      input_to_shortpath="${new_path}.exe"
34581    elif test -f "${new_path}.cmd"; then
34582      input_to_shortpath="${new_path}.cmd"
34583    else
34584      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
34585$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
34586      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34587$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34588      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34589    fi
34590  else
34591    input_to_shortpath="$new_path"
34592  fi
34593
34594  # Call helper function which possibly converts this using DOS-style short mode.
34595  # If so, the updated path is stored in $new_path.
34596  new_path="$input_to_shortpath"
34597
34598  input_path="$input_to_shortpath"
34599  # Check if we need to convert this using DOS-style short mode. If the path
34600  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34601  # take no chances and rewrite it.
34602  # Note: m4 eats our [], so we need to use [ and ] instead.
34603  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34604  if test "x$has_forbidden_chars" != x; then
34605    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34606    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34607    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34608    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34609      # Going to short mode and back again did indeed matter. Since short mode is
34610      # case insensitive, let's make it lowercase to improve readability.
34611      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34612      # Now convert it back to Unix-style (cygpath)
34613      input_path=`$CYGPATH -u "$shortmode_path"`
34614      new_path="$input_path"
34615    fi
34616  fi
34617
34618  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34619  if test "x$test_cygdrive_prefix" = x; then
34620    # As a simple fix, exclude /usr/bin since it's not a real path.
34621    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34622      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34623      # a path prefixed by /cygdrive for fixpath to work.
34624      new_path="$CYGWIN_ROOT_PATH$input_path"
34625    fi
34626  fi
34627
34628  # remove trailing .exe if any
34629  new_path="${new_path/%.exe/}"
34630
34631    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34632
34633  # First separate the path from the arguments. This will split at the first
34634  # space.
34635  complete="$CXX"
34636  path="${complete%% *}"
34637  tmp="$complete EOL"
34638  arguments="${tmp#* }"
34639
34640  # Input might be given as Windows format, start by converting to
34641  # unix format.
34642  new_path="$path"
34643
34644  windows_path="$new_path"
34645  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34646    unix_path=`$CYGPATH -u "$windows_path"`
34647    new_path="$unix_path"
34648  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34649    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34650    new_path="$unix_path"
34651  fi
34652
34653
34654  # Now try to locate executable using which
34655  new_path=`$WHICH "$new_path" 2> /dev/null`
34656
34657  if test "x$new_path" = x; then
34658    # Oops. Which didn't find the executable.
34659    # The splitting of arguments from the executable at a space might have been incorrect,
34660    # since paths with space are more likely in Windows. Give it another try with the whole
34661    # argument.
34662    path="$complete"
34663    arguments="EOL"
34664    new_path="$path"
34665
34666  windows_path="$new_path"
34667  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34668    unix_path=`$CYGPATH -u "$windows_path"`
34669    new_path="$unix_path"
34670  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34671    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34672    new_path="$unix_path"
34673  fi
34674
34675
34676    new_path=`$WHICH "$new_path" 2> /dev/null`
34677    # bat and cmd files are not always considered executable in MSYS causing which
34678    # to not find them
34679    if test "x$new_path" = x \
34680        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34681        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34682      new_path="$path"
34683
34684  windows_path="$new_path"
34685  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34686    unix_path=`$CYGPATH -u "$windows_path"`
34687    new_path="$unix_path"
34688  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34689    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34690    new_path="$unix_path"
34691  fi
34692
34693    fi
34694
34695    if test "x$new_path" = x; then
34696      # It's still not found. Now this is an unrecoverable error.
34697      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34698$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34699      has_space=`$ECHO "$complete" | $GREP " "`
34700      if test "x$has_space" != x; then
34701        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34702$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34703      fi
34704      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34705    fi
34706  fi
34707
34708  # Now new_path has a complete unix path to the binary
34709  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34710    # Keep paths in /bin as-is, but remove trailing .exe if any
34711    new_path="${new_path/%.exe/}"
34712    # Do not save /bin paths to all_fixpath_prefixes!
34713  else
34714    # Not in mixed or Windows style, start by that.
34715    new_path=`cmd //c echo $new_path`
34716
34717  input_path="$new_path"
34718  # Check if we need to convert this using DOS-style short mode. If the path
34719  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34720  # take no chances and rewrite it.
34721  # Note: m4 eats our [], so we need to use [ and ] instead.
34722  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34723  if test "x$has_forbidden_chars" != x; then
34724    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34725    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34726  fi
34727
34728    # Output is in $new_path
34729
34730  windows_path="$new_path"
34731  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34732    unix_path=`$CYGPATH -u "$windows_path"`
34733    new_path="$unix_path"
34734  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34735    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34736    new_path="$unix_path"
34737  fi
34738
34739    # remove trailing .exe if any
34740    new_path="${new_path/%.exe/}"
34741
34742    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34743    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34744  fi
34745
34746    else
34747      # We're on a unix platform. Hooray! :)
34748      # First separate the path from the arguments. This will split at the first
34749      # space.
34750      complete="$CXX"
34751      path="${complete%% *}"
34752      tmp="$complete EOL"
34753      arguments="${tmp#* }"
34754
34755      # Cannot rely on the command "which" here since it doesn't always work.
34756      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34757      if test -z "$is_absolute_path"; then
34758        # Path to executable is not absolute. Find it.
34759        IFS_save="$IFS"
34760        IFS=:
34761        for p in $PATH; do
34762          if test -f "$p/$path" && test -x "$p/$path"; then
34763            new_path="$p/$path"
34764            break
34765          fi
34766        done
34767        IFS="$IFS_save"
34768      else
34769        # This is an absolute path, we can use it without further modifications.
34770        new_path="$path"
34771      fi
34772
34773      if test "x$new_path" = x; then
34774        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34775$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34776        has_space=`$ECHO "$complete" | $GREP " "`
34777        if test "x$has_space" != x; then
34778          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34779$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34780        fi
34781        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34782      fi
34783    fi
34784
34785    # Now join together the path and the arguments once again
34786    if test "x$arguments" != xEOL; then
34787      new_complete="$new_path ${arguments% *}"
34788    else
34789      new_complete="$new_path"
34790    fi
34791
34792    if test "x$complete" != "x$new_complete"; then
34793      CXX="$new_complete"
34794      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
34795$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
34796    fi
34797  fi
34798
34799  TEST_COMPILER="$CXX"
34800
34801  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
34802$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
34803  SYMLINK_ORIGINAL="$TEST_COMPILER"
34804
34805  if test "x$OPENJDK_BUILD_OS" != xwindows; then
34806    # Follow a chain of symbolic links. Use readlink
34807    # where it exists, else fall back to horribly
34808    # complicated shell code.
34809    if test "x$READLINK_TESTED" != yes; then
34810      # On MacOSX there is a readlink tool with a different
34811      # purpose than the GNU readlink tool. Check the found readlink.
34812      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34813      if test "x$ISGNU" = x; then
34814        # A readlink that we do not know how to use.
34815        # Are there other non-GNU readlinks out there?
34816        READLINK_TESTED=yes
34817        READLINK=
34818      fi
34819    fi
34820
34821    if test "x$READLINK" != x; then
34822      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34823    else
34824      # Save the current directory for restoring afterwards
34825      STARTDIR=$PWD
34826      COUNTER=0
34827      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34828      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34829      cd $sym_link_dir
34830      # Use -P flag to resolve symlinks in directories.
34831      cd `$THEPWDCMD -P`
34832      sym_link_dir=`$THEPWDCMD -P`
34833      # Resolve file symlinks
34834      while test $COUNTER -lt 20; do
34835        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34836        if test "x$ISLINK" == x; then
34837          # This is not a symbolic link! We are done!
34838          break
34839        fi
34840        # Again resolve directory symlinks since the target of the just found
34841        # link could be in a different directory
34842        cd `$DIRNAME $ISLINK`
34843        sym_link_dir=`$THEPWDCMD -P`
34844        sym_link_file=`$BASENAME $ISLINK`
34845        let COUNTER=COUNTER+1
34846      done
34847      cd $STARTDIR
34848      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34849    fi
34850  fi
34851
34852  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34853    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34854$as_echo "no symlink" >&6; }
34855  else
34856    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34857$as_echo "$SYMLINK_ORIGINAL" >&6; }
34858
34859    # We can't handle ccache by gcc wrappers, since we need to know if we're
34860    # using ccache. Instead ccache usage must be controlled by a configure option.
34861    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34862    if test "x$COMPILER_BASENAME" = "xccache"; then
34863      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34864$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34865      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34866    fi
34867  fi
34868
34869
34870  COMPILER=$CXX
34871  COMPILER_NAME=$COMPILER_NAME
34872
34873  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34874    # cc -V output typically looks like
34875    #     cc: Sun C 5.12 Linux_i386 2011/11/16
34876    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34877    # Check that this is likely to be the Solaris Studio cc.
34878    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
34879    if test $? -ne 0; then
34880      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34881      { $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
34882$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34883      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34884$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34885      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34886$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34887      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34888    fi
34889    # Remove usage instructions (if present), and
34890    # collapse compiler output into a single line
34891    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34892        $SED -e 's/ *[Uu]sage:.*//'`
34893    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34894        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34895  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34896    # xlc -qversion output typically looks like
34897    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34898    #     Version: 11.01.0000.0015
34899    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34900    # Check that this is likely to be the IBM XL C compiler.
34901    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34902    if test $? -ne 0; then
34903      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34904      { $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
34905$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34906      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34907$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34908      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34909$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34910      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34911    fi
34912    # Collapse compiler output into a single line
34913    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34914    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34915        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34916  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34917    # There is no specific version flag, but all output starts with a version string.
34918    # First line typically looks something like:
34919    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34920    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34921    # Check that this is likely to be Microsoft CL.EXE.
34922    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34923    if test $? -ne 0; then
34924      { $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
34925$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34926      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34927$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34928      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34929    fi
34930    # Collapse compiler output into a single line
34931    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34932    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34933        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34934  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34935    # gcc --version output typically looks like
34936    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34937    #     Copyright (C) 2013 Free Software Foundation, Inc.
34938    #     This is free software; see the source for copying conditions.  There is NO
34939    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34940    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34941    # Check that this is likely to be GCC.
34942    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34943    if test $? -ne 0; then
34944      { $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
34945$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34946      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34947$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34948      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34949    fi
34950    # Remove Copyright and legalese from version string, and
34951    # collapse into a single line
34952    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34953        $SED -e 's/ *Copyright .*//'`
34954    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34955        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
34956  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34957    # clang --version output typically looks like
34958    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34959    #    clang version 3.3 (tags/RELEASE_33/final)
34960    # or
34961    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34962    #    Target: x86_64-pc-linux-gnu
34963    #    Thread model: posix
34964    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34965    # Check that this is likely to be clang
34966    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /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 with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34971$as_echo "$as_me: The result from running with --version 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/^.* version \([1-9][0-9.]*\).*$/\1/'`
34978  else
34979      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34980  fi
34981  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34982  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34983  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34984  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
34985
34986  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
34987$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
34988
34989
34990  # Now that we have resolved CXX ourself, let autoconf have its go at it
34991  ac_ext=cpp
34992ac_cpp='$CXXCPP $CPPFLAGS'
34993ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34994ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34995ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34996if test -z "$CXX"; then
34997  if test -n "$CCC"; then
34998    CXX=$CCC
34999  else
35000    if test -n "$ac_tool_prefix"; then
35001  for ac_prog in $CXX
35002  do
35003    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35004set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35006$as_echo_n "checking for $ac_word... " >&6; }
35007if ${ac_cv_prog_CXX+:} false; then :
35008  $as_echo_n "(cached) " >&6
35009else
35010  if test -n "$CXX"; then
35011  ac_cv_prog_CXX="$CXX" # Let the user override the test.
35012else
35013as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35014for as_dir in $PATH
35015do
35016  IFS=$as_save_IFS
35017  test -z "$as_dir" && as_dir=.
35018    for ac_exec_ext in '' $ac_executable_extensions; do
35019  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35020    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
35021    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35022    break 2
35023  fi
35024done
35025  done
35026IFS=$as_save_IFS
35027
35028fi
35029fi
35030CXX=$ac_cv_prog_CXX
35031if test -n "$CXX"; then
35032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
35033$as_echo "$CXX" >&6; }
35034else
35035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35036$as_echo "no" >&6; }
35037fi
35038
35039
35040    test -n "$CXX" && break
35041  done
35042fi
35043if test -z "$CXX"; then
35044  ac_ct_CXX=$CXX
35045  for ac_prog in $CXX
35046do
35047  # Extract the first word of "$ac_prog", so it can be a program name with args.
35048set dummy $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_ac_ct_CXX+:} false; then :
35052  $as_echo_n "(cached) " >&6
35053else
35054  if test -n "$ac_ct_CXX"; then
35055  ac_cv_prog_ac_ct_CXX="$ac_ct_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_ac_ct_CXX="$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
35074ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
35075if test -n "$ac_ct_CXX"; then
35076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
35077$as_echo "$ac_ct_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 "$ac_ct_CXX" && break
35085done
35086
35087  if test "x$ac_ct_CXX" = x; then
35088    CXX="g++"
35089  else
35090    case $cross_compiling:$ac_tool_warned in
35091yes:)
35092{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35093$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35094ac_tool_warned=yes ;;
35095esac
35096    CXX=$ac_ct_CXX
35097  fi
35098fi
35099
35100  fi
35101fi
35102# Provide some information about the compiler.
35103$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
35104set X $ac_compile
35105ac_compiler=$2
35106for ac_option in --version -v -V -qversion; do
35107  { { ac_try="$ac_compiler $ac_option >&5"
35108case "(($ac_try" in
35109  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
35110  *) ac_try_echo=$ac_try;;
35111esac
35112eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
35113$as_echo "$ac_try_echo"; } >&5
35114  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
35115  ac_status=$?
35116  if test -s conftest.err; then
35117    sed '10a\
35118... rest of stderr output deleted ...
35119         10q' conftest.err >conftest.er1
35120    cat conftest.er1 >&5
35121  fi
35122  rm -f conftest.er1 conftest.err
35123  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35124  test $ac_status = 0; }
35125done
35126
35127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
35128$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
35129if ${ac_cv_cxx_compiler_gnu+:} false; then :
35130  $as_echo_n "(cached) " >&6
35131else
35132  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35133/* end confdefs.h.  */
35134
35135int
35136main ()
35137{
35138#ifndef __GNUC__
35139       choke me
35140#endif
35141
35142  ;
35143  return 0;
35144}
35145_ACEOF
35146if ac_fn_cxx_try_compile "$LINENO"; then :
35147  ac_compiler_gnu=yes
35148else
35149  ac_compiler_gnu=no
35150fi
35151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35152ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
35153
35154fi
35155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
35156$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
35157if test $ac_compiler_gnu = yes; then
35158  GXX=yes
35159else
35160  GXX=
35161fi
35162ac_test_CXXFLAGS=${CXXFLAGS+set}
35163ac_save_CXXFLAGS=$CXXFLAGS
35164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
35165$as_echo_n "checking whether $CXX accepts -g... " >&6; }
35166if ${ac_cv_prog_cxx_g+:} false; then :
35167  $as_echo_n "(cached) " >&6
35168else
35169  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
35170   ac_cxx_werror_flag=yes
35171   ac_cv_prog_cxx_g=no
35172   CXXFLAGS="-g"
35173   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35174/* end confdefs.h.  */
35175
35176int
35177main ()
35178{
35179
35180  ;
35181  return 0;
35182}
35183_ACEOF
35184if ac_fn_cxx_try_compile "$LINENO"; then :
35185  ac_cv_prog_cxx_g=yes
35186else
35187  CXXFLAGS=""
35188      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35189/* end confdefs.h.  */
35190
35191int
35192main ()
35193{
35194
35195  ;
35196  return 0;
35197}
35198_ACEOF
35199if ac_fn_cxx_try_compile "$LINENO"; then :
35200
35201else
35202  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35203	 CXXFLAGS="-g"
35204	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35205/* end confdefs.h.  */
35206
35207int
35208main ()
35209{
35210
35211  ;
35212  return 0;
35213}
35214_ACEOF
35215if ac_fn_cxx_try_compile "$LINENO"; then :
35216  ac_cv_prog_cxx_g=yes
35217fi
35218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35219fi
35220rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35221fi
35222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35223   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35224fi
35225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
35226$as_echo "$ac_cv_prog_cxx_g" >&6; }
35227if test "$ac_test_CXXFLAGS" = set; then
35228  CXXFLAGS=$ac_save_CXXFLAGS
35229elif test $ac_cv_prog_cxx_g = yes; then
35230  if test "$GXX" = yes; then
35231    CXXFLAGS="-g -O2"
35232  else
35233    CXXFLAGS="-g"
35234  fi
35235else
35236  if test "$GXX" = yes; then
35237    CXXFLAGS="-O2"
35238  else
35239    CXXFLAGS=
35240  fi
35241fi
35242ac_ext=cpp
35243ac_cpp='$CXXCPP $CPPFLAGS'
35244ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35245ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35246ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35247
35248
35249  # This is the compiler version number on the form X.Y[.Z]
35250
35251
35252
35253
35254  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
35255    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
35256$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
35257    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
35258$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
35259  fi
35260
35261  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
35262  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
35263    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than three parts (X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
35264$as_echo "$as_me: WARNING: C compiler version number has more than three parts (X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
35265  fi
35266
35267  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
35268    { $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
35269$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
35270  fi
35271
35272  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$CC_VERSION_NUMBER"`
35273
35274
35275  if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
35276
35277
35278
35279
35280
35281
35282
35283
35284
35285
35286
35287
35288
35289
35290
35291
35292
35293
35294
35295
35296
35297
35298
35299
35300
35301
35302
35303
35304
35305
35306
35307
35308
35309
35310
35311
35312
35313
35314
35315
35316
35317
35318
35319
35320
35321
35322
35323
35324
35325    # Execute function body
35326
35327  # Need to assign to a variable since m4 is blocked from modifying parts in [].
35328  REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
35329
35330  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
35331    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only three parts (X.Y.Z) is supported" "$LINENO" 5
35332  fi
35333
35334  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
35335    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
35336  fi
35337
35338  # Version comparison method inspired by http://stackoverflow.com/a/24067243
35339  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
35340
35341  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
35342    :
35343
35344  else
35345    :
35346
35347          { $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
35348$as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
35349
35350
35351  fi
35352
35353
35354
35355
35356
35357
35358
35359
35360
35361
35362
35363
35364
35365
35366  fi
35367
35368  #
35369  # Setup the preprocessor (CPP and CXXCPP)
35370  #
35371  ac_ext=c
35372ac_cpp='$CPP $CPPFLAGS'
35373ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35374ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35375ac_compiler_gnu=$ac_cv_c_compiler_gnu
35376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
35377$as_echo_n "checking how to run the C preprocessor... " >&6; }
35378# On Suns, sometimes $CPP names a directory.
35379if test -n "$CPP" && test -d "$CPP"; then
35380  CPP=
35381fi
35382if test -z "$CPP"; then
35383  if ${ac_cv_prog_CPP+:} false; then :
35384  $as_echo_n "(cached) " >&6
35385else
35386      # Double quotes because CPP needs to be expanded
35387    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
35388    do
35389      ac_preproc_ok=false
35390for ac_c_preproc_warn_flag in '' yes
35391do
35392  # Use a header file that comes with gcc, so configuring glibc
35393  # with a fresh cross-compiler works.
35394  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35395  # <limits.h> exists even on freestanding compilers.
35396  # On the NeXT, cc -E runs the code through the compiler's parser,
35397  # not just through cpp. "Syntax error" is here to catch this case.
35398  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35399/* end confdefs.h.  */
35400#ifdef __STDC__
35401# include <limits.h>
35402#else
35403# include <assert.h>
35404#endif
35405		     Syntax error
35406_ACEOF
35407if ac_fn_c_try_cpp "$LINENO"; then :
35408
35409else
35410  # Broken: fails on valid input.
35411continue
35412fi
35413rm -f conftest.err conftest.i conftest.$ac_ext
35414
35415  # OK, works on sane cases.  Now check whether nonexistent headers
35416  # can be detected and how.
35417  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35418/* end confdefs.h.  */
35419#include <ac_nonexistent.h>
35420_ACEOF
35421if ac_fn_c_try_cpp "$LINENO"; then :
35422  # Broken: success on invalid input.
35423continue
35424else
35425  # Passes both tests.
35426ac_preproc_ok=:
35427break
35428fi
35429rm -f conftest.err conftest.i conftest.$ac_ext
35430
35431done
35432# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35433rm -f conftest.i conftest.err conftest.$ac_ext
35434if $ac_preproc_ok; then :
35435  break
35436fi
35437
35438    done
35439    ac_cv_prog_CPP=$CPP
35440
35441fi
35442  CPP=$ac_cv_prog_CPP
35443else
35444  ac_cv_prog_CPP=$CPP
35445fi
35446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
35447$as_echo "$CPP" >&6; }
35448ac_preproc_ok=false
35449for ac_c_preproc_warn_flag in '' yes
35450do
35451  # Use a header file that comes with gcc, so configuring glibc
35452  # with a fresh cross-compiler works.
35453  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35454  # <limits.h> exists even on freestanding compilers.
35455  # On the NeXT, cc -E runs the code through the compiler's parser,
35456  # not just through cpp. "Syntax error" is here to catch this case.
35457  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35458/* end confdefs.h.  */
35459#ifdef __STDC__
35460# include <limits.h>
35461#else
35462# include <assert.h>
35463#endif
35464		     Syntax error
35465_ACEOF
35466if ac_fn_c_try_cpp "$LINENO"; then :
35467
35468else
35469  # Broken: fails on valid input.
35470continue
35471fi
35472rm -f conftest.err conftest.i conftest.$ac_ext
35473
35474  # OK, works on sane cases.  Now check whether nonexistent headers
35475  # can be detected and how.
35476  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35477/* end confdefs.h.  */
35478#include <ac_nonexistent.h>
35479_ACEOF
35480if ac_fn_c_try_cpp "$LINENO"; then :
35481  # Broken: success on invalid input.
35482continue
35483else
35484  # Passes both tests.
35485ac_preproc_ok=:
35486break
35487fi
35488rm -f conftest.err conftest.i conftest.$ac_ext
35489
35490done
35491# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35492rm -f conftest.i conftest.err conftest.$ac_ext
35493if $ac_preproc_ok; then :
35494
35495else
35496  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35497$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35498as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
35499See \`config.log' for more details" "$LINENO" 5; }
35500fi
35501
35502ac_ext=cpp
35503ac_cpp='$CXXCPP $CPPFLAGS'
35504ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35505ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35506ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35507
35508
35509  # Only process if variable expands to non-empty
35510
35511  if test "x$CPP" != x; then
35512    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35513
35514  # First separate the path from the arguments. This will split at the first
35515  # space.
35516  complete="$CPP"
35517  path="${complete%% *}"
35518  tmp="$complete EOL"
35519  arguments="${tmp#* }"
35520
35521  # Input might be given as Windows format, start by converting to
35522  # unix format.
35523  new_path=`$CYGPATH -u "$path"`
35524
35525  # Now try to locate executable using which
35526  new_path=`$WHICH "$new_path" 2> /dev/null`
35527  # bat and cmd files are not always considered executable in cygwin causing which
35528  # to not find them
35529  if test "x$new_path" = x \
35530      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35531      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35532    new_path=`$CYGPATH -u "$path"`
35533  fi
35534  if test "x$new_path" = x; then
35535    # Oops. Which didn't find the executable.
35536    # The splitting of arguments from the executable at a space might have been incorrect,
35537    # since paths with space are more likely in Windows. Give it another try with the whole
35538    # argument.
35539    path="$complete"
35540    arguments="EOL"
35541    new_path=`$CYGPATH -u "$path"`
35542    new_path=`$WHICH "$new_path" 2> /dev/null`
35543    # bat and cmd files are not always considered executable in cygwin causing which
35544    # to not find them
35545    if test "x$new_path" = x \
35546        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35547        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35548      new_path=`$CYGPATH -u "$path"`
35549    fi
35550    if test "x$new_path" = x; then
35551      # It's still not found. Now this is an unrecoverable error.
35552      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35553$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35554      has_space=`$ECHO "$complete" | $GREP " "`
35555      if test "x$has_space" != x; then
35556        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35557$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35558      fi
35559      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35560    fi
35561  fi
35562
35563  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35564  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35565  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35566  # "foo.exe" is OK but "foo" is an error.
35567  #
35568  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35569  # It is also a way to make sure we got the proper file name for the real test later on.
35570  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35571  if test "x$test_shortpath" = x; then
35572    # Short path failed, file does not exist as specified.
35573    # Try adding .exe or .cmd
35574    if test -f "${new_path}.exe"; then
35575      input_to_shortpath="${new_path}.exe"
35576    elif test -f "${new_path}.cmd"; then
35577      input_to_shortpath="${new_path}.cmd"
35578    else
35579      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
35580$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
35581      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35582$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35583      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35584    fi
35585  else
35586    input_to_shortpath="$new_path"
35587  fi
35588
35589  # Call helper function which possibly converts this using DOS-style short mode.
35590  # If so, the updated path is stored in $new_path.
35591  new_path="$input_to_shortpath"
35592
35593  input_path="$input_to_shortpath"
35594  # Check if we need to convert this using DOS-style short mode. If the path
35595  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35596  # take no chances and rewrite it.
35597  # Note: m4 eats our [], so we need to use [ and ] instead.
35598  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35599  if test "x$has_forbidden_chars" != x; then
35600    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35601    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35602    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35603    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35604      # Going to short mode and back again did indeed matter. Since short mode is
35605      # case insensitive, let's make it lowercase to improve readability.
35606      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35607      # Now convert it back to Unix-style (cygpath)
35608      input_path=`$CYGPATH -u "$shortmode_path"`
35609      new_path="$input_path"
35610    fi
35611  fi
35612
35613  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35614  if test "x$test_cygdrive_prefix" = x; then
35615    # As a simple fix, exclude /usr/bin since it's not a real path.
35616    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35617      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35618      # a path prefixed by /cygdrive for fixpath to work.
35619      new_path="$CYGWIN_ROOT_PATH$input_path"
35620    fi
35621  fi
35622
35623  # remove trailing .exe if any
35624  new_path="${new_path/%.exe/}"
35625
35626    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35627
35628  # First separate the path from the arguments. This will split at the first
35629  # space.
35630  complete="$CPP"
35631  path="${complete%% *}"
35632  tmp="$complete EOL"
35633  arguments="${tmp#* }"
35634
35635  # Input might be given as Windows format, start by converting to
35636  # unix format.
35637  new_path="$path"
35638
35639  windows_path="$new_path"
35640  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35641    unix_path=`$CYGPATH -u "$windows_path"`
35642    new_path="$unix_path"
35643  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35644    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35645    new_path="$unix_path"
35646  fi
35647
35648
35649  # Now try to locate executable using which
35650  new_path=`$WHICH "$new_path" 2> /dev/null`
35651
35652  if test "x$new_path" = x; then
35653    # Oops. Which didn't find the executable.
35654    # The splitting of arguments from the executable at a space might have been incorrect,
35655    # since paths with space are more likely in Windows. Give it another try with the whole
35656    # argument.
35657    path="$complete"
35658    arguments="EOL"
35659    new_path="$path"
35660
35661  windows_path="$new_path"
35662  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35663    unix_path=`$CYGPATH -u "$windows_path"`
35664    new_path="$unix_path"
35665  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35666    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35667    new_path="$unix_path"
35668  fi
35669
35670
35671    new_path=`$WHICH "$new_path" 2> /dev/null`
35672    # bat and cmd files are not always considered executable in MSYS causing which
35673    # to not find them
35674    if test "x$new_path" = x \
35675        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35676        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35677      new_path="$path"
35678
35679  windows_path="$new_path"
35680  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35681    unix_path=`$CYGPATH -u "$windows_path"`
35682    new_path="$unix_path"
35683  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35684    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35685    new_path="$unix_path"
35686  fi
35687
35688    fi
35689
35690    if test "x$new_path" = x; then
35691      # It's still not found. Now this is an unrecoverable error.
35692      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35693$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35694      has_space=`$ECHO "$complete" | $GREP " "`
35695      if test "x$has_space" != x; then
35696        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35697$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35698      fi
35699      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35700    fi
35701  fi
35702
35703  # Now new_path has a complete unix path to the binary
35704  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35705    # Keep paths in /bin as-is, but remove trailing .exe if any
35706    new_path="${new_path/%.exe/}"
35707    # Do not save /bin paths to all_fixpath_prefixes!
35708  else
35709    # Not in mixed or Windows style, start by that.
35710    new_path=`cmd //c echo $new_path`
35711
35712  input_path="$new_path"
35713  # Check if we need to convert this using DOS-style short mode. If the path
35714  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35715  # take no chances and rewrite it.
35716  # Note: m4 eats our [], so we need to use [ and ] instead.
35717  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35718  if test "x$has_forbidden_chars" != x; then
35719    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35720    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35721  fi
35722
35723    # Output is in $new_path
35724
35725  windows_path="$new_path"
35726  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35727    unix_path=`$CYGPATH -u "$windows_path"`
35728    new_path="$unix_path"
35729  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35730    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35731    new_path="$unix_path"
35732  fi
35733
35734    # remove trailing .exe if any
35735    new_path="${new_path/%.exe/}"
35736
35737    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35738    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35739  fi
35740
35741    else
35742      # We're on a unix platform. Hooray! :)
35743      # First separate the path from the arguments. This will split at the first
35744      # space.
35745      complete="$CPP"
35746      path="${complete%% *}"
35747      tmp="$complete EOL"
35748      arguments="${tmp#* }"
35749
35750      # Cannot rely on the command "which" here since it doesn't always work.
35751      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35752      if test -z "$is_absolute_path"; then
35753        # Path to executable is not absolute. Find it.
35754        IFS_save="$IFS"
35755        IFS=:
35756        for p in $PATH; do
35757          if test -f "$p/$path" && test -x "$p/$path"; then
35758            new_path="$p/$path"
35759            break
35760          fi
35761        done
35762        IFS="$IFS_save"
35763      else
35764        # This is an absolute path, we can use it without further modifications.
35765        new_path="$path"
35766      fi
35767
35768      if test "x$new_path" = x; then
35769        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35770$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35771        has_space=`$ECHO "$complete" | $GREP " "`
35772        if test "x$has_space" != x; then
35773          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35774$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35775        fi
35776        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35777      fi
35778    fi
35779
35780    # Now join together the path and the arguments once again
35781    if test "x$arguments" != xEOL; then
35782      new_complete="$new_path ${arguments% *}"
35783    else
35784      new_complete="$new_path"
35785    fi
35786
35787    if test "x$complete" != "x$new_complete"; then
35788      CPP="$new_complete"
35789      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
35790$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
35791    fi
35792  fi
35793
35794  ac_ext=cpp
35795ac_cpp='$CXXCPP $CPPFLAGS'
35796ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35797ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35798ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
35800$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
35801if test -z "$CXXCPP"; then
35802  if ${ac_cv_prog_CXXCPP+:} false; then :
35803  $as_echo_n "(cached) " >&6
35804else
35805      # Double quotes because CXXCPP needs to be expanded
35806    for CXXCPP in "$CXX -E" "/lib/cpp"
35807    do
35808      ac_preproc_ok=false
35809for ac_cxx_preproc_warn_flag in '' yes
35810do
35811  # Use a header file that comes with gcc, so configuring glibc
35812  # with a fresh cross-compiler works.
35813  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35814  # <limits.h> exists even on freestanding compilers.
35815  # On the NeXT, cc -E runs the code through the compiler's parser,
35816  # not just through cpp. "Syntax error" is here to catch this case.
35817  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35818/* end confdefs.h.  */
35819#ifdef __STDC__
35820# include <limits.h>
35821#else
35822# include <assert.h>
35823#endif
35824		     Syntax error
35825_ACEOF
35826if ac_fn_cxx_try_cpp "$LINENO"; then :
35827
35828else
35829  # Broken: fails on valid input.
35830continue
35831fi
35832rm -f conftest.err conftest.i conftest.$ac_ext
35833
35834  # OK, works on sane cases.  Now check whether nonexistent headers
35835  # can be detected and how.
35836  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35837/* end confdefs.h.  */
35838#include <ac_nonexistent.h>
35839_ACEOF
35840if ac_fn_cxx_try_cpp "$LINENO"; then :
35841  # Broken: success on invalid input.
35842continue
35843else
35844  # Passes both tests.
35845ac_preproc_ok=:
35846break
35847fi
35848rm -f conftest.err conftest.i conftest.$ac_ext
35849
35850done
35851# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35852rm -f conftest.i conftest.err conftest.$ac_ext
35853if $ac_preproc_ok; then :
35854  break
35855fi
35856
35857    done
35858    ac_cv_prog_CXXCPP=$CXXCPP
35859
35860fi
35861  CXXCPP=$ac_cv_prog_CXXCPP
35862else
35863  ac_cv_prog_CXXCPP=$CXXCPP
35864fi
35865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
35866$as_echo "$CXXCPP" >&6; }
35867ac_preproc_ok=false
35868for ac_cxx_preproc_warn_flag in '' yes
35869do
35870  # Use a header file that comes with gcc, so configuring glibc
35871  # with a fresh cross-compiler works.
35872  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35873  # <limits.h> exists even on freestanding compilers.
35874  # On the NeXT, cc -E runs the code through the compiler's parser,
35875  # not just through cpp. "Syntax error" is here to catch this case.
35876  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35877/* end confdefs.h.  */
35878#ifdef __STDC__
35879# include <limits.h>
35880#else
35881# include <assert.h>
35882#endif
35883		     Syntax error
35884_ACEOF
35885if ac_fn_cxx_try_cpp "$LINENO"; then :
35886
35887else
35888  # Broken: fails on valid input.
35889continue
35890fi
35891rm -f conftest.err conftest.i conftest.$ac_ext
35892
35893  # OK, works on sane cases.  Now check whether nonexistent headers
35894  # can be detected and how.
35895  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35896/* end confdefs.h.  */
35897#include <ac_nonexistent.h>
35898_ACEOF
35899if ac_fn_cxx_try_cpp "$LINENO"; then :
35900  # Broken: success on invalid input.
35901continue
35902else
35903  # Passes both tests.
35904ac_preproc_ok=:
35905break
35906fi
35907rm -f conftest.err conftest.i conftest.$ac_ext
35908
35909done
35910# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35911rm -f conftest.i conftest.err conftest.$ac_ext
35912if $ac_preproc_ok; then :
35913
35914else
35915  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35916$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35917as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
35918See \`config.log' for more details" "$LINENO" 5; }
35919fi
35920
35921ac_ext=cpp
35922ac_cpp='$CXXCPP $CPPFLAGS'
35923ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35924ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35925ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35926
35927
35928  # Only process if variable expands to non-empty
35929
35930  if test "x$CXXCPP" != x; then
35931    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35932
35933  # First separate the path from the arguments. This will split at the first
35934  # space.
35935  complete="$CXXCPP"
35936  path="${complete%% *}"
35937  tmp="$complete EOL"
35938  arguments="${tmp#* }"
35939
35940  # Input might be given as Windows format, start by converting to
35941  # unix format.
35942  new_path=`$CYGPATH -u "$path"`
35943
35944  # Now try to locate executable using which
35945  new_path=`$WHICH "$new_path" 2> /dev/null`
35946  # bat and cmd files are not always considered executable in cygwin causing which
35947  # to not find them
35948  if test "x$new_path" = x \
35949      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35950      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35951    new_path=`$CYGPATH -u "$path"`
35952  fi
35953  if test "x$new_path" = x; then
35954    # Oops. Which didn't find the executable.
35955    # The splitting of arguments from the executable at a space might have been incorrect,
35956    # since paths with space are more likely in Windows. Give it another try with the whole
35957    # argument.
35958    path="$complete"
35959    arguments="EOL"
35960    new_path=`$CYGPATH -u "$path"`
35961    new_path=`$WHICH "$new_path" 2> /dev/null`
35962    # bat and cmd files are not always considered executable in cygwin causing which
35963    # to not find them
35964    if test "x$new_path" = x \
35965        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35966        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35967      new_path=`$CYGPATH -u "$path"`
35968    fi
35969    if test "x$new_path" = x; then
35970      # It's still not found. Now this is an unrecoverable error.
35971      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35972$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35973      has_space=`$ECHO "$complete" | $GREP " "`
35974      if test "x$has_space" != x; then
35975        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35976$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35977      fi
35978      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35979    fi
35980  fi
35981
35982  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35983  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35984  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35985  # "foo.exe" is OK but "foo" is an error.
35986  #
35987  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35988  # It is also a way to make sure we got the proper file name for the real test later on.
35989  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35990  if test "x$test_shortpath" = x; then
35991    # Short path failed, file does not exist as specified.
35992    # Try adding .exe or .cmd
35993    if test -f "${new_path}.exe"; then
35994      input_to_shortpath="${new_path}.exe"
35995    elif test -f "${new_path}.cmd"; then
35996      input_to_shortpath="${new_path}.cmd"
35997    else
35998      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
35999$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
36000      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36001$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36002      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36003    fi
36004  else
36005    input_to_shortpath="$new_path"
36006  fi
36007
36008  # Call helper function which possibly converts this using DOS-style short mode.
36009  # If so, the updated path is stored in $new_path.
36010  new_path="$input_to_shortpath"
36011
36012  input_path="$input_to_shortpath"
36013  # Check if we need to convert this using DOS-style short mode. If the path
36014  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36015  # take no chances and rewrite it.
36016  # Note: m4 eats our [], so we need to use [ and ] instead.
36017  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36018  if test "x$has_forbidden_chars" != x; then
36019    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36020    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36021    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36022    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36023      # Going to short mode and back again did indeed matter. Since short mode is
36024      # case insensitive, let's make it lowercase to improve readability.
36025      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36026      # Now convert it back to Unix-style (cygpath)
36027      input_path=`$CYGPATH -u "$shortmode_path"`
36028      new_path="$input_path"
36029    fi
36030  fi
36031
36032  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36033  if test "x$test_cygdrive_prefix" = x; then
36034    # As a simple fix, exclude /usr/bin since it's not a real path.
36035    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36036      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36037      # a path prefixed by /cygdrive for fixpath to work.
36038      new_path="$CYGWIN_ROOT_PATH$input_path"
36039    fi
36040  fi
36041
36042  # remove trailing .exe if any
36043  new_path="${new_path/%.exe/}"
36044
36045    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36046
36047  # First separate the path from the arguments. This will split at the first
36048  # space.
36049  complete="$CXXCPP"
36050  path="${complete%% *}"
36051  tmp="$complete EOL"
36052  arguments="${tmp#* }"
36053
36054  # Input might be given as Windows format, start by converting to
36055  # unix format.
36056  new_path="$path"
36057
36058  windows_path="$new_path"
36059  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36060    unix_path=`$CYGPATH -u "$windows_path"`
36061    new_path="$unix_path"
36062  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36063    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36064    new_path="$unix_path"
36065  fi
36066
36067
36068  # Now try to locate executable using which
36069  new_path=`$WHICH "$new_path" 2> /dev/null`
36070
36071  if test "x$new_path" = x; then
36072    # Oops. Which didn't find the executable.
36073    # The splitting of arguments from the executable at a space might have been incorrect,
36074    # since paths with space are more likely in Windows. Give it another try with the whole
36075    # argument.
36076    path="$complete"
36077    arguments="EOL"
36078    new_path="$path"
36079
36080  windows_path="$new_path"
36081  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36082    unix_path=`$CYGPATH -u "$windows_path"`
36083    new_path="$unix_path"
36084  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36085    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36086    new_path="$unix_path"
36087  fi
36088
36089
36090    new_path=`$WHICH "$new_path" 2> /dev/null`
36091    # bat and cmd files are not always considered executable in MSYS causing which
36092    # to not find them
36093    if test "x$new_path" = x \
36094        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36095        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36096      new_path="$path"
36097
36098  windows_path="$new_path"
36099  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36100    unix_path=`$CYGPATH -u "$windows_path"`
36101    new_path="$unix_path"
36102  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36103    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36104    new_path="$unix_path"
36105  fi
36106
36107    fi
36108
36109    if test "x$new_path" = x; then
36110      # It's still not found. Now this is an unrecoverable error.
36111      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36112$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36113      has_space=`$ECHO "$complete" | $GREP " "`
36114      if test "x$has_space" != x; then
36115        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36116$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36117      fi
36118      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36119    fi
36120  fi
36121
36122  # Now new_path has a complete unix path to the binary
36123  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36124    # Keep paths in /bin as-is, but remove trailing .exe if any
36125    new_path="${new_path/%.exe/}"
36126    # Do not save /bin paths to all_fixpath_prefixes!
36127  else
36128    # Not in mixed or Windows style, start by that.
36129    new_path=`cmd //c echo $new_path`
36130
36131  input_path="$new_path"
36132  # Check if we need to convert this using DOS-style short mode. If the path
36133  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36134  # take no chances and rewrite it.
36135  # Note: m4 eats our [], so we need to use [ and ] instead.
36136  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36137  if test "x$has_forbidden_chars" != x; then
36138    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36139    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36140  fi
36141
36142    # Output is in $new_path
36143
36144  windows_path="$new_path"
36145  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36146    unix_path=`$CYGPATH -u "$windows_path"`
36147    new_path="$unix_path"
36148  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36149    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36150    new_path="$unix_path"
36151  fi
36152
36153    # remove trailing .exe if any
36154    new_path="${new_path/%.exe/}"
36155
36156    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36157    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36158  fi
36159
36160    else
36161      # We're on a unix platform. Hooray! :)
36162      # First separate the path from the arguments. This will split at the first
36163      # space.
36164      complete="$CXXCPP"
36165      path="${complete%% *}"
36166      tmp="$complete EOL"
36167      arguments="${tmp#* }"
36168
36169      # Cannot rely on the command "which" here since it doesn't always work.
36170      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36171      if test -z "$is_absolute_path"; then
36172        # Path to executable is not absolute. Find it.
36173        IFS_save="$IFS"
36174        IFS=:
36175        for p in $PATH; do
36176          if test -f "$p/$path" && test -x "$p/$path"; then
36177            new_path="$p/$path"
36178            break
36179          fi
36180        done
36181        IFS="$IFS_save"
36182      else
36183        # This is an absolute path, we can use it without further modifications.
36184        new_path="$path"
36185      fi
36186
36187      if test "x$new_path" = x; then
36188        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36189$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36190        has_space=`$ECHO "$complete" | $GREP " "`
36191        if test "x$has_space" != x; then
36192          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36193$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36194        fi
36195        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36196      fi
36197    fi
36198
36199    # Now join together the path and the arguments once again
36200    if test "x$arguments" != xEOL; then
36201      new_complete="$new_path ${arguments% *}"
36202    else
36203      new_complete="$new_path"
36204    fi
36205
36206    if test "x$complete" != "x$new_complete"; then
36207      CXXCPP="$new_complete"
36208      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
36209$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
36210    fi
36211  fi
36212
36213
36214  #
36215  # Setup the linker (LD)
36216  #
36217  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36218    # In the Microsoft toolchain we have a separate LD command "link".
36219    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
36220    # a cygwin program for something completely different.
36221    # Extract the first word of "link", so it can be a program name with args.
36222set dummy link; ac_word=$2
36223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36224$as_echo_n "checking for $ac_word... " >&6; }
36225if ${ac_cv_prog_LD+:} false; then :
36226  $as_echo_n "(cached) " >&6
36227else
36228  if test -n "$LD"; then
36229  ac_cv_prog_LD="$LD" # Let the user override the test.
36230else
36231  ac_prog_rejected=no
36232as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36233for as_dir in $PATH
36234do
36235  IFS=$as_save_IFS
36236  test -z "$as_dir" && as_dir=.
36237    for ac_exec_ext in '' $ac_executable_extensions; do
36238  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36239    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
36240       ac_prog_rejected=yes
36241       continue
36242     fi
36243    ac_cv_prog_LD="link"
36244    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36245    break 2
36246  fi
36247done
36248  done
36249IFS=$as_save_IFS
36250
36251if test $ac_prog_rejected = yes; then
36252  # We found a bogon in the path, so make sure we never use it.
36253  set dummy $ac_cv_prog_LD
36254  shift
36255  if test $# != 0; then
36256    # We chose a different compiler from the bogus one.
36257    # However, it has the same basename, so the bogon will be chosen
36258    # first if we set LD to just the basename; use the full file name.
36259    shift
36260    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
36261  fi
36262fi
36263fi
36264fi
36265LD=$ac_cv_prog_LD
36266if test -n "$LD"; then
36267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
36268$as_echo "$LD" >&6; }
36269else
36270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36271$as_echo "no" >&6; }
36272fi
36273
36274
36275
36276  # Only process if variable expands to non-empty
36277
36278  if test "x$LD" != x; then
36279    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36280
36281  # First separate the path from the arguments. This will split at the first
36282  # space.
36283  complete="$LD"
36284  path="${complete%% *}"
36285  tmp="$complete EOL"
36286  arguments="${tmp#* }"
36287
36288  # Input might be given as Windows format, start by converting to
36289  # unix format.
36290  new_path=`$CYGPATH -u "$path"`
36291
36292  # Now try to locate executable using which
36293  new_path=`$WHICH "$new_path" 2> /dev/null`
36294  # bat and cmd files are not always considered executable in cygwin causing which
36295  # to not find them
36296  if test "x$new_path" = x \
36297      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36298      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36299    new_path=`$CYGPATH -u "$path"`
36300  fi
36301  if test "x$new_path" = x; then
36302    # Oops. Which didn't find the executable.
36303    # The splitting of arguments from the executable at a space might have been incorrect,
36304    # since paths with space are more likely in Windows. Give it another try with the whole
36305    # argument.
36306    path="$complete"
36307    arguments="EOL"
36308    new_path=`$CYGPATH -u "$path"`
36309    new_path=`$WHICH "$new_path" 2> /dev/null`
36310    # bat and cmd files are not always considered executable in cygwin causing which
36311    # to not find them
36312    if test "x$new_path" = x \
36313        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36314        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36315      new_path=`$CYGPATH -u "$path"`
36316    fi
36317    if test "x$new_path" = x; then
36318      # It's still not found. Now this is an unrecoverable error.
36319      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36320$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36321      has_space=`$ECHO "$complete" | $GREP " "`
36322      if test "x$has_space" != x; then
36323        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36324$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36325      fi
36326      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36327    fi
36328  fi
36329
36330  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36331  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36332  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36333  # "foo.exe" is OK but "foo" is an error.
36334  #
36335  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36336  # It is also a way to make sure we got the proper file name for the real test later on.
36337  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36338  if test "x$test_shortpath" = x; then
36339    # Short path failed, file does not exist as specified.
36340    # Try adding .exe or .cmd
36341    if test -f "${new_path}.exe"; then
36342      input_to_shortpath="${new_path}.exe"
36343    elif test -f "${new_path}.cmd"; then
36344      input_to_shortpath="${new_path}.cmd"
36345    else
36346      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
36347$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
36348      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36349$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36350      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36351    fi
36352  else
36353    input_to_shortpath="$new_path"
36354  fi
36355
36356  # Call helper function which possibly converts this using DOS-style short mode.
36357  # If so, the updated path is stored in $new_path.
36358  new_path="$input_to_shortpath"
36359
36360  input_path="$input_to_shortpath"
36361  # Check if we need to convert this using DOS-style short mode. If the path
36362  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36363  # take no chances and rewrite it.
36364  # Note: m4 eats our [], so we need to use [ and ] instead.
36365  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36366  if test "x$has_forbidden_chars" != x; then
36367    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36368    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36369    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36370    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36371      # Going to short mode and back again did indeed matter. Since short mode is
36372      # case insensitive, let's make it lowercase to improve readability.
36373      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36374      # Now convert it back to Unix-style (cygpath)
36375      input_path=`$CYGPATH -u "$shortmode_path"`
36376      new_path="$input_path"
36377    fi
36378  fi
36379
36380  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36381  if test "x$test_cygdrive_prefix" = x; then
36382    # As a simple fix, exclude /usr/bin since it's not a real path.
36383    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36384      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36385      # a path prefixed by /cygdrive for fixpath to work.
36386      new_path="$CYGWIN_ROOT_PATH$input_path"
36387    fi
36388  fi
36389
36390  # remove trailing .exe if any
36391  new_path="${new_path/%.exe/}"
36392
36393    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36394
36395  # First separate the path from the arguments. This will split at the first
36396  # space.
36397  complete="$LD"
36398  path="${complete%% *}"
36399  tmp="$complete EOL"
36400  arguments="${tmp#* }"
36401
36402  # Input might be given as Windows format, start by converting to
36403  # unix format.
36404  new_path="$path"
36405
36406  windows_path="$new_path"
36407  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36408    unix_path=`$CYGPATH -u "$windows_path"`
36409    new_path="$unix_path"
36410  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36411    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36412    new_path="$unix_path"
36413  fi
36414
36415
36416  # Now try to locate executable using which
36417  new_path=`$WHICH "$new_path" 2> /dev/null`
36418
36419  if test "x$new_path" = x; then
36420    # Oops. Which didn't find the executable.
36421    # The splitting of arguments from the executable at a space might have been incorrect,
36422    # since paths with space are more likely in Windows. Give it another try with the whole
36423    # argument.
36424    path="$complete"
36425    arguments="EOL"
36426    new_path="$path"
36427
36428  windows_path="$new_path"
36429  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36430    unix_path=`$CYGPATH -u "$windows_path"`
36431    new_path="$unix_path"
36432  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36433    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36434    new_path="$unix_path"
36435  fi
36436
36437
36438    new_path=`$WHICH "$new_path" 2> /dev/null`
36439    # bat and cmd files are not always considered executable in MSYS causing which
36440    # to not find them
36441    if test "x$new_path" = x \
36442        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36443        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36444      new_path="$path"
36445
36446  windows_path="$new_path"
36447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36448    unix_path=`$CYGPATH -u "$windows_path"`
36449    new_path="$unix_path"
36450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36451    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36452    new_path="$unix_path"
36453  fi
36454
36455    fi
36456
36457    if test "x$new_path" = x; then
36458      # It's still not found. Now this is an unrecoverable error.
36459      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36460$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36461      has_space=`$ECHO "$complete" | $GREP " "`
36462      if test "x$has_space" != x; then
36463        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36464$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36465      fi
36466      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36467    fi
36468  fi
36469
36470  # Now new_path has a complete unix path to the binary
36471  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36472    # Keep paths in /bin as-is, but remove trailing .exe if any
36473    new_path="${new_path/%.exe/}"
36474    # Do not save /bin paths to all_fixpath_prefixes!
36475  else
36476    # Not in mixed or Windows style, start by that.
36477    new_path=`cmd //c echo $new_path`
36478
36479  input_path="$new_path"
36480  # Check if we need to convert this using DOS-style short mode. If the path
36481  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36482  # take no chances and rewrite it.
36483  # Note: m4 eats our [], so we need to use [ and ] instead.
36484  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36485  if test "x$has_forbidden_chars" != x; then
36486    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36487    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36488  fi
36489
36490    # Output is in $new_path
36491
36492  windows_path="$new_path"
36493  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36494    unix_path=`$CYGPATH -u "$windows_path"`
36495    new_path="$unix_path"
36496  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36497    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36498    new_path="$unix_path"
36499  fi
36500
36501    # remove trailing .exe if any
36502    new_path="${new_path/%.exe/}"
36503
36504    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36505    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36506  fi
36507
36508    else
36509      # We're on a unix platform. Hooray! :)
36510      # First separate the path from the arguments. This will split at the first
36511      # space.
36512      complete="$LD"
36513      path="${complete%% *}"
36514      tmp="$complete EOL"
36515      arguments="${tmp#* }"
36516
36517      # Cannot rely on the command "which" here since it doesn't always work.
36518      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36519      if test -z "$is_absolute_path"; then
36520        # Path to executable is not absolute. Find it.
36521        IFS_save="$IFS"
36522        IFS=:
36523        for p in $PATH; do
36524          if test -f "$p/$path" && test -x "$p/$path"; then
36525            new_path="$p/$path"
36526            break
36527          fi
36528        done
36529        IFS="$IFS_save"
36530      else
36531        # This is an absolute path, we can use it without further modifications.
36532        new_path="$path"
36533      fi
36534
36535      if test "x$new_path" = x; then
36536        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36537$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36538        has_space=`$ECHO "$complete" | $GREP " "`
36539        if test "x$has_space" != x; then
36540          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36541$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36542        fi
36543        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36544      fi
36545    fi
36546
36547    # Now join together the path and the arguments once again
36548    if test "x$arguments" != xEOL; then
36549      new_complete="$new_path ${arguments% *}"
36550    else
36551      new_complete="$new_path"
36552    fi
36553
36554    if test "x$complete" != "x$new_complete"; then
36555      LD="$new_complete"
36556      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
36557$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
36558    fi
36559  fi
36560
36561    # Verify that we indeed succeeded with this trick.
36562    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
36563$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
36564    "$LD" --version > /dev/null
36565    if test $? -eq 0 ; then
36566      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36567$as_echo "no" >&6; }
36568      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
36569    else
36570      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36571$as_echo "yes" >&6; }
36572    fi
36573    LDCXX="$LD"
36574  else
36575    # All other toolchains use the compiler to link.
36576    LD="$CC"
36577    LDCXX="$CXX"
36578  fi
36579
36580  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
36581
36582
36583  #
36584  # Setup the assembler (AS)
36585  #
36586  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
36587
36588
36589  # Publish this variable in the help.
36590
36591
36592  if [ -z "${AS+x}" ]; then
36593    # The variable is not set by user, try to locate tool using the code snippet
36594    for ac_prog in as
36595do
36596  # Extract the first word of "$ac_prog", so it can be a program name with args.
36597set dummy $ac_prog; ac_word=$2
36598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36599$as_echo_n "checking for $ac_word... " >&6; }
36600if ${ac_cv_path_AS+:} false; then :
36601  $as_echo_n "(cached) " >&6
36602else
36603  case $AS in
36604  [\\/]* | ?:[\\/]*)
36605  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36606  ;;
36607  *)
36608  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36609for as_dir in $PATH
36610do
36611  IFS=$as_save_IFS
36612  test -z "$as_dir" && as_dir=.
36613    for ac_exec_ext in '' $ac_executable_extensions; do
36614  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36615    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36616    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36617    break 2
36618  fi
36619done
36620  done
36621IFS=$as_save_IFS
36622
36623  ;;
36624esac
36625fi
36626AS=$ac_cv_path_AS
36627if test -n "$AS"; then
36628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36629$as_echo "$AS" >&6; }
36630else
36631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36632$as_echo "no" >&6; }
36633fi
36634
36635
36636  test -n "$AS" && break
36637done
36638
36639  else
36640    # The variable is set, but is it from the command line or the environment?
36641
36642    # Try to remove the string !AS! from our list.
36643    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
36644    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36645      # If it failed, the variable was not from the command line. Ignore it,
36646      # but warn the user (except for BASH, which is always set by the calling BASH).
36647      if test "xAS" != xBASH; then
36648        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
36649$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
36650      fi
36651      # Try to locate tool using the code snippet
36652      for ac_prog in as
36653do
36654  # Extract the first word of "$ac_prog", so it can be a program name with args.
36655set dummy $ac_prog; ac_word=$2
36656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36657$as_echo_n "checking for $ac_word... " >&6; }
36658if ${ac_cv_path_AS+:} false; then :
36659  $as_echo_n "(cached) " >&6
36660else
36661  case $AS in
36662  [\\/]* | ?:[\\/]*)
36663  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36664  ;;
36665  *)
36666  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36667for as_dir in $PATH
36668do
36669  IFS=$as_save_IFS
36670  test -z "$as_dir" && as_dir=.
36671    for ac_exec_ext in '' $ac_executable_extensions; do
36672  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36673    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36674    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36675    break 2
36676  fi
36677done
36678  done
36679IFS=$as_save_IFS
36680
36681  ;;
36682esac
36683fi
36684AS=$ac_cv_path_AS
36685if test -n "$AS"; then
36686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36687$as_echo "$AS" >&6; }
36688else
36689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36690$as_echo "no" >&6; }
36691fi
36692
36693
36694  test -n "$AS" && break
36695done
36696
36697    else
36698      # If it succeeded, then it was overridden by the user. We will use it
36699      # for the tool.
36700
36701      # First remove it from the list of overridden variables, so we can test
36702      # for unknown variables in the end.
36703      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36704
36705      # Check if we try to supply an empty value
36706      if test "x$AS" = x; then
36707        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
36708$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
36709        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36710$as_echo_n "checking for AS... " >&6; }
36711        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36712$as_echo "disabled" >&6; }
36713      else
36714        # Check if the provided tool contains a complete path.
36715        tool_specified="$AS"
36716        tool_basename="${tool_specified##*/}"
36717        if test "x$tool_basename" = "x$tool_specified"; then
36718          # A command without a complete path is provided, search $PATH.
36719          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
36720$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
36721          # Extract the first word of "$tool_basename", so it can be a program name with args.
36722set dummy $tool_basename; ac_word=$2
36723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36724$as_echo_n "checking for $ac_word... " >&6; }
36725if ${ac_cv_path_AS+:} false; then :
36726  $as_echo_n "(cached) " >&6
36727else
36728  case $AS in
36729  [\\/]* | ?:[\\/]*)
36730  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36731  ;;
36732  *)
36733  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36734for as_dir in $PATH
36735do
36736  IFS=$as_save_IFS
36737  test -z "$as_dir" && as_dir=.
36738    for ac_exec_ext in '' $ac_executable_extensions; do
36739  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36740    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36741    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36742    break 2
36743  fi
36744done
36745  done
36746IFS=$as_save_IFS
36747
36748  ;;
36749esac
36750fi
36751AS=$ac_cv_path_AS
36752if test -n "$AS"; then
36753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36754$as_echo "$AS" >&6; }
36755else
36756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36757$as_echo "no" >&6; }
36758fi
36759
36760
36761          if test "x$AS" = x; then
36762            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36763          fi
36764        else
36765          # Otherwise we believe it is a complete path. Use it as it is.
36766          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
36767$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
36768          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36769$as_echo_n "checking for AS... " >&6; }
36770          if test ! -x "$tool_specified"; then
36771            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36772$as_echo "not found" >&6; }
36773            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
36774          fi
36775          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36776$as_echo "$tool_specified" >&6; }
36777        fi
36778      fi
36779    fi
36780
36781  fi
36782
36783
36784
36785  # Only process if variable expands to non-empty
36786
36787  if test "x$AS" != x; then
36788    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36789
36790  # First separate the path from the arguments. This will split at the first
36791  # space.
36792  complete="$AS"
36793  path="${complete%% *}"
36794  tmp="$complete EOL"
36795  arguments="${tmp#* }"
36796
36797  # Input might be given as Windows format, start by converting to
36798  # unix format.
36799  new_path=`$CYGPATH -u "$path"`
36800
36801  # Now try to locate executable using which
36802  new_path=`$WHICH "$new_path" 2> /dev/null`
36803  # bat and cmd files are not always considered executable in cygwin causing which
36804  # to not find them
36805  if test "x$new_path" = x \
36806      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36807      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36808    new_path=`$CYGPATH -u "$path"`
36809  fi
36810  if test "x$new_path" = x; then
36811    # Oops. Which didn't find the executable.
36812    # The splitting of arguments from the executable at a space might have been incorrect,
36813    # since paths with space are more likely in Windows. Give it another try with the whole
36814    # argument.
36815    path="$complete"
36816    arguments="EOL"
36817    new_path=`$CYGPATH -u "$path"`
36818    new_path=`$WHICH "$new_path" 2> /dev/null`
36819    # bat and cmd files are not always considered executable in cygwin causing which
36820    # to not find them
36821    if test "x$new_path" = x \
36822        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36823        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36824      new_path=`$CYGPATH -u "$path"`
36825    fi
36826    if test "x$new_path" = x; then
36827      # It's still not found. Now this is an unrecoverable error.
36828      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36829$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36830      has_space=`$ECHO "$complete" | $GREP " "`
36831      if test "x$has_space" != x; then
36832        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36833$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36834      fi
36835      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36836    fi
36837  fi
36838
36839  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36840  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36841  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36842  # "foo.exe" is OK but "foo" is an error.
36843  #
36844  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36845  # It is also a way to make sure we got the proper file name for the real test later on.
36846  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36847  if test "x$test_shortpath" = x; then
36848    # Short path failed, file does not exist as specified.
36849    # Try adding .exe or .cmd
36850    if test -f "${new_path}.exe"; then
36851      input_to_shortpath="${new_path}.exe"
36852    elif test -f "${new_path}.cmd"; then
36853      input_to_shortpath="${new_path}.cmd"
36854    else
36855      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
36856$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
36857      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36858$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36859      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36860    fi
36861  else
36862    input_to_shortpath="$new_path"
36863  fi
36864
36865  # Call helper function which possibly converts this using DOS-style short mode.
36866  # If so, the updated path is stored in $new_path.
36867  new_path="$input_to_shortpath"
36868
36869  input_path="$input_to_shortpath"
36870  # Check if we need to convert this using DOS-style short mode. If the path
36871  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36872  # take no chances and rewrite it.
36873  # Note: m4 eats our [], so we need to use [ and ] instead.
36874  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36875  if test "x$has_forbidden_chars" != x; then
36876    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36877    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36878    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36879    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36880      # Going to short mode and back again did indeed matter. Since short mode is
36881      # case insensitive, let's make it lowercase to improve readability.
36882      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36883      # Now convert it back to Unix-style (cygpath)
36884      input_path=`$CYGPATH -u "$shortmode_path"`
36885      new_path="$input_path"
36886    fi
36887  fi
36888
36889  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36890  if test "x$test_cygdrive_prefix" = x; then
36891    # As a simple fix, exclude /usr/bin since it's not a real path.
36892    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36893      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36894      # a path prefixed by /cygdrive for fixpath to work.
36895      new_path="$CYGWIN_ROOT_PATH$input_path"
36896    fi
36897  fi
36898
36899  # remove trailing .exe if any
36900  new_path="${new_path/%.exe/}"
36901
36902    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36903
36904  # First separate the path from the arguments. This will split at the first
36905  # space.
36906  complete="$AS"
36907  path="${complete%% *}"
36908  tmp="$complete EOL"
36909  arguments="${tmp#* }"
36910
36911  # Input might be given as Windows format, start by converting to
36912  # unix format.
36913  new_path="$path"
36914
36915  windows_path="$new_path"
36916  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36917    unix_path=`$CYGPATH -u "$windows_path"`
36918    new_path="$unix_path"
36919  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36920    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36921    new_path="$unix_path"
36922  fi
36923
36924
36925  # Now try to locate executable using which
36926  new_path=`$WHICH "$new_path" 2> /dev/null`
36927
36928  if test "x$new_path" = x; then
36929    # Oops. Which didn't find the executable.
36930    # The splitting of arguments from the executable at a space might have been incorrect,
36931    # since paths with space are more likely in Windows. Give it another try with the whole
36932    # argument.
36933    path="$complete"
36934    arguments="EOL"
36935    new_path="$path"
36936
36937  windows_path="$new_path"
36938  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36939    unix_path=`$CYGPATH -u "$windows_path"`
36940    new_path="$unix_path"
36941  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36942    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36943    new_path="$unix_path"
36944  fi
36945
36946
36947    new_path=`$WHICH "$new_path" 2> /dev/null`
36948    # bat and cmd files are not always considered executable in MSYS causing which
36949    # to not find them
36950    if test "x$new_path" = x \
36951        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36952        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36953      new_path="$path"
36954
36955  windows_path="$new_path"
36956  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36957    unix_path=`$CYGPATH -u "$windows_path"`
36958    new_path="$unix_path"
36959  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36960    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36961    new_path="$unix_path"
36962  fi
36963
36964    fi
36965
36966    if test "x$new_path" = x; then
36967      # It's still not found. Now this is an unrecoverable error.
36968      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36969$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36970      has_space=`$ECHO "$complete" | $GREP " "`
36971      if test "x$has_space" != x; then
36972        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36973$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36974      fi
36975      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36976    fi
36977  fi
36978
36979  # Now new_path has a complete unix path to the binary
36980  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36981    # Keep paths in /bin as-is, but remove trailing .exe if any
36982    new_path="${new_path/%.exe/}"
36983    # Do not save /bin paths to all_fixpath_prefixes!
36984  else
36985    # Not in mixed or Windows style, start by that.
36986    new_path=`cmd //c echo $new_path`
36987
36988  input_path="$new_path"
36989  # Check if we need to convert this using DOS-style short mode. If the path
36990  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36991  # take no chances and rewrite it.
36992  # Note: m4 eats our [], so we need to use [ and ] instead.
36993  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36994  if test "x$has_forbidden_chars" != x; then
36995    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36996    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36997  fi
36998
36999    # Output is in $new_path
37000
37001  windows_path="$new_path"
37002  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37003    unix_path=`$CYGPATH -u "$windows_path"`
37004    new_path="$unix_path"
37005  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37006    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37007    new_path="$unix_path"
37008  fi
37009
37010    # remove trailing .exe if any
37011    new_path="${new_path/%.exe/}"
37012
37013    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37014    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37015  fi
37016
37017    else
37018      # We're on a unix platform. Hooray! :)
37019      # First separate the path from the arguments. This will split at the first
37020      # space.
37021      complete="$AS"
37022      path="${complete%% *}"
37023      tmp="$complete EOL"
37024      arguments="${tmp#* }"
37025
37026      # Cannot rely on the command "which" here since it doesn't always work.
37027      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37028      if test -z "$is_absolute_path"; then
37029        # Path to executable is not absolute. Find it.
37030        IFS_save="$IFS"
37031        IFS=:
37032        for p in $PATH; do
37033          if test -f "$p/$path" && test -x "$p/$path"; then
37034            new_path="$p/$path"
37035            break
37036          fi
37037        done
37038        IFS="$IFS_save"
37039      else
37040        # This is an absolute path, we can use it without further modifications.
37041        new_path="$path"
37042      fi
37043
37044      if test "x$new_path" = x; then
37045        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37046$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37047        has_space=`$ECHO "$complete" | $GREP " "`
37048        if test "x$has_space" != x; then
37049          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37050$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37051        fi
37052        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37053      fi
37054    fi
37055
37056    # Now join together the path and the arguments once again
37057    if test "x$arguments" != xEOL; then
37058      new_complete="$new_path ${arguments% *}"
37059    else
37060      new_complete="$new_path"
37061    fi
37062
37063    if test "x$complete" != "x$new_complete"; then
37064      AS="$new_complete"
37065      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
37066$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
37067    fi
37068  fi
37069
37070    if test "x$AS" = x; then
37071      as_fn_error $? "Solaris assembler (as) is required. Please install via \"pkg install pkg:/developer/assembler\"." "$LINENO" 5
37072    fi
37073  else
37074    # FIXME: is this correct for microsoft?
37075    AS="$CC -c"
37076  fi
37077
37078
37079  #
37080  # Setup the archiver (AR)
37081  #
37082  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37083    # The corresponding ar tool is lib.exe (used to create static libraries)
37084    # Extract the first word of "lib", so it can be a program name with args.
37085set dummy lib; ac_word=$2
37086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37087$as_echo_n "checking for $ac_word... " >&6; }
37088if ${ac_cv_prog_AR+:} false; then :
37089  $as_echo_n "(cached) " >&6
37090else
37091  if test -n "$AR"; then
37092  ac_cv_prog_AR="$AR" # Let the user override the test.
37093else
37094as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37095for as_dir in $PATH
37096do
37097  IFS=$as_save_IFS
37098  test -z "$as_dir" && as_dir=.
37099    for ac_exec_ext in '' $ac_executable_extensions; do
37100  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37101    ac_cv_prog_AR="lib"
37102    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37103    break 2
37104  fi
37105done
37106  done
37107IFS=$as_save_IFS
37108
37109fi
37110fi
37111AR=$ac_cv_prog_AR
37112if test -n "$AR"; then
37113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37114$as_echo "$AR" >&6; }
37115else
37116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37117$as_echo "no" >&6; }
37118fi
37119
37120
37121  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
37122
37123
37124  # Publish this variable in the help.
37125
37126
37127  if [ -z "${AR+x}" ]; then
37128    # The variable is not set by user, try to locate tool using the code snippet
37129    if test -n "$ac_tool_prefix"; then
37130  for ac_prog in ar gcc-ar
37131  do
37132    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37133set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37135$as_echo_n "checking for $ac_word... " >&6; }
37136if ${ac_cv_prog_AR+:} false; then :
37137  $as_echo_n "(cached) " >&6
37138else
37139  if test -n "$AR"; then
37140  ac_cv_prog_AR="$AR" # Let the user override the test.
37141else
37142as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37143for as_dir in $PATH
37144do
37145  IFS=$as_save_IFS
37146  test -z "$as_dir" && as_dir=.
37147    for ac_exec_ext in '' $ac_executable_extensions; do
37148  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37149    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37150    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37151    break 2
37152  fi
37153done
37154  done
37155IFS=$as_save_IFS
37156
37157fi
37158fi
37159AR=$ac_cv_prog_AR
37160if test -n "$AR"; then
37161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37162$as_echo "$AR" >&6; }
37163else
37164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37165$as_echo "no" >&6; }
37166fi
37167
37168
37169    test -n "$AR" && break
37170  done
37171fi
37172if test -z "$AR"; then
37173  ac_ct_AR=$AR
37174  for ac_prog in ar gcc-ar
37175do
37176  # Extract the first word of "$ac_prog", so it can be a program name with args.
37177set dummy $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_ac_ct_AR+:} false; then :
37181  $as_echo_n "(cached) " >&6
37182else
37183  if test -n "$ac_ct_AR"; then
37184  ac_cv_prog_ac_ct_AR="$ac_ct_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_ac_ct_AR="$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
37203ac_ct_AR=$ac_cv_prog_ac_ct_AR
37204if test -n "$ac_ct_AR"; then
37205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37206$as_echo "$ac_ct_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 "$ac_ct_AR" && break
37214done
37215
37216  if test "x$ac_ct_AR" = x; then
37217    AR=""
37218  else
37219    case $cross_compiling:$ac_tool_warned in
37220yes:)
37221{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37222$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37223ac_tool_warned=yes ;;
37224esac
37225    AR=$ac_ct_AR
37226  fi
37227fi
37228
37229  else
37230    # The variable is set, but is it from the command line or the environment?
37231
37232    # Try to remove the string !AR! from our list.
37233    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37234    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37235      # If it failed, the variable was not from the command line. Ignore it,
37236      # but warn the user (except for BASH, which is always set by the calling BASH).
37237      if test "xAR" != xBASH; then
37238        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37239$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37240      fi
37241      # Try to locate tool using the code snippet
37242      if test -n "$ac_tool_prefix"; then
37243  for ac_prog in ar gcc-ar
37244  do
37245    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37246set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37248$as_echo_n "checking for $ac_word... " >&6; }
37249if ${ac_cv_prog_AR+:} false; then :
37250  $as_echo_n "(cached) " >&6
37251else
37252  if test -n "$AR"; then
37253  ac_cv_prog_AR="$AR" # Let the user override the test.
37254else
37255as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37256for as_dir in $PATH
37257do
37258  IFS=$as_save_IFS
37259  test -z "$as_dir" && as_dir=.
37260    for ac_exec_ext in '' $ac_executable_extensions; do
37261  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37262    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37263    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37264    break 2
37265  fi
37266done
37267  done
37268IFS=$as_save_IFS
37269
37270fi
37271fi
37272AR=$ac_cv_prog_AR
37273if test -n "$AR"; then
37274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37275$as_echo "$AR" >&6; }
37276else
37277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37278$as_echo "no" >&6; }
37279fi
37280
37281
37282    test -n "$AR" && break
37283  done
37284fi
37285if test -z "$AR"; then
37286  ac_ct_AR=$AR
37287  for ac_prog in ar gcc-ar
37288do
37289  # Extract the first word of "$ac_prog", so it can be a program name with args.
37290set dummy $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_ac_ct_AR+:} false; then :
37294  $as_echo_n "(cached) " >&6
37295else
37296  if test -n "$ac_ct_AR"; then
37297  ac_cv_prog_ac_ct_AR="$ac_ct_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_ac_ct_AR="$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
37316ac_ct_AR=$ac_cv_prog_ac_ct_AR
37317if test -n "$ac_ct_AR"; then
37318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37319$as_echo "$ac_ct_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 "$ac_ct_AR" && break
37327done
37328
37329  if test "x$ac_ct_AR" = x; then
37330    AR=""
37331  else
37332    case $cross_compiling:$ac_tool_warned in
37333yes:)
37334{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37335$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37336ac_tool_warned=yes ;;
37337esac
37338    AR=$ac_ct_AR
37339  fi
37340fi
37341
37342    else
37343      # If it succeeded, then it was overridden by the user. We will use it
37344      # for the tool.
37345
37346      # First remove it from the list of overridden variables, so we can test
37347      # for unknown variables in the end.
37348      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37349
37350      # Check if we try to supply an empty value
37351      if test "x$AR" = x; then
37352        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37353$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37354        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37355$as_echo_n "checking for AR... " >&6; }
37356        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37357$as_echo "disabled" >&6; }
37358      else
37359        # Check if the provided tool contains a complete path.
37360        tool_specified="$AR"
37361        tool_basename="${tool_specified##*/}"
37362        if test "x$tool_basename" = "x$tool_specified"; then
37363          # A command without a complete path is provided, search $PATH.
37364          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37365$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37366          # Extract the first word of "$tool_basename", so it can be a program name with args.
37367set dummy $tool_basename; ac_word=$2
37368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37369$as_echo_n "checking for $ac_word... " >&6; }
37370if ${ac_cv_path_AR+:} false; then :
37371  $as_echo_n "(cached) " >&6
37372else
37373  case $AR in
37374  [\\/]* | ?:[\\/]*)
37375  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37376  ;;
37377  *)
37378  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37379for as_dir in $PATH
37380do
37381  IFS=$as_save_IFS
37382  test -z "$as_dir" && as_dir=.
37383    for ac_exec_ext in '' $ac_executable_extensions; do
37384  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37385    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37386    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37387    break 2
37388  fi
37389done
37390  done
37391IFS=$as_save_IFS
37392
37393  ;;
37394esac
37395fi
37396AR=$ac_cv_path_AR
37397if test -n "$AR"; then
37398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37399$as_echo "$AR" >&6; }
37400else
37401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37402$as_echo "no" >&6; }
37403fi
37404
37405
37406          if test "x$AR" = x; then
37407            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37408          fi
37409        else
37410          # Otherwise we believe it is a complete path. Use it as it is.
37411          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37412$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37413          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37414$as_echo_n "checking for AR... " >&6; }
37415          if test ! -x "$tool_specified"; then
37416            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37417$as_echo "not found" >&6; }
37418            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37419          fi
37420          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37421$as_echo "$tool_specified" >&6; }
37422        fi
37423      fi
37424    fi
37425
37426  fi
37427
37428
37429  else
37430
37431
37432  # Publish this variable in the help.
37433
37434
37435  if [ -z "${AR+x}" ]; then
37436    # The variable is not set by user, try to locate tool using the code snippet
37437    if test -n "$ac_tool_prefix"; then
37438  for ac_prog in ar
37439  do
37440    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37441set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37443$as_echo_n "checking for $ac_word... " >&6; }
37444if ${ac_cv_prog_AR+:} false; then :
37445  $as_echo_n "(cached) " >&6
37446else
37447  if test -n "$AR"; then
37448  ac_cv_prog_AR="$AR" # Let the user override the test.
37449else
37450as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37451for as_dir in $PATH
37452do
37453  IFS=$as_save_IFS
37454  test -z "$as_dir" && as_dir=.
37455    for ac_exec_ext in '' $ac_executable_extensions; do
37456  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37457    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37458    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37459    break 2
37460  fi
37461done
37462  done
37463IFS=$as_save_IFS
37464
37465fi
37466fi
37467AR=$ac_cv_prog_AR
37468if test -n "$AR"; then
37469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37470$as_echo "$AR" >&6; }
37471else
37472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37473$as_echo "no" >&6; }
37474fi
37475
37476
37477    test -n "$AR" && break
37478  done
37479fi
37480if test -z "$AR"; then
37481  ac_ct_AR=$AR
37482  for ac_prog in ar
37483do
37484  # Extract the first word of "$ac_prog", so it can be a program name with args.
37485set dummy $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_ac_ct_AR+:} false; then :
37489  $as_echo_n "(cached) " >&6
37490else
37491  if test -n "$ac_ct_AR"; then
37492  ac_cv_prog_ac_ct_AR="$ac_ct_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_ac_ct_AR="$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
37511ac_ct_AR=$ac_cv_prog_ac_ct_AR
37512if test -n "$ac_ct_AR"; then
37513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37514$as_echo "$ac_ct_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 "$ac_ct_AR" && break
37522done
37523
37524  if test "x$ac_ct_AR" = x; then
37525    AR=""
37526  else
37527    case $cross_compiling:$ac_tool_warned in
37528yes:)
37529{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37530$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37531ac_tool_warned=yes ;;
37532esac
37533    AR=$ac_ct_AR
37534  fi
37535fi
37536
37537  else
37538    # The variable is set, but is it from the command line or the environment?
37539
37540    # Try to remove the string !AR! from our list.
37541    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37542    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37543      # If it failed, the variable was not from the command line. Ignore it,
37544      # but warn the user (except for BASH, which is always set by the calling BASH).
37545      if test "xAR" != xBASH; then
37546        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37547$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37548      fi
37549      # Try to locate tool using the code snippet
37550      if test -n "$ac_tool_prefix"; then
37551  for ac_prog in ar
37552  do
37553    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37554set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37556$as_echo_n "checking for $ac_word... " >&6; }
37557if ${ac_cv_prog_AR+:} false; then :
37558  $as_echo_n "(cached) " >&6
37559else
37560  if test -n "$AR"; then
37561  ac_cv_prog_AR="$AR" # Let the user override the test.
37562else
37563as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37564for as_dir in $PATH
37565do
37566  IFS=$as_save_IFS
37567  test -z "$as_dir" && as_dir=.
37568    for ac_exec_ext in '' $ac_executable_extensions; do
37569  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37570    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37571    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37572    break 2
37573  fi
37574done
37575  done
37576IFS=$as_save_IFS
37577
37578fi
37579fi
37580AR=$ac_cv_prog_AR
37581if test -n "$AR"; then
37582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37583$as_echo "$AR" >&6; }
37584else
37585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37586$as_echo "no" >&6; }
37587fi
37588
37589
37590    test -n "$AR" && break
37591  done
37592fi
37593if test -z "$AR"; then
37594  ac_ct_AR=$AR
37595  for ac_prog in ar
37596do
37597  # Extract the first word of "$ac_prog", so it can be a program name with args.
37598set dummy $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_ac_ct_AR+:} false; then :
37602  $as_echo_n "(cached) " >&6
37603else
37604  if test -n "$ac_ct_AR"; then
37605  ac_cv_prog_ac_ct_AR="$ac_ct_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_ac_ct_AR="$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
37624ac_ct_AR=$ac_cv_prog_ac_ct_AR
37625if test -n "$ac_ct_AR"; then
37626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37627$as_echo "$ac_ct_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 "$ac_ct_AR" && break
37635done
37636
37637  if test "x$ac_ct_AR" = x; then
37638    AR=""
37639  else
37640    case $cross_compiling:$ac_tool_warned in
37641yes:)
37642{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37643$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37644ac_tool_warned=yes ;;
37645esac
37646    AR=$ac_ct_AR
37647  fi
37648fi
37649
37650    else
37651      # If it succeeded, then it was overridden by the user. We will use it
37652      # for the tool.
37653
37654      # First remove it from the list of overridden variables, so we can test
37655      # for unknown variables in the end.
37656      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37657
37658      # Check if we try to supply an empty value
37659      if test "x$AR" = x; then
37660        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37661$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37662        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37663$as_echo_n "checking for AR... " >&6; }
37664        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37665$as_echo "disabled" >&6; }
37666      else
37667        # Check if the provided tool contains a complete path.
37668        tool_specified="$AR"
37669        tool_basename="${tool_specified##*/}"
37670        if test "x$tool_basename" = "x$tool_specified"; then
37671          # A command without a complete path is provided, search $PATH.
37672          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37673$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37674          # Extract the first word of "$tool_basename", so it can be a program name with args.
37675set dummy $tool_basename; ac_word=$2
37676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37677$as_echo_n "checking for $ac_word... " >&6; }
37678if ${ac_cv_path_AR+:} false; then :
37679  $as_echo_n "(cached) " >&6
37680else
37681  case $AR in
37682  [\\/]* | ?:[\\/]*)
37683  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37684  ;;
37685  *)
37686  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37687for as_dir in $PATH
37688do
37689  IFS=$as_save_IFS
37690  test -z "$as_dir" && as_dir=.
37691    for ac_exec_ext in '' $ac_executable_extensions; do
37692  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37693    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37694    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37695    break 2
37696  fi
37697done
37698  done
37699IFS=$as_save_IFS
37700
37701  ;;
37702esac
37703fi
37704AR=$ac_cv_path_AR
37705if test -n "$AR"; then
37706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37707$as_echo "$AR" >&6; }
37708else
37709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37710$as_echo "no" >&6; }
37711fi
37712
37713
37714          if test "x$AR" = x; then
37715            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37716          fi
37717        else
37718          # Otherwise we believe it is a complete path. Use it as it is.
37719          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37720$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37721          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37722$as_echo_n "checking for AR... " >&6; }
37723          if test ! -x "$tool_specified"; then
37724            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37725$as_echo "not found" >&6; }
37726            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37727          fi
37728          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37729$as_echo "$tool_specified" >&6; }
37730        fi
37731      fi
37732    fi
37733
37734  fi
37735
37736
37737  fi
37738
37739  # Only process if variable expands to non-empty
37740
37741  if test "x$AR" != x; then
37742    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37743
37744  # First separate the path from the arguments. This will split at the first
37745  # space.
37746  complete="$AR"
37747  path="${complete%% *}"
37748  tmp="$complete EOL"
37749  arguments="${tmp#* }"
37750
37751  # Input might be given as Windows format, start by converting to
37752  # unix format.
37753  new_path=`$CYGPATH -u "$path"`
37754
37755  # Now try to locate executable using which
37756  new_path=`$WHICH "$new_path" 2> /dev/null`
37757  # bat and cmd files are not always considered executable in cygwin causing which
37758  # to not find them
37759  if test "x$new_path" = x \
37760      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37761      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37762    new_path=`$CYGPATH -u "$path"`
37763  fi
37764  if test "x$new_path" = x; then
37765    # Oops. Which didn't find the executable.
37766    # The splitting of arguments from the executable at a space might have been incorrect,
37767    # since paths with space are more likely in Windows. Give it another try with the whole
37768    # argument.
37769    path="$complete"
37770    arguments="EOL"
37771    new_path=`$CYGPATH -u "$path"`
37772    new_path=`$WHICH "$new_path" 2> /dev/null`
37773    # bat and cmd files are not always considered executable in cygwin causing which
37774    # to not find them
37775    if test "x$new_path" = x \
37776        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37777        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37778      new_path=`$CYGPATH -u "$path"`
37779    fi
37780    if test "x$new_path" = x; then
37781      # It's still not found. Now this is an unrecoverable error.
37782      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37783$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37784      has_space=`$ECHO "$complete" | $GREP " "`
37785      if test "x$has_space" != x; then
37786        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37787$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37788      fi
37789      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37790    fi
37791  fi
37792
37793  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37794  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37795  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37796  # "foo.exe" is OK but "foo" is an error.
37797  #
37798  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37799  # It is also a way to make sure we got the proper file name for the real test later on.
37800  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37801  if test "x$test_shortpath" = x; then
37802    # Short path failed, file does not exist as specified.
37803    # Try adding .exe or .cmd
37804    if test -f "${new_path}.exe"; then
37805      input_to_shortpath="${new_path}.exe"
37806    elif test -f "${new_path}.cmd"; then
37807      input_to_shortpath="${new_path}.cmd"
37808    else
37809      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
37810$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
37811      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37812$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37813      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37814    fi
37815  else
37816    input_to_shortpath="$new_path"
37817  fi
37818
37819  # Call helper function which possibly converts this using DOS-style short mode.
37820  # If so, the updated path is stored in $new_path.
37821  new_path="$input_to_shortpath"
37822
37823  input_path="$input_to_shortpath"
37824  # Check if we need to convert this using DOS-style short mode. If the path
37825  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37826  # take no chances and rewrite it.
37827  # Note: m4 eats our [], so we need to use [ and ] instead.
37828  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37829  if test "x$has_forbidden_chars" != x; then
37830    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37831    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37832    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37833    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37834      # Going to short mode and back again did indeed matter. Since short mode is
37835      # case insensitive, let's make it lowercase to improve readability.
37836      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37837      # Now convert it back to Unix-style (cygpath)
37838      input_path=`$CYGPATH -u "$shortmode_path"`
37839      new_path="$input_path"
37840    fi
37841  fi
37842
37843  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37844  if test "x$test_cygdrive_prefix" = x; then
37845    # As a simple fix, exclude /usr/bin since it's not a real path.
37846    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37847      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37848      # a path prefixed by /cygdrive for fixpath to work.
37849      new_path="$CYGWIN_ROOT_PATH$input_path"
37850    fi
37851  fi
37852
37853  # remove trailing .exe if any
37854  new_path="${new_path/%.exe/}"
37855
37856    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37857
37858  # First separate the path from the arguments. This will split at the first
37859  # space.
37860  complete="$AR"
37861  path="${complete%% *}"
37862  tmp="$complete EOL"
37863  arguments="${tmp#* }"
37864
37865  # Input might be given as Windows format, start by converting to
37866  # unix format.
37867  new_path="$path"
37868
37869  windows_path="$new_path"
37870  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37871    unix_path=`$CYGPATH -u "$windows_path"`
37872    new_path="$unix_path"
37873  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37874    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37875    new_path="$unix_path"
37876  fi
37877
37878
37879  # Now try to locate executable using which
37880  new_path=`$WHICH "$new_path" 2> /dev/null`
37881
37882  if test "x$new_path" = x; then
37883    # Oops. Which didn't find the executable.
37884    # The splitting of arguments from the executable at a space might have been incorrect,
37885    # since paths with space are more likely in Windows. Give it another try with the whole
37886    # argument.
37887    path="$complete"
37888    arguments="EOL"
37889    new_path="$path"
37890
37891  windows_path="$new_path"
37892  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37893    unix_path=`$CYGPATH -u "$windows_path"`
37894    new_path="$unix_path"
37895  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37896    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37897    new_path="$unix_path"
37898  fi
37899
37900
37901    new_path=`$WHICH "$new_path" 2> /dev/null`
37902    # bat and cmd files are not always considered executable in MSYS causing which
37903    # to not find them
37904    if test "x$new_path" = x \
37905        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37906        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37907      new_path="$path"
37908
37909  windows_path="$new_path"
37910  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37911    unix_path=`$CYGPATH -u "$windows_path"`
37912    new_path="$unix_path"
37913  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37914    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37915    new_path="$unix_path"
37916  fi
37917
37918    fi
37919
37920    if test "x$new_path" = x; then
37921      # It's still not found. Now this is an unrecoverable error.
37922      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37923$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37924      has_space=`$ECHO "$complete" | $GREP " "`
37925      if test "x$has_space" != x; then
37926        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37927$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37928      fi
37929      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37930    fi
37931  fi
37932
37933  # Now new_path has a complete unix path to the binary
37934  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37935    # Keep paths in /bin as-is, but remove trailing .exe if any
37936    new_path="${new_path/%.exe/}"
37937    # Do not save /bin paths to all_fixpath_prefixes!
37938  else
37939    # Not in mixed or Windows style, start by that.
37940    new_path=`cmd //c echo $new_path`
37941
37942  input_path="$new_path"
37943  # Check if we need to convert this using DOS-style short mode. If the path
37944  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37945  # take no chances and rewrite it.
37946  # Note: m4 eats our [], so we need to use [ and ] instead.
37947  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37948  if test "x$has_forbidden_chars" != x; then
37949    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37950    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37951  fi
37952
37953    # Output is in $new_path
37954
37955  windows_path="$new_path"
37956  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37957    unix_path=`$CYGPATH -u "$windows_path"`
37958    new_path="$unix_path"
37959  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37960    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37961    new_path="$unix_path"
37962  fi
37963
37964    # remove trailing .exe if any
37965    new_path="${new_path/%.exe/}"
37966
37967    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37968    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37969  fi
37970
37971    else
37972      # We're on a unix platform. Hooray! :)
37973      # First separate the path from the arguments. This will split at the first
37974      # space.
37975      complete="$AR"
37976      path="${complete%% *}"
37977      tmp="$complete EOL"
37978      arguments="${tmp#* }"
37979
37980      # Cannot rely on the command "which" here since it doesn't always work.
37981      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37982      if test -z "$is_absolute_path"; then
37983        # Path to executable is not absolute. Find it.
37984        IFS_save="$IFS"
37985        IFS=:
37986        for p in $PATH; do
37987          if test -f "$p/$path" && test -x "$p/$path"; then
37988            new_path="$p/$path"
37989            break
37990          fi
37991        done
37992        IFS="$IFS_save"
37993      else
37994        # This is an absolute path, we can use it without further modifications.
37995        new_path="$path"
37996      fi
37997
37998      if test "x$new_path" = x; then
37999        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38000$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38001        has_space=`$ECHO "$complete" | $GREP " "`
38002        if test "x$has_space" != x; then
38003          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38004$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38005        fi
38006        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38007      fi
38008    fi
38009
38010    # Now join together the path and the arguments once again
38011    if test "x$arguments" != xEOL; then
38012      new_complete="$new_path ${arguments% *}"
38013    else
38014      new_complete="$new_path"
38015    fi
38016
38017    if test "x$complete" != "x$new_complete"; then
38018      AR="$new_complete"
38019      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
38020$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
38021    fi
38022  fi
38023
38024
38025
38026  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
38027
38028
38029  # Publish this variable in the help.
38030
38031
38032  if [ -z "${LIPO+x}" ]; then
38033    # The variable is not set by user, try to locate tool using the code snippet
38034    for ac_prog in lipo
38035do
38036  # Extract the first word of "$ac_prog", so it can be a program name with args.
38037set dummy $ac_prog; ac_word=$2
38038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38039$as_echo_n "checking for $ac_word... " >&6; }
38040if ${ac_cv_path_LIPO+:} false; then :
38041  $as_echo_n "(cached) " >&6
38042else
38043  case $LIPO in
38044  [\\/]* | ?:[\\/]*)
38045  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38046  ;;
38047  *)
38048  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38049for as_dir in $PATH
38050do
38051  IFS=$as_save_IFS
38052  test -z "$as_dir" && as_dir=.
38053    for ac_exec_ext in '' $ac_executable_extensions; do
38054  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38055    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38056    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38057    break 2
38058  fi
38059done
38060  done
38061IFS=$as_save_IFS
38062
38063  ;;
38064esac
38065fi
38066LIPO=$ac_cv_path_LIPO
38067if test -n "$LIPO"; then
38068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38069$as_echo "$LIPO" >&6; }
38070else
38071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38072$as_echo "no" >&6; }
38073fi
38074
38075
38076  test -n "$LIPO" && break
38077done
38078
38079  else
38080    # The variable is set, but is it from the command line or the environment?
38081
38082    # Try to remove the string !LIPO! from our list.
38083    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
38084    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38085      # If it failed, the variable was not from the command line. Ignore it,
38086      # but warn the user (except for BASH, which is always set by the calling BASH).
38087      if test "xLIPO" != xBASH; then
38088        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
38089$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
38090      fi
38091      # Try to locate tool using the code snippet
38092      for ac_prog in lipo
38093do
38094  # Extract the first word of "$ac_prog", so it can be a program name with args.
38095set dummy $ac_prog; ac_word=$2
38096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38097$as_echo_n "checking for $ac_word... " >&6; }
38098if ${ac_cv_path_LIPO+:} false; then :
38099  $as_echo_n "(cached) " >&6
38100else
38101  case $LIPO in
38102  [\\/]* | ?:[\\/]*)
38103  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38104  ;;
38105  *)
38106  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38107for as_dir in $PATH
38108do
38109  IFS=$as_save_IFS
38110  test -z "$as_dir" && as_dir=.
38111    for ac_exec_ext in '' $ac_executable_extensions; do
38112  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38113    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38114    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38115    break 2
38116  fi
38117done
38118  done
38119IFS=$as_save_IFS
38120
38121  ;;
38122esac
38123fi
38124LIPO=$ac_cv_path_LIPO
38125if test -n "$LIPO"; then
38126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38127$as_echo "$LIPO" >&6; }
38128else
38129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38130$as_echo "no" >&6; }
38131fi
38132
38133
38134  test -n "$LIPO" && break
38135done
38136
38137    else
38138      # If it succeeded, then it was overridden by the user. We will use it
38139      # for the tool.
38140
38141      # First remove it from the list of overridden variables, so we can test
38142      # for unknown variables in the end.
38143      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38144
38145      # Check if we try to supply an empty value
38146      if test "x$LIPO" = x; then
38147        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
38148$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
38149        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38150$as_echo_n "checking for LIPO... " >&6; }
38151        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38152$as_echo "disabled" >&6; }
38153      else
38154        # Check if the provided tool contains a complete path.
38155        tool_specified="$LIPO"
38156        tool_basename="${tool_specified##*/}"
38157        if test "x$tool_basename" = "x$tool_specified"; then
38158          # A command without a complete path is provided, search $PATH.
38159          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
38160$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
38161          # Extract the first word of "$tool_basename", so it can be a program name with args.
38162set dummy $tool_basename; ac_word=$2
38163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38164$as_echo_n "checking for $ac_word... " >&6; }
38165if ${ac_cv_path_LIPO+:} false; then :
38166  $as_echo_n "(cached) " >&6
38167else
38168  case $LIPO in
38169  [\\/]* | ?:[\\/]*)
38170  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38171  ;;
38172  *)
38173  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38174for as_dir in $PATH
38175do
38176  IFS=$as_save_IFS
38177  test -z "$as_dir" && as_dir=.
38178    for ac_exec_ext in '' $ac_executable_extensions; do
38179  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38180    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38181    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38182    break 2
38183  fi
38184done
38185  done
38186IFS=$as_save_IFS
38187
38188  ;;
38189esac
38190fi
38191LIPO=$ac_cv_path_LIPO
38192if test -n "$LIPO"; then
38193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38194$as_echo "$LIPO" >&6; }
38195else
38196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38197$as_echo "no" >&6; }
38198fi
38199
38200
38201          if test "x$LIPO" = x; then
38202            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38203          fi
38204        else
38205          # Otherwise we believe it is a complete path. Use it as it is.
38206          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
38207$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
38208          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38209$as_echo_n "checking for LIPO... " >&6; }
38210          if test ! -x "$tool_specified"; then
38211            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38212$as_echo "not found" >&6; }
38213            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
38214          fi
38215          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38216$as_echo "$tool_specified" >&6; }
38217        fi
38218      fi
38219    fi
38220
38221  fi
38222
38223
38224
38225  # Only process if variable expands to non-empty
38226
38227  if test "x$LIPO" != x; then
38228    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38229
38230  # First separate the path from the arguments. This will split at the first
38231  # space.
38232  complete="$LIPO"
38233  path="${complete%% *}"
38234  tmp="$complete EOL"
38235  arguments="${tmp#* }"
38236
38237  # Input might be given as Windows format, start by converting to
38238  # unix format.
38239  new_path=`$CYGPATH -u "$path"`
38240
38241  # Now try to locate executable using which
38242  new_path=`$WHICH "$new_path" 2> /dev/null`
38243  # bat and cmd files are not always considered executable in cygwin causing which
38244  # to not find them
38245  if test "x$new_path" = x \
38246      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38247      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38248    new_path=`$CYGPATH -u "$path"`
38249  fi
38250  if test "x$new_path" = x; then
38251    # Oops. Which didn't find the executable.
38252    # The splitting of arguments from the executable at a space might have been incorrect,
38253    # since paths with space are more likely in Windows. Give it another try with the whole
38254    # argument.
38255    path="$complete"
38256    arguments="EOL"
38257    new_path=`$CYGPATH -u "$path"`
38258    new_path=`$WHICH "$new_path" 2> /dev/null`
38259    # bat and cmd files are not always considered executable in cygwin causing which
38260    # to not find them
38261    if test "x$new_path" = x \
38262        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38263        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38264      new_path=`$CYGPATH -u "$path"`
38265    fi
38266    if test "x$new_path" = x; then
38267      # It's still not found. Now this is an unrecoverable error.
38268      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38269$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38270      has_space=`$ECHO "$complete" | $GREP " "`
38271      if test "x$has_space" != x; then
38272        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38273$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38274      fi
38275      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38276    fi
38277  fi
38278
38279  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38280  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38281  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38282  # "foo.exe" is OK but "foo" is an error.
38283  #
38284  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38285  # It is also a way to make sure we got the proper file name for the real test later on.
38286  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38287  if test "x$test_shortpath" = x; then
38288    # Short path failed, file does not exist as specified.
38289    # Try adding .exe or .cmd
38290    if test -f "${new_path}.exe"; then
38291      input_to_shortpath="${new_path}.exe"
38292    elif test -f "${new_path}.cmd"; then
38293      input_to_shortpath="${new_path}.cmd"
38294    else
38295      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
38296$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
38297      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38298$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38299      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38300    fi
38301  else
38302    input_to_shortpath="$new_path"
38303  fi
38304
38305  # Call helper function which possibly converts this using DOS-style short mode.
38306  # If so, the updated path is stored in $new_path.
38307  new_path="$input_to_shortpath"
38308
38309  input_path="$input_to_shortpath"
38310  # Check if we need to convert this using DOS-style short mode. If the path
38311  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38312  # take no chances and rewrite it.
38313  # Note: m4 eats our [], so we need to use [ and ] instead.
38314  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38315  if test "x$has_forbidden_chars" != x; then
38316    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38317    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38318    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38319    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38320      # Going to short mode and back again did indeed matter. Since short mode is
38321      # case insensitive, let's make it lowercase to improve readability.
38322      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38323      # Now convert it back to Unix-style (cygpath)
38324      input_path=`$CYGPATH -u "$shortmode_path"`
38325      new_path="$input_path"
38326    fi
38327  fi
38328
38329  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38330  if test "x$test_cygdrive_prefix" = x; then
38331    # As a simple fix, exclude /usr/bin since it's not a real path.
38332    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38333      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38334      # a path prefixed by /cygdrive for fixpath to work.
38335      new_path="$CYGWIN_ROOT_PATH$input_path"
38336    fi
38337  fi
38338
38339  # remove trailing .exe if any
38340  new_path="${new_path/%.exe/}"
38341
38342    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38343
38344  # First separate the path from the arguments. This will split at the first
38345  # space.
38346  complete="$LIPO"
38347  path="${complete%% *}"
38348  tmp="$complete EOL"
38349  arguments="${tmp#* }"
38350
38351  # Input might be given as Windows format, start by converting to
38352  # unix format.
38353  new_path="$path"
38354
38355  windows_path="$new_path"
38356  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38357    unix_path=`$CYGPATH -u "$windows_path"`
38358    new_path="$unix_path"
38359  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38360    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38361    new_path="$unix_path"
38362  fi
38363
38364
38365  # Now try to locate executable using which
38366  new_path=`$WHICH "$new_path" 2> /dev/null`
38367
38368  if test "x$new_path" = x; then
38369    # Oops. Which didn't find the executable.
38370    # The splitting of arguments from the executable at a space might have been incorrect,
38371    # since paths with space are more likely in Windows. Give it another try with the whole
38372    # argument.
38373    path="$complete"
38374    arguments="EOL"
38375    new_path="$path"
38376
38377  windows_path="$new_path"
38378  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38379    unix_path=`$CYGPATH -u "$windows_path"`
38380    new_path="$unix_path"
38381  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38382    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38383    new_path="$unix_path"
38384  fi
38385
38386
38387    new_path=`$WHICH "$new_path" 2> /dev/null`
38388    # bat and cmd files are not always considered executable in MSYS causing which
38389    # to not find them
38390    if test "x$new_path" = x \
38391        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38392        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38393      new_path="$path"
38394
38395  windows_path="$new_path"
38396  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38397    unix_path=`$CYGPATH -u "$windows_path"`
38398    new_path="$unix_path"
38399  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38400    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38401    new_path="$unix_path"
38402  fi
38403
38404    fi
38405
38406    if test "x$new_path" = x; then
38407      # It's still not found. Now this is an unrecoverable error.
38408      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38409$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38410      has_space=`$ECHO "$complete" | $GREP " "`
38411      if test "x$has_space" != x; then
38412        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38413$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38414      fi
38415      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38416    fi
38417  fi
38418
38419  # Now new_path has a complete unix path to the binary
38420  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38421    # Keep paths in /bin as-is, but remove trailing .exe if any
38422    new_path="${new_path/%.exe/}"
38423    # Do not save /bin paths to all_fixpath_prefixes!
38424  else
38425    # Not in mixed or Windows style, start by that.
38426    new_path=`cmd //c echo $new_path`
38427
38428  input_path="$new_path"
38429  # Check if we need to convert this using DOS-style short mode. If the path
38430  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38431  # take no chances and rewrite it.
38432  # Note: m4 eats our [], so we need to use [ and ] instead.
38433  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38434  if test "x$has_forbidden_chars" != x; then
38435    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38436    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38437  fi
38438
38439    # Output is in $new_path
38440
38441  windows_path="$new_path"
38442  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38443    unix_path=`$CYGPATH -u "$windows_path"`
38444    new_path="$unix_path"
38445  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38446    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38447    new_path="$unix_path"
38448  fi
38449
38450    # remove trailing .exe if any
38451    new_path="${new_path/%.exe/}"
38452
38453    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38454    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38455  fi
38456
38457    else
38458      # We're on a unix platform. Hooray! :)
38459      # First separate the path from the arguments. This will split at the first
38460      # space.
38461      complete="$LIPO"
38462      path="${complete%% *}"
38463      tmp="$complete EOL"
38464      arguments="${tmp#* }"
38465
38466      # Cannot rely on the command "which" here since it doesn't always work.
38467      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38468      if test -z "$is_absolute_path"; then
38469        # Path to executable is not absolute. Find it.
38470        IFS_save="$IFS"
38471        IFS=:
38472        for p in $PATH; do
38473          if test -f "$p/$path" && test -x "$p/$path"; then
38474            new_path="$p/$path"
38475            break
38476          fi
38477        done
38478        IFS="$IFS_save"
38479      else
38480        # This is an absolute path, we can use it without further modifications.
38481        new_path="$path"
38482      fi
38483
38484      if test "x$new_path" = x; then
38485        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38486$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38487        has_space=`$ECHO "$complete" | $GREP " "`
38488        if test "x$has_space" != x; then
38489          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38490$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38491        fi
38492        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38493      fi
38494    fi
38495
38496    # Now join together the path and the arguments once again
38497    if test "x$arguments" != xEOL; then
38498      new_complete="$new_path ${arguments% *}"
38499    else
38500      new_complete="$new_path"
38501    fi
38502
38503    if test "x$complete" != "x$new_complete"; then
38504      LIPO="$new_complete"
38505      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
38506$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
38507    fi
38508  fi
38509
38510  fi
38511
38512  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
38513    # Extract the first word of "mt", so it can be a program name with args.
38514set dummy mt; ac_word=$2
38515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38516$as_echo_n "checking for $ac_word... " >&6; }
38517if ${ac_cv_prog_MT+:} false; then :
38518  $as_echo_n "(cached) " >&6
38519else
38520  if test -n "$MT"; then
38521  ac_cv_prog_MT="$MT" # Let the user override the test.
38522else
38523  ac_prog_rejected=no
38524as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38525for as_dir in $PATH
38526do
38527  IFS=$as_save_IFS
38528  test -z "$as_dir" && as_dir=.
38529    for ac_exec_ext in '' $ac_executable_extensions; do
38530  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38531    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
38532       ac_prog_rejected=yes
38533       continue
38534     fi
38535    ac_cv_prog_MT="mt"
38536    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38537    break 2
38538  fi
38539done
38540  done
38541IFS=$as_save_IFS
38542
38543if test $ac_prog_rejected = yes; then
38544  # We found a bogon in the path, so make sure we never use it.
38545  set dummy $ac_cv_prog_MT
38546  shift
38547  if test $# != 0; then
38548    # We chose a different compiler from the bogus one.
38549    # However, it has the same basename, so the bogon will be chosen
38550    # first if we set MT to just the basename; use the full file name.
38551    shift
38552    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
38553  fi
38554fi
38555fi
38556fi
38557MT=$ac_cv_prog_MT
38558if test -n "$MT"; then
38559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
38560$as_echo "$MT" >&6; }
38561else
38562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38563$as_echo "no" >&6; }
38564fi
38565
38566
38567
38568  # Only process if variable expands to non-empty
38569
38570  if test "x$MT" != x; then
38571    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38572
38573  # First separate the path from the arguments. This will split at the first
38574  # space.
38575  complete="$MT"
38576  path="${complete%% *}"
38577  tmp="$complete EOL"
38578  arguments="${tmp#* }"
38579
38580  # Input might be given as Windows format, start by converting to
38581  # unix format.
38582  new_path=`$CYGPATH -u "$path"`
38583
38584  # Now try to locate executable using which
38585  new_path=`$WHICH "$new_path" 2> /dev/null`
38586  # bat and cmd files are not always considered executable in cygwin causing which
38587  # to not find them
38588  if test "x$new_path" = x \
38589      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38590      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38591    new_path=`$CYGPATH -u "$path"`
38592  fi
38593  if test "x$new_path" = x; then
38594    # Oops. Which didn't find the executable.
38595    # The splitting of arguments from the executable at a space might have been incorrect,
38596    # since paths with space are more likely in Windows. Give it another try with the whole
38597    # argument.
38598    path="$complete"
38599    arguments="EOL"
38600    new_path=`$CYGPATH -u "$path"`
38601    new_path=`$WHICH "$new_path" 2> /dev/null`
38602    # bat and cmd files are not always considered executable in cygwin causing which
38603    # to not find them
38604    if test "x$new_path" = x \
38605        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38606        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38607      new_path=`$CYGPATH -u "$path"`
38608    fi
38609    if test "x$new_path" = x; then
38610      # It's still not found. Now this is an unrecoverable error.
38611      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38612$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38613      has_space=`$ECHO "$complete" | $GREP " "`
38614      if test "x$has_space" != x; then
38615        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38616$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38617      fi
38618      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38619    fi
38620  fi
38621
38622  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38623  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38624  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38625  # "foo.exe" is OK but "foo" is an error.
38626  #
38627  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38628  # It is also a way to make sure we got the proper file name for the real test later on.
38629  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38630  if test "x$test_shortpath" = x; then
38631    # Short path failed, file does not exist as specified.
38632    # Try adding .exe or .cmd
38633    if test -f "${new_path}.exe"; then
38634      input_to_shortpath="${new_path}.exe"
38635    elif test -f "${new_path}.cmd"; then
38636      input_to_shortpath="${new_path}.cmd"
38637    else
38638      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
38639$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
38640      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38641$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38642      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38643    fi
38644  else
38645    input_to_shortpath="$new_path"
38646  fi
38647
38648  # Call helper function which possibly converts this using DOS-style short mode.
38649  # If so, the updated path is stored in $new_path.
38650  new_path="$input_to_shortpath"
38651
38652  input_path="$input_to_shortpath"
38653  # Check if we need to convert this using DOS-style short mode. If the path
38654  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38655  # take no chances and rewrite it.
38656  # Note: m4 eats our [], so we need to use [ and ] instead.
38657  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38658  if test "x$has_forbidden_chars" != x; then
38659    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38660    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38661    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38662    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38663      # Going to short mode and back again did indeed matter. Since short mode is
38664      # case insensitive, let's make it lowercase to improve readability.
38665      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38666      # Now convert it back to Unix-style (cygpath)
38667      input_path=`$CYGPATH -u "$shortmode_path"`
38668      new_path="$input_path"
38669    fi
38670  fi
38671
38672  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38673  if test "x$test_cygdrive_prefix" = x; then
38674    # As a simple fix, exclude /usr/bin since it's not a real path.
38675    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38676      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38677      # a path prefixed by /cygdrive for fixpath to work.
38678      new_path="$CYGWIN_ROOT_PATH$input_path"
38679    fi
38680  fi
38681
38682  # remove trailing .exe if any
38683  new_path="${new_path/%.exe/}"
38684
38685    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38686
38687  # First separate the path from the arguments. This will split at the first
38688  # space.
38689  complete="$MT"
38690  path="${complete%% *}"
38691  tmp="$complete EOL"
38692  arguments="${tmp#* }"
38693
38694  # Input might be given as Windows format, start by converting to
38695  # unix format.
38696  new_path="$path"
38697
38698  windows_path="$new_path"
38699  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38700    unix_path=`$CYGPATH -u "$windows_path"`
38701    new_path="$unix_path"
38702  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38703    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38704    new_path="$unix_path"
38705  fi
38706
38707
38708  # Now try to locate executable using which
38709  new_path=`$WHICH "$new_path" 2> /dev/null`
38710
38711  if test "x$new_path" = x; then
38712    # Oops. Which didn't find the executable.
38713    # The splitting of arguments from the executable at a space might have been incorrect,
38714    # since paths with space are more likely in Windows. Give it another try with the whole
38715    # argument.
38716    path="$complete"
38717    arguments="EOL"
38718    new_path="$path"
38719
38720  windows_path="$new_path"
38721  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38722    unix_path=`$CYGPATH -u "$windows_path"`
38723    new_path="$unix_path"
38724  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38725    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38726    new_path="$unix_path"
38727  fi
38728
38729
38730    new_path=`$WHICH "$new_path" 2> /dev/null`
38731    # bat and cmd files are not always considered executable in MSYS causing which
38732    # to not find them
38733    if test "x$new_path" = x \
38734        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38735        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38736      new_path="$path"
38737
38738  windows_path="$new_path"
38739  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38740    unix_path=`$CYGPATH -u "$windows_path"`
38741    new_path="$unix_path"
38742  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38743    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38744    new_path="$unix_path"
38745  fi
38746
38747    fi
38748
38749    if test "x$new_path" = x; then
38750      # It's still not found. Now this is an unrecoverable error.
38751      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38752$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38753      has_space=`$ECHO "$complete" | $GREP " "`
38754      if test "x$has_space" != x; then
38755        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38756$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38757      fi
38758      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38759    fi
38760  fi
38761
38762  # Now new_path has a complete unix path to the binary
38763  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38764    # Keep paths in /bin as-is, but remove trailing .exe if any
38765    new_path="${new_path/%.exe/}"
38766    # Do not save /bin paths to all_fixpath_prefixes!
38767  else
38768    # Not in mixed or Windows style, start by that.
38769    new_path=`cmd //c echo $new_path`
38770
38771  input_path="$new_path"
38772  # Check if we need to convert this using DOS-style short mode. If the path
38773  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38774  # take no chances and rewrite it.
38775  # Note: m4 eats our [], so we need to use [ and ] instead.
38776  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38777  if test "x$has_forbidden_chars" != x; then
38778    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38779    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38780  fi
38781
38782    # Output is in $new_path
38783
38784  windows_path="$new_path"
38785  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38786    unix_path=`$CYGPATH -u "$windows_path"`
38787    new_path="$unix_path"
38788  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38789    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38790    new_path="$unix_path"
38791  fi
38792
38793    # remove trailing .exe if any
38794    new_path="${new_path/%.exe/}"
38795
38796    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38797    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38798  fi
38799
38800    else
38801      # We're on a unix platform. Hooray! :)
38802      # First separate the path from the arguments. This will split at the first
38803      # space.
38804      complete="$MT"
38805      path="${complete%% *}"
38806      tmp="$complete EOL"
38807      arguments="${tmp#* }"
38808
38809      # Cannot rely on the command "which" here since it doesn't always work.
38810      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38811      if test -z "$is_absolute_path"; then
38812        # Path to executable is not absolute. Find it.
38813        IFS_save="$IFS"
38814        IFS=:
38815        for p in $PATH; do
38816          if test -f "$p/$path" && test -x "$p/$path"; then
38817            new_path="$p/$path"
38818            break
38819          fi
38820        done
38821        IFS="$IFS_save"
38822      else
38823        # This is an absolute path, we can use it without further modifications.
38824        new_path="$path"
38825      fi
38826
38827      if test "x$new_path" = x; then
38828        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38829$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38830        has_space=`$ECHO "$complete" | $GREP " "`
38831        if test "x$has_space" != x; then
38832          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38833$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38834        fi
38835        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38836      fi
38837    fi
38838
38839    # Now join together the path and the arguments once again
38840    if test "x$arguments" != xEOL; then
38841      new_complete="$new_path ${arguments% *}"
38842    else
38843      new_complete="$new_path"
38844    fi
38845
38846    if test "x$complete" != "x$new_complete"; then
38847      MT="$new_complete"
38848      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
38849$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
38850    fi
38851  fi
38852
38853    # Setup the resource compiler (RC)
38854    # Extract the first word of "rc", so it can be a program name with args.
38855set dummy rc; ac_word=$2
38856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38857$as_echo_n "checking for $ac_word... " >&6; }
38858if ${ac_cv_prog_RC+:} false; then :
38859  $as_echo_n "(cached) " >&6
38860else
38861  if test -n "$RC"; then
38862  ac_cv_prog_RC="$RC" # Let the user override the test.
38863else
38864  ac_prog_rejected=no
38865as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38866for as_dir in $PATH
38867do
38868  IFS=$as_save_IFS
38869  test -z "$as_dir" && as_dir=.
38870    for ac_exec_ext in '' $ac_executable_extensions; do
38871  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38872    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
38873       ac_prog_rejected=yes
38874       continue
38875     fi
38876    ac_cv_prog_RC="rc"
38877    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38878    break 2
38879  fi
38880done
38881  done
38882IFS=$as_save_IFS
38883
38884if test $ac_prog_rejected = yes; then
38885  # We found a bogon in the path, so make sure we never use it.
38886  set dummy $ac_cv_prog_RC
38887  shift
38888  if test $# != 0; then
38889    # We chose a different compiler from the bogus one.
38890    # However, it has the same basename, so the bogon will be chosen
38891    # first if we set RC to just the basename; use the full file name.
38892    shift
38893    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
38894  fi
38895fi
38896fi
38897fi
38898RC=$ac_cv_prog_RC
38899if test -n "$RC"; then
38900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
38901$as_echo "$RC" >&6; }
38902else
38903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38904$as_echo "no" >&6; }
38905fi
38906
38907
38908
38909  # Only process if variable expands to non-empty
38910
38911  if test "x$RC" != x; then
38912    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38913
38914  # First separate the path from the arguments. This will split at the first
38915  # space.
38916  complete="$RC"
38917  path="${complete%% *}"
38918  tmp="$complete EOL"
38919  arguments="${tmp#* }"
38920
38921  # Input might be given as Windows format, start by converting to
38922  # unix format.
38923  new_path=`$CYGPATH -u "$path"`
38924
38925  # Now try to locate executable using which
38926  new_path=`$WHICH "$new_path" 2> /dev/null`
38927  # bat and cmd files are not always considered executable in cygwin causing which
38928  # to not find them
38929  if test "x$new_path" = x \
38930      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38931      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38932    new_path=`$CYGPATH -u "$path"`
38933  fi
38934  if test "x$new_path" = x; then
38935    # Oops. Which didn't find the executable.
38936    # The splitting of arguments from the executable at a space might have been incorrect,
38937    # since paths with space are more likely in Windows. Give it another try with the whole
38938    # argument.
38939    path="$complete"
38940    arguments="EOL"
38941    new_path=`$CYGPATH -u "$path"`
38942    new_path=`$WHICH "$new_path" 2> /dev/null`
38943    # bat and cmd files are not always considered executable in cygwin causing which
38944    # to not find them
38945    if test "x$new_path" = x \
38946        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38947        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38948      new_path=`$CYGPATH -u "$path"`
38949    fi
38950    if test "x$new_path" = x; then
38951      # It's still not found. Now this is an unrecoverable error.
38952      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38953$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38954      has_space=`$ECHO "$complete" | $GREP " "`
38955      if test "x$has_space" != x; then
38956        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38957$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38958      fi
38959      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38960    fi
38961  fi
38962
38963  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38964  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38965  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38966  # "foo.exe" is OK but "foo" is an error.
38967  #
38968  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38969  # It is also a way to make sure we got the proper file name for the real test later on.
38970  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38971  if test "x$test_shortpath" = x; then
38972    # Short path failed, file does not exist as specified.
38973    # Try adding .exe or .cmd
38974    if test -f "${new_path}.exe"; then
38975      input_to_shortpath="${new_path}.exe"
38976    elif test -f "${new_path}.cmd"; then
38977      input_to_shortpath="${new_path}.cmd"
38978    else
38979      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
38980$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
38981      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38982$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38983      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38984    fi
38985  else
38986    input_to_shortpath="$new_path"
38987  fi
38988
38989  # Call helper function which possibly converts this using DOS-style short mode.
38990  # If so, the updated path is stored in $new_path.
38991  new_path="$input_to_shortpath"
38992
38993  input_path="$input_to_shortpath"
38994  # Check if we need to convert this using DOS-style short mode. If the path
38995  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38996  # take no chances and rewrite it.
38997  # Note: m4 eats our [], so we need to use [ and ] instead.
38998  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38999  if test "x$has_forbidden_chars" != x; then
39000    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39001    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39002    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39003    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39004      # Going to short mode and back again did indeed matter. Since short mode is
39005      # case insensitive, let's make it lowercase to improve readability.
39006      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39007      # Now convert it back to Unix-style (cygpath)
39008      input_path=`$CYGPATH -u "$shortmode_path"`
39009      new_path="$input_path"
39010    fi
39011  fi
39012
39013  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39014  if test "x$test_cygdrive_prefix" = x; then
39015    # As a simple fix, exclude /usr/bin since it's not a real path.
39016    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39017      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39018      # a path prefixed by /cygdrive for fixpath to work.
39019      new_path="$CYGWIN_ROOT_PATH$input_path"
39020    fi
39021  fi
39022
39023  # remove trailing .exe if any
39024  new_path="${new_path/%.exe/}"
39025
39026    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39027
39028  # First separate the path from the arguments. This will split at the first
39029  # space.
39030  complete="$RC"
39031  path="${complete%% *}"
39032  tmp="$complete EOL"
39033  arguments="${tmp#* }"
39034
39035  # Input might be given as Windows format, start by converting to
39036  # unix format.
39037  new_path="$path"
39038
39039  windows_path="$new_path"
39040  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39041    unix_path=`$CYGPATH -u "$windows_path"`
39042    new_path="$unix_path"
39043  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39044    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39045    new_path="$unix_path"
39046  fi
39047
39048
39049  # Now try to locate executable using which
39050  new_path=`$WHICH "$new_path" 2> /dev/null`
39051
39052  if test "x$new_path" = x; then
39053    # Oops. Which didn't find the executable.
39054    # The splitting of arguments from the executable at a space might have been incorrect,
39055    # since paths with space are more likely in Windows. Give it another try with the whole
39056    # argument.
39057    path="$complete"
39058    arguments="EOL"
39059    new_path="$path"
39060
39061  windows_path="$new_path"
39062  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39063    unix_path=`$CYGPATH -u "$windows_path"`
39064    new_path="$unix_path"
39065  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39066    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39067    new_path="$unix_path"
39068  fi
39069
39070
39071    new_path=`$WHICH "$new_path" 2> /dev/null`
39072    # bat and cmd files are not always considered executable in MSYS causing which
39073    # to not find them
39074    if test "x$new_path" = x \
39075        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39076        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39077      new_path="$path"
39078
39079  windows_path="$new_path"
39080  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39081    unix_path=`$CYGPATH -u "$windows_path"`
39082    new_path="$unix_path"
39083  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39084    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39085    new_path="$unix_path"
39086  fi
39087
39088    fi
39089
39090    if test "x$new_path" = x; then
39091      # It's still not found. Now this is an unrecoverable error.
39092      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39093$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39094      has_space=`$ECHO "$complete" | $GREP " "`
39095      if test "x$has_space" != x; then
39096        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39097$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39098      fi
39099      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39100    fi
39101  fi
39102
39103  # Now new_path has a complete unix path to the binary
39104  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39105    # Keep paths in /bin as-is, but remove trailing .exe if any
39106    new_path="${new_path/%.exe/}"
39107    # Do not save /bin paths to all_fixpath_prefixes!
39108  else
39109    # Not in mixed or Windows style, start by that.
39110    new_path=`cmd //c echo $new_path`
39111
39112  input_path="$new_path"
39113  # Check if we need to convert this using DOS-style short mode. If the path
39114  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39115  # take no chances and rewrite it.
39116  # Note: m4 eats our [], so we need to use [ and ] instead.
39117  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39118  if test "x$has_forbidden_chars" != x; then
39119    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39120    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39121  fi
39122
39123    # Output is in $new_path
39124
39125  windows_path="$new_path"
39126  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39127    unix_path=`$CYGPATH -u "$windows_path"`
39128    new_path="$unix_path"
39129  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39130    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39131    new_path="$unix_path"
39132  fi
39133
39134    # remove trailing .exe if any
39135    new_path="${new_path/%.exe/}"
39136
39137    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39138    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39139  fi
39140
39141    else
39142      # We're on a unix platform. Hooray! :)
39143      # First separate the path from the arguments. This will split at the first
39144      # space.
39145      complete="$RC"
39146      path="${complete%% *}"
39147      tmp="$complete EOL"
39148      arguments="${tmp#* }"
39149
39150      # Cannot rely on the command "which" here since it doesn't always work.
39151      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39152      if test -z "$is_absolute_path"; then
39153        # Path to executable is not absolute. Find it.
39154        IFS_save="$IFS"
39155        IFS=:
39156        for p in $PATH; do
39157          if test -f "$p/$path" && test -x "$p/$path"; then
39158            new_path="$p/$path"
39159            break
39160          fi
39161        done
39162        IFS="$IFS_save"
39163      else
39164        # This is an absolute path, we can use it without further modifications.
39165        new_path="$path"
39166      fi
39167
39168      if test "x$new_path" = x; then
39169        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39170$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39171        has_space=`$ECHO "$complete" | $GREP " "`
39172        if test "x$has_space" != x; then
39173          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39174$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39175        fi
39176        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39177      fi
39178    fi
39179
39180    # Now join together the path and the arguments once again
39181    if test "x$arguments" != xEOL; then
39182      new_complete="$new_path ${arguments% *}"
39183    else
39184      new_complete="$new_path"
39185    fi
39186
39187    if test "x$complete" != "x$new_complete"; then
39188      RC="$new_complete"
39189      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
39190$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
39191    fi
39192  fi
39193
39194    # Extract the first word of "dumpbin", so it can be a program name with args.
39195set dummy dumpbin; ac_word=$2
39196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39197$as_echo_n "checking for $ac_word... " >&6; }
39198if ${ac_cv_prog_DUMPBIN+:} false; then :
39199  $as_echo_n "(cached) " >&6
39200else
39201  if test -n "$DUMPBIN"; then
39202  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
39203else
39204as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39205for as_dir in $PATH
39206do
39207  IFS=$as_save_IFS
39208  test -z "$as_dir" && as_dir=.
39209    for ac_exec_ext in '' $ac_executable_extensions; do
39210  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39211    ac_cv_prog_DUMPBIN="dumpbin"
39212    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39213    break 2
39214  fi
39215done
39216  done
39217IFS=$as_save_IFS
39218
39219fi
39220fi
39221DUMPBIN=$ac_cv_prog_DUMPBIN
39222if test -n "$DUMPBIN"; then
39223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
39224$as_echo "$DUMPBIN" >&6; }
39225else
39226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39227$as_echo "no" >&6; }
39228fi
39229
39230
39231
39232  # Only process if variable expands to non-empty
39233
39234  if test "x$DUMPBIN" != x; then
39235    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39236
39237  # First separate the path from the arguments. This will split at the first
39238  # space.
39239  complete="$DUMPBIN"
39240  path="${complete%% *}"
39241  tmp="$complete EOL"
39242  arguments="${tmp#* }"
39243
39244  # Input might be given as Windows format, start by converting to
39245  # unix format.
39246  new_path=`$CYGPATH -u "$path"`
39247
39248  # Now try to locate executable using which
39249  new_path=`$WHICH "$new_path" 2> /dev/null`
39250  # bat and cmd files are not always considered executable in cygwin causing which
39251  # to not find them
39252  if test "x$new_path" = x \
39253      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39254      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39255    new_path=`$CYGPATH -u "$path"`
39256  fi
39257  if test "x$new_path" = x; then
39258    # Oops. Which didn't find the executable.
39259    # The splitting of arguments from the executable at a space might have been incorrect,
39260    # since paths with space are more likely in Windows. Give it another try with the whole
39261    # argument.
39262    path="$complete"
39263    arguments="EOL"
39264    new_path=`$CYGPATH -u "$path"`
39265    new_path=`$WHICH "$new_path" 2> /dev/null`
39266    # bat and cmd files are not always considered executable in cygwin causing which
39267    # to not find them
39268    if test "x$new_path" = x \
39269        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39270        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39271      new_path=`$CYGPATH -u "$path"`
39272    fi
39273    if test "x$new_path" = x; then
39274      # It's still not found. Now this is an unrecoverable error.
39275      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39276$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39277      has_space=`$ECHO "$complete" | $GREP " "`
39278      if test "x$has_space" != x; then
39279        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39280$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39281      fi
39282      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39283    fi
39284  fi
39285
39286  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39287  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39288  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39289  # "foo.exe" is OK but "foo" is an error.
39290  #
39291  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39292  # It is also a way to make sure we got the proper file name for the real test later on.
39293  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39294  if test "x$test_shortpath" = x; then
39295    # Short path failed, file does not exist as specified.
39296    # Try adding .exe or .cmd
39297    if test -f "${new_path}.exe"; then
39298      input_to_shortpath="${new_path}.exe"
39299    elif test -f "${new_path}.cmd"; then
39300      input_to_shortpath="${new_path}.cmd"
39301    else
39302      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
39303$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
39304      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39305$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39306      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39307    fi
39308  else
39309    input_to_shortpath="$new_path"
39310  fi
39311
39312  # Call helper function which possibly converts this using DOS-style short mode.
39313  # If so, the updated path is stored in $new_path.
39314  new_path="$input_to_shortpath"
39315
39316  input_path="$input_to_shortpath"
39317  # Check if we need to convert this using DOS-style short mode. If the path
39318  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39319  # take no chances and rewrite it.
39320  # Note: m4 eats our [], so we need to use [ and ] instead.
39321  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39322  if test "x$has_forbidden_chars" != x; then
39323    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39324    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39325    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39326    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39327      # Going to short mode and back again did indeed matter. Since short mode is
39328      # case insensitive, let's make it lowercase to improve readability.
39329      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39330      # Now convert it back to Unix-style (cygpath)
39331      input_path=`$CYGPATH -u "$shortmode_path"`
39332      new_path="$input_path"
39333    fi
39334  fi
39335
39336  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39337  if test "x$test_cygdrive_prefix" = x; then
39338    # As a simple fix, exclude /usr/bin since it's not a real path.
39339    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39340      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39341      # a path prefixed by /cygdrive for fixpath to work.
39342      new_path="$CYGWIN_ROOT_PATH$input_path"
39343    fi
39344  fi
39345
39346  # remove trailing .exe if any
39347  new_path="${new_path/%.exe/}"
39348
39349    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39350
39351  # First separate the path from the arguments. This will split at the first
39352  # space.
39353  complete="$DUMPBIN"
39354  path="${complete%% *}"
39355  tmp="$complete EOL"
39356  arguments="${tmp#* }"
39357
39358  # Input might be given as Windows format, start by converting to
39359  # unix format.
39360  new_path="$path"
39361
39362  windows_path="$new_path"
39363  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39364    unix_path=`$CYGPATH -u "$windows_path"`
39365    new_path="$unix_path"
39366  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39367    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39368    new_path="$unix_path"
39369  fi
39370
39371
39372  # Now try to locate executable using which
39373  new_path=`$WHICH "$new_path" 2> /dev/null`
39374
39375  if test "x$new_path" = x; then
39376    # Oops. Which didn't find the executable.
39377    # The splitting of arguments from the executable at a space might have been incorrect,
39378    # since paths with space are more likely in Windows. Give it another try with the whole
39379    # argument.
39380    path="$complete"
39381    arguments="EOL"
39382    new_path="$path"
39383
39384  windows_path="$new_path"
39385  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39386    unix_path=`$CYGPATH -u "$windows_path"`
39387    new_path="$unix_path"
39388  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39389    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39390    new_path="$unix_path"
39391  fi
39392
39393
39394    new_path=`$WHICH "$new_path" 2> /dev/null`
39395    # bat and cmd files are not always considered executable in MSYS causing which
39396    # to not find them
39397    if test "x$new_path" = x \
39398        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39399        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39400      new_path="$path"
39401
39402  windows_path="$new_path"
39403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39404    unix_path=`$CYGPATH -u "$windows_path"`
39405    new_path="$unix_path"
39406  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39407    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39408    new_path="$unix_path"
39409  fi
39410
39411    fi
39412
39413    if test "x$new_path" = x; then
39414      # It's still not found. Now this is an unrecoverable error.
39415      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39416$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39417      has_space=`$ECHO "$complete" | $GREP " "`
39418      if test "x$has_space" != x; then
39419        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39420$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39421      fi
39422      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39423    fi
39424  fi
39425
39426  # Now new_path has a complete unix path to the binary
39427  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39428    # Keep paths in /bin as-is, but remove trailing .exe if any
39429    new_path="${new_path/%.exe/}"
39430    # Do not save /bin paths to all_fixpath_prefixes!
39431  else
39432    # Not in mixed or Windows style, start by that.
39433    new_path=`cmd //c echo $new_path`
39434
39435  input_path="$new_path"
39436  # Check if we need to convert this using DOS-style short mode. If the path
39437  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39438  # take no chances and rewrite it.
39439  # Note: m4 eats our [], so we need to use [ and ] instead.
39440  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39441  if test "x$has_forbidden_chars" != x; then
39442    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39443    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39444  fi
39445
39446    # Output is in $new_path
39447
39448  windows_path="$new_path"
39449  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39450    unix_path=`$CYGPATH -u "$windows_path"`
39451    new_path="$unix_path"
39452  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39453    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39454    new_path="$unix_path"
39455  fi
39456
39457    # remove trailing .exe if any
39458    new_path="${new_path/%.exe/}"
39459
39460    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39461    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39462  fi
39463
39464    else
39465      # We're on a unix platform. Hooray! :)
39466      # First separate the path from the arguments. This will split at the first
39467      # space.
39468      complete="$DUMPBIN"
39469      path="${complete%% *}"
39470      tmp="$complete EOL"
39471      arguments="${tmp#* }"
39472
39473      # Cannot rely on the command "which" here since it doesn't always work.
39474      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39475      if test -z "$is_absolute_path"; then
39476        # Path to executable is not absolute. Find it.
39477        IFS_save="$IFS"
39478        IFS=:
39479        for p in $PATH; do
39480          if test -f "$p/$path" && test -x "$p/$path"; then
39481            new_path="$p/$path"
39482            break
39483          fi
39484        done
39485        IFS="$IFS_save"
39486      else
39487        # This is an absolute path, we can use it without further modifications.
39488        new_path="$path"
39489      fi
39490
39491      if test "x$new_path" = x; then
39492        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39493$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39494        has_space=`$ECHO "$complete" | $GREP " "`
39495        if test "x$has_space" != x; then
39496          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39497$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39498        fi
39499        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39500      fi
39501    fi
39502
39503    # Now join together the path and the arguments once again
39504    if test "x$arguments" != xEOL; then
39505      new_complete="$new_path ${arguments% *}"
39506    else
39507      new_complete="$new_path"
39508    fi
39509
39510    if test "x$complete" != "x$new_complete"; then
39511      DUMPBIN="$new_complete"
39512      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
39513$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
39514    fi
39515  fi
39516
39517    # We need to check for 'msbuild.exe' because at the place where we expect to
39518    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
39519    # won't find the 'msbuild.exe' executable in that case (and the
39520    # 'ac_executable_extensions' is unusable due to performance reasons).
39521    # Notice that we intentionally don't fix up the path to MSBUILD because we
39522    # will call it in a DOS shell during freetype detection on Windows (see
39523    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
39524    # Extract the first word of "msbuild.exe", so it can be a program name with args.
39525set dummy msbuild.exe; ac_word=$2
39526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39527$as_echo_n "checking for $ac_word... " >&6; }
39528if ${ac_cv_prog_MSBUILD+:} false; then :
39529  $as_echo_n "(cached) " >&6
39530else
39531  if test -n "$MSBUILD"; then
39532  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
39533else
39534as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39535for as_dir in $PATH
39536do
39537  IFS=$as_save_IFS
39538  test -z "$as_dir" && as_dir=.
39539    for ac_exec_ext in '' $ac_executable_extensions; do
39540  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39541    ac_cv_prog_MSBUILD="msbuild.exe"
39542    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39543    break 2
39544  fi
39545done
39546  done
39547IFS=$as_save_IFS
39548
39549fi
39550fi
39551MSBUILD=$ac_cv_prog_MSBUILD
39552if test -n "$MSBUILD"; then
39553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
39554$as_echo "$MSBUILD" >&6; }
39555else
39556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39557$as_echo "no" >&6; }
39558fi
39559
39560
39561  fi
39562
39563  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
39564
39565
39566  # Publish this variable in the help.
39567
39568
39569  if [ -z "${STRIP+x}" ]; then
39570    # The variable is not set by user, try to locate tool using the code snippet
39571    for ac_prog in strip
39572do
39573  # Extract the first word of "$ac_prog", so it can be a program name with args.
39574set dummy $ac_prog; ac_word=$2
39575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39576$as_echo_n "checking for $ac_word... " >&6; }
39577if ${ac_cv_path_STRIP+:} false; then :
39578  $as_echo_n "(cached) " >&6
39579else
39580  case $STRIP in
39581  [\\/]* | ?:[\\/]*)
39582  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39583  ;;
39584  *)
39585  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39586for as_dir in $PATH
39587do
39588  IFS=$as_save_IFS
39589  test -z "$as_dir" && as_dir=.
39590    for ac_exec_ext in '' $ac_executable_extensions; do
39591  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39592    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39593    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39594    break 2
39595  fi
39596done
39597  done
39598IFS=$as_save_IFS
39599
39600  ;;
39601esac
39602fi
39603STRIP=$ac_cv_path_STRIP
39604if test -n "$STRIP"; then
39605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39606$as_echo "$STRIP" >&6; }
39607else
39608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39609$as_echo "no" >&6; }
39610fi
39611
39612
39613  test -n "$STRIP" && break
39614done
39615
39616  else
39617    # The variable is set, but is it from the command line or the environment?
39618
39619    # Try to remove the string !STRIP! from our list.
39620    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
39621    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39622      # If it failed, the variable was not from the command line. Ignore it,
39623      # but warn the user (except for BASH, which is always set by the calling BASH).
39624      if test "xSTRIP" != xBASH; then
39625        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
39626$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
39627      fi
39628      # Try to locate tool using the code snippet
39629      for ac_prog in strip
39630do
39631  # Extract the first word of "$ac_prog", so it can be a program name with args.
39632set dummy $ac_prog; ac_word=$2
39633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39634$as_echo_n "checking for $ac_word... " >&6; }
39635if ${ac_cv_path_STRIP+:} false; then :
39636  $as_echo_n "(cached) " >&6
39637else
39638  case $STRIP in
39639  [\\/]* | ?:[\\/]*)
39640  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39641  ;;
39642  *)
39643  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39644for as_dir in $PATH
39645do
39646  IFS=$as_save_IFS
39647  test -z "$as_dir" && as_dir=.
39648    for ac_exec_ext in '' $ac_executable_extensions; do
39649  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39650    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39651    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39652    break 2
39653  fi
39654done
39655  done
39656IFS=$as_save_IFS
39657
39658  ;;
39659esac
39660fi
39661STRIP=$ac_cv_path_STRIP
39662if test -n "$STRIP"; then
39663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39664$as_echo "$STRIP" >&6; }
39665else
39666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39667$as_echo "no" >&6; }
39668fi
39669
39670
39671  test -n "$STRIP" && break
39672done
39673
39674    else
39675      # If it succeeded, then it was overridden by the user. We will use it
39676      # for the tool.
39677
39678      # First remove it from the list of overridden variables, so we can test
39679      # for unknown variables in the end.
39680      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39681
39682      # Check if we try to supply an empty value
39683      if test "x$STRIP" = x; then
39684        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
39685$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
39686        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39687$as_echo_n "checking for STRIP... " >&6; }
39688        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39689$as_echo "disabled" >&6; }
39690      else
39691        # Check if the provided tool contains a complete path.
39692        tool_specified="$STRIP"
39693        tool_basename="${tool_specified##*/}"
39694        if test "x$tool_basename" = "x$tool_specified"; then
39695          # A command without a complete path is provided, search $PATH.
39696          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39697$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39698          # Extract the first word of "$tool_basename", so it can be a program name with args.
39699set dummy $tool_basename; ac_word=$2
39700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39701$as_echo_n "checking for $ac_word... " >&6; }
39702if ${ac_cv_path_STRIP+:} false; then :
39703  $as_echo_n "(cached) " >&6
39704else
39705  case $STRIP in
39706  [\\/]* | ?:[\\/]*)
39707  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39708  ;;
39709  *)
39710  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39711for as_dir in $PATH
39712do
39713  IFS=$as_save_IFS
39714  test -z "$as_dir" && as_dir=.
39715    for ac_exec_ext in '' $ac_executable_extensions; do
39716  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39717    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39718    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39719    break 2
39720  fi
39721done
39722  done
39723IFS=$as_save_IFS
39724
39725  ;;
39726esac
39727fi
39728STRIP=$ac_cv_path_STRIP
39729if test -n "$STRIP"; then
39730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39731$as_echo "$STRIP" >&6; }
39732else
39733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39734$as_echo "no" >&6; }
39735fi
39736
39737
39738          if test "x$STRIP" = x; then
39739            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39740          fi
39741        else
39742          # Otherwise we believe it is a complete path. Use it as it is.
39743          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39744$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39745          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39746$as_echo_n "checking for STRIP... " >&6; }
39747          if test ! -x "$tool_specified"; then
39748            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39749$as_echo "not found" >&6; }
39750            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39751          fi
39752          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39753$as_echo "$tool_specified" >&6; }
39754        fi
39755      fi
39756    fi
39757
39758  fi
39759
39760
39761
39762  # Only process if variable expands to non-empty
39763
39764  if test "x$STRIP" != x; then
39765    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39766
39767  # First separate the path from the arguments. This will split at the first
39768  # space.
39769  complete="$STRIP"
39770  path="${complete%% *}"
39771  tmp="$complete EOL"
39772  arguments="${tmp#* }"
39773
39774  # Input might be given as Windows format, start by converting to
39775  # unix format.
39776  new_path=`$CYGPATH -u "$path"`
39777
39778  # Now try to locate executable using which
39779  new_path=`$WHICH "$new_path" 2> /dev/null`
39780  # bat and cmd files are not always considered executable in cygwin causing which
39781  # to not find them
39782  if test "x$new_path" = x \
39783      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39784      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39785    new_path=`$CYGPATH -u "$path"`
39786  fi
39787  if test "x$new_path" = x; then
39788    # Oops. Which didn't find the executable.
39789    # The splitting of arguments from the executable at a space might have been incorrect,
39790    # since paths with space are more likely in Windows. Give it another try with the whole
39791    # argument.
39792    path="$complete"
39793    arguments="EOL"
39794    new_path=`$CYGPATH -u "$path"`
39795    new_path=`$WHICH "$new_path" 2> /dev/null`
39796    # bat and cmd files are not always considered executable in cygwin causing which
39797    # to not find them
39798    if test "x$new_path" = x \
39799        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39800        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39801      new_path=`$CYGPATH -u "$path"`
39802    fi
39803    if test "x$new_path" = x; then
39804      # It's still not found. Now this is an unrecoverable error.
39805      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39806$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39807      has_space=`$ECHO "$complete" | $GREP " "`
39808      if test "x$has_space" != x; then
39809        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39810$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39811      fi
39812      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39813    fi
39814  fi
39815
39816  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39817  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39818  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39819  # "foo.exe" is OK but "foo" is an error.
39820  #
39821  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39822  # It is also a way to make sure we got the proper file name for the real test later on.
39823  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39824  if test "x$test_shortpath" = x; then
39825    # Short path failed, file does not exist as specified.
39826    # Try adding .exe or .cmd
39827    if test -f "${new_path}.exe"; then
39828      input_to_shortpath="${new_path}.exe"
39829    elif test -f "${new_path}.cmd"; then
39830      input_to_shortpath="${new_path}.cmd"
39831    else
39832      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39833$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39834      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39835$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39836      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39837    fi
39838  else
39839    input_to_shortpath="$new_path"
39840  fi
39841
39842  # Call helper function which possibly converts this using DOS-style short mode.
39843  # If so, the updated path is stored in $new_path.
39844  new_path="$input_to_shortpath"
39845
39846  input_path="$input_to_shortpath"
39847  # Check if we need to convert this using DOS-style short mode. If the path
39848  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39849  # take no chances and rewrite it.
39850  # Note: m4 eats our [], so we need to use [ and ] instead.
39851  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39852  if test "x$has_forbidden_chars" != x; then
39853    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39854    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39855    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39856    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39857      # Going to short mode and back again did indeed matter. Since short mode is
39858      # case insensitive, let's make it lowercase to improve readability.
39859      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39860      # Now convert it back to Unix-style (cygpath)
39861      input_path=`$CYGPATH -u "$shortmode_path"`
39862      new_path="$input_path"
39863    fi
39864  fi
39865
39866  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39867  if test "x$test_cygdrive_prefix" = x; then
39868    # As a simple fix, exclude /usr/bin since it's not a real path.
39869    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39870      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39871      # a path prefixed by /cygdrive for fixpath to work.
39872      new_path="$CYGWIN_ROOT_PATH$input_path"
39873    fi
39874  fi
39875
39876  # remove trailing .exe if any
39877  new_path="${new_path/%.exe/}"
39878
39879    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39880
39881  # First separate the path from the arguments. This will split at the first
39882  # space.
39883  complete="$STRIP"
39884  path="${complete%% *}"
39885  tmp="$complete EOL"
39886  arguments="${tmp#* }"
39887
39888  # Input might be given as Windows format, start by converting to
39889  # unix format.
39890  new_path="$path"
39891
39892  windows_path="$new_path"
39893  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39894    unix_path=`$CYGPATH -u "$windows_path"`
39895    new_path="$unix_path"
39896  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39897    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39898    new_path="$unix_path"
39899  fi
39900
39901
39902  # Now try to locate executable using which
39903  new_path=`$WHICH "$new_path" 2> /dev/null`
39904
39905  if test "x$new_path" = x; then
39906    # Oops. Which didn't find the executable.
39907    # The splitting of arguments from the executable at a space might have been incorrect,
39908    # since paths with space are more likely in Windows. Give it another try with the whole
39909    # argument.
39910    path="$complete"
39911    arguments="EOL"
39912    new_path="$path"
39913
39914  windows_path="$new_path"
39915  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39916    unix_path=`$CYGPATH -u "$windows_path"`
39917    new_path="$unix_path"
39918  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39919    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39920    new_path="$unix_path"
39921  fi
39922
39923
39924    new_path=`$WHICH "$new_path" 2> /dev/null`
39925    # bat and cmd files are not always considered executable in MSYS causing which
39926    # to not find them
39927    if test "x$new_path" = x \
39928        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39929        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39930      new_path="$path"
39931
39932  windows_path="$new_path"
39933  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39934    unix_path=`$CYGPATH -u "$windows_path"`
39935    new_path="$unix_path"
39936  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39937    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39938    new_path="$unix_path"
39939  fi
39940
39941    fi
39942
39943    if test "x$new_path" = x; then
39944      # It's still not found. Now this is an unrecoverable error.
39945      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39946$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39947      has_space=`$ECHO "$complete" | $GREP " "`
39948      if test "x$has_space" != x; then
39949        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39950$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39951      fi
39952      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39953    fi
39954  fi
39955
39956  # Now new_path has a complete unix path to the binary
39957  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39958    # Keep paths in /bin as-is, but remove trailing .exe if any
39959    new_path="${new_path/%.exe/}"
39960    # Do not save /bin paths to all_fixpath_prefixes!
39961  else
39962    # Not in mixed or Windows style, start by that.
39963    new_path=`cmd //c echo $new_path`
39964
39965  input_path="$new_path"
39966  # Check if we need to convert this using DOS-style short mode. If the path
39967  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39968  # take no chances and rewrite it.
39969  # Note: m4 eats our [], so we need to use [ and ] instead.
39970  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39971  if test "x$has_forbidden_chars" != x; then
39972    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39973    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39974  fi
39975
39976    # Output is in $new_path
39977
39978  windows_path="$new_path"
39979  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39980    unix_path=`$CYGPATH -u "$windows_path"`
39981    new_path="$unix_path"
39982  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39983    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39984    new_path="$unix_path"
39985  fi
39986
39987    # remove trailing .exe if any
39988    new_path="${new_path/%.exe/}"
39989
39990    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39991    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39992  fi
39993
39994    else
39995      # We're on a unix platform. Hooray! :)
39996      # First separate the path from the arguments. This will split at the first
39997      # space.
39998      complete="$STRIP"
39999      path="${complete%% *}"
40000      tmp="$complete EOL"
40001      arguments="${tmp#* }"
40002
40003      # Cannot rely on the command "which" here since it doesn't always work.
40004      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40005      if test -z "$is_absolute_path"; then
40006        # Path to executable is not absolute. Find it.
40007        IFS_save="$IFS"
40008        IFS=:
40009        for p in $PATH; do
40010          if test -f "$p/$path" && test -x "$p/$path"; then
40011            new_path="$p/$path"
40012            break
40013          fi
40014        done
40015        IFS="$IFS_save"
40016      else
40017        # This is an absolute path, we can use it without further modifications.
40018        new_path="$path"
40019      fi
40020
40021      if test "x$new_path" = x; then
40022        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40023$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40024        has_space=`$ECHO "$complete" | $GREP " "`
40025        if test "x$has_space" != x; then
40026          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40027$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40028        fi
40029        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40030      fi
40031    fi
40032
40033    # Now join together the path and the arguments once again
40034    if test "x$arguments" != xEOL; then
40035      new_complete="$new_path ${arguments% *}"
40036    else
40037      new_complete="$new_path"
40038    fi
40039
40040    if test "x$complete" != "x$new_complete"; then
40041      STRIP="$new_complete"
40042      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40043$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40044    fi
40045  fi
40046
40047
40048
40049  # Publish this variable in the help.
40050
40051
40052  if [ -z "${NM+x}" ]; then
40053    # The variable is not set by user, try to locate tool using the code snippet
40054    for ac_prog in nm
40055do
40056  # Extract the first word of "$ac_prog", so it can be a program name with args.
40057set dummy $ac_prog; ac_word=$2
40058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40059$as_echo_n "checking for $ac_word... " >&6; }
40060if ${ac_cv_path_NM+:} false; then :
40061  $as_echo_n "(cached) " >&6
40062else
40063  case $NM in
40064  [\\/]* | ?:[\\/]*)
40065  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40066  ;;
40067  *)
40068  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40069for as_dir in $PATH
40070do
40071  IFS=$as_save_IFS
40072  test -z "$as_dir" && as_dir=.
40073    for ac_exec_ext in '' $ac_executable_extensions; do
40074  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40075    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40076    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40077    break 2
40078  fi
40079done
40080  done
40081IFS=$as_save_IFS
40082
40083  ;;
40084esac
40085fi
40086NM=$ac_cv_path_NM
40087if test -n "$NM"; then
40088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40089$as_echo "$NM" >&6; }
40090else
40091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40092$as_echo "no" >&6; }
40093fi
40094
40095
40096  test -n "$NM" && break
40097done
40098
40099  else
40100    # The variable is set, but is it from the command line or the environment?
40101
40102    # Try to remove the string !NM! from our list.
40103    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40104    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40105      # If it failed, the variable was not from the command line. Ignore it,
40106      # but warn the user (except for BASH, which is always set by the calling BASH).
40107      if test "xNM" != xBASH; then
40108        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40109$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40110      fi
40111      # Try to locate tool using the code snippet
40112      for ac_prog in nm
40113do
40114  # Extract the first word of "$ac_prog", so it can be a program name with args.
40115set dummy $ac_prog; ac_word=$2
40116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40117$as_echo_n "checking for $ac_word... " >&6; }
40118if ${ac_cv_path_NM+:} false; then :
40119  $as_echo_n "(cached) " >&6
40120else
40121  case $NM in
40122  [\\/]* | ?:[\\/]*)
40123  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40124  ;;
40125  *)
40126  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40127for as_dir in $PATH
40128do
40129  IFS=$as_save_IFS
40130  test -z "$as_dir" && as_dir=.
40131    for ac_exec_ext in '' $ac_executable_extensions; do
40132  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40133    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40134    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40135    break 2
40136  fi
40137done
40138  done
40139IFS=$as_save_IFS
40140
40141  ;;
40142esac
40143fi
40144NM=$ac_cv_path_NM
40145if test -n "$NM"; then
40146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40147$as_echo "$NM" >&6; }
40148else
40149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40150$as_echo "no" >&6; }
40151fi
40152
40153
40154  test -n "$NM" && break
40155done
40156
40157    else
40158      # If it succeeded, then it was overridden by the user. We will use it
40159      # for the tool.
40160
40161      # First remove it from the list of overridden variables, so we can test
40162      # for unknown variables in the end.
40163      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40164
40165      # Check if we try to supply an empty value
40166      if test "x$NM" = x; then
40167        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40168$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40169        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40170$as_echo_n "checking for NM... " >&6; }
40171        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40172$as_echo "disabled" >&6; }
40173      else
40174        # Check if the provided tool contains a complete path.
40175        tool_specified="$NM"
40176        tool_basename="${tool_specified##*/}"
40177        if test "x$tool_basename" = "x$tool_specified"; then
40178          # A command without a complete path is provided, search $PATH.
40179          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40180$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40181          # Extract the first word of "$tool_basename", so it can be a program name with args.
40182set dummy $tool_basename; ac_word=$2
40183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40184$as_echo_n "checking for $ac_word... " >&6; }
40185if ${ac_cv_path_NM+:} false; then :
40186  $as_echo_n "(cached) " >&6
40187else
40188  case $NM in
40189  [\\/]* | ?:[\\/]*)
40190  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40191  ;;
40192  *)
40193  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40194for as_dir in $PATH
40195do
40196  IFS=$as_save_IFS
40197  test -z "$as_dir" && as_dir=.
40198    for ac_exec_ext in '' $ac_executable_extensions; do
40199  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40200    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40201    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40202    break 2
40203  fi
40204done
40205  done
40206IFS=$as_save_IFS
40207
40208  ;;
40209esac
40210fi
40211NM=$ac_cv_path_NM
40212if test -n "$NM"; then
40213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40214$as_echo "$NM" >&6; }
40215else
40216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40217$as_echo "no" >&6; }
40218fi
40219
40220
40221          if test "x$NM" = x; then
40222            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40223          fi
40224        else
40225          # Otherwise we believe it is a complete path. Use it as it is.
40226          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40227$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40228          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40229$as_echo_n "checking for NM... " >&6; }
40230          if test ! -x "$tool_specified"; then
40231            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40232$as_echo "not found" >&6; }
40233            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40234          fi
40235          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40236$as_echo "$tool_specified" >&6; }
40237        fi
40238      fi
40239    fi
40240
40241  fi
40242
40243
40244
40245  # Only process if variable expands to non-empty
40246
40247  if test "x$NM" != x; then
40248    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40249
40250  # First separate the path from the arguments. This will split at the first
40251  # space.
40252  complete="$NM"
40253  path="${complete%% *}"
40254  tmp="$complete EOL"
40255  arguments="${tmp#* }"
40256
40257  # Input might be given as Windows format, start by converting to
40258  # unix format.
40259  new_path=`$CYGPATH -u "$path"`
40260
40261  # Now try to locate executable using which
40262  new_path=`$WHICH "$new_path" 2> /dev/null`
40263  # bat and cmd files are not always considered executable in cygwin causing which
40264  # to not find them
40265  if test "x$new_path" = x \
40266      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40267      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40268    new_path=`$CYGPATH -u "$path"`
40269  fi
40270  if test "x$new_path" = x; then
40271    # Oops. Which didn't find the executable.
40272    # The splitting of arguments from the executable at a space might have been incorrect,
40273    # since paths with space are more likely in Windows. Give it another try with the whole
40274    # argument.
40275    path="$complete"
40276    arguments="EOL"
40277    new_path=`$CYGPATH -u "$path"`
40278    new_path=`$WHICH "$new_path" 2> /dev/null`
40279    # bat and cmd files are not always considered executable in cygwin causing which
40280    # to not find them
40281    if test "x$new_path" = x \
40282        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40283        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40284      new_path=`$CYGPATH -u "$path"`
40285    fi
40286    if test "x$new_path" = x; then
40287      # It's still not found. Now this is an unrecoverable error.
40288      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40289$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40290      has_space=`$ECHO "$complete" | $GREP " "`
40291      if test "x$has_space" != x; then
40292        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40293$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40294      fi
40295      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40296    fi
40297  fi
40298
40299  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40300  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40301  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40302  # "foo.exe" is OK but "foo" is an error.
40303  #
40304  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40305  # It is also a way to make sure we got the proper file name for the real test later on.
40306  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40307  if test "x$test_shortpath" = x; then
40308    # Short path failed, file does not exist as specified.
40309    # Try adding .exe or .cmd
40310    if test -f "${new_path}.exe"; then
40311      input_to_shortpath="${new_path}.exe"
40312    elif test -f "${new_path}.cmd"; then
40313      input_to_shortpath="${new_path}.cmd"
40314    else
40315      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
40316$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
40317      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40318$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40319      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40320    fi
40321  else
40322    input_to_shortpath="$new_path"
40323  fi
40324
40325  # Call helper function which possibly converts this using DOS-style short mode.
40326  # If so, the updated path is stored in $new_path.
40327  new_path="$input_to_shortpath"
40328
40329  input_path="$input_to_shortpath"
40330  # Check if we need to convert this using DOS-style short mode. If the path
40331  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40332  # take no chances and rewrite it.
40333  # Note: m4 eats our [], so we need to use [ and ] instead.
40334  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40335  if test "x$has_forbidden_chars" != x; then
40336    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40337    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40338    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40339    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40340      # Going to short mode and back again did indeed matter. Since short mode is
40341      # case insensitive, let's make it lowercase to improve readability.
40342      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40343      # Now convert it back to Unix-style (cygpath)
40344      input_path=`$CYGPATH -u "$shortmode_path"`
40345      new_path="$input_path"
40346    fi
40347  fi
40348
40349  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40350  if test "x$test_cygdrive_prefix" = x; then
40351    # As a simple fix, exclude /usr/bin since it's not a real path.
40352    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40353      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40354      # a path prefixed by /cygdrive for fixpath to work.
40355      new_path="$CYGWIN_ROOT_PATH$input_path"
40356    fi
40357  fi
40358
40359  # remove trailing .exe if any
40360  new_path="${new_path/%.exe/}"
40361
40362    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40363
40364  # First separate the path from the arguments. This will split at the first
40365  # space.
40366  complete="$NM"
40367  path="${complete%% *}"
40368  tmp="$complete EOL"
40369  arguments="${tmp#* }"
40370
40371  # Input might be given as Windows format, start by converting to
40372  # unix format.
40373  new_path="$path"
40374
40375  windows_path="$new_path"
40376  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40377    unix_path=`$CYGPATH -u "$windows_path"`
40378    new_path="$unix_path"
40379  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40380    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40381    new_path="$unix_path"
40382  fi
40383
40384
40385  # Now try to locate executable using which
40386  new_path=`$WHICH "$new_path" 2> /dev/null`
40387
40388  if test "x$new_path" = x; then
40389    # Oops. Which didn't find the executable.
40390    # The splitting of arguments from the executable at a space might have been incorrect,
40391    # since paths with space are more likely in Windows. Give it another try with the whole
40392    # argument.
40393    path="$complete"
40394    arguments="EOL"
40395    new_path="$path"
40396
40397  windows_path="$new_path"
40398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40399    unix_path=`$CYGPATH -u "$windows_path"`
40400    new_path="$unix_path"
40401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40402    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40403    new_path="$unix_path"
40404  fi
40405
40406
40407    new_path=`$WHICH "$new_path" 2> /dev/null`
40408    # bat and cmd files are not always considered executable in MSYS causing which
40409    # to not find them
40410    if test "x$new_path" = x \
40411        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40412        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40413      new_path="$path"
40414
40415  windows_path="$new_path"
40416  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40417    unix_path=`$CYGPATH -u "$windows_path"`
40418    new_path="$unix_path"
40419  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40420    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40421    new_path="$unix_path"
40422  fi
40423
40424    fi
40425
40426    if test "x$new_path" = x; then
40427      # It's still not found. Now this is an unrecoverable error.
40428      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40429$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40430      has_space=`$ECHO "$complete" | $GREP " "`
40431      if test "x$has_space" != x; then
40432        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40433$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40434      fi
40435      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40436    fi
40437  fi
40438
40439  # Now new_path has a complete unix path to the binary
40440  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40441    # Keep paths in /bin as-is, but remove trailing .exe if any
40442    new_path="${new_path/%.exe/}"
40443    # Do not save /bin paths to all_fixpath_prefixes!
40444  else
40445    # Not in mixed or Windows style, start by that.
40446    new_path=`cmd //c echo $new_path`
40447
40448  input_path="$new_path"
40449  # Check if we need to convert this using DOS-style short mode. If the path
40450  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40451  # take no chances and rewrite it.
40452  # Note: m4 eats our [], so we need to use [ and ] instead.
40453  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40454  if test "x$has_forbidden_chars" != x; then
40455    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40456    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40457  fi
40458
40459    # Output is in $new_path
40460
40461  windows_path="$new_path"
40462  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40463    unix_path=`$CYGPATH -u "$windows_path"`
40464    new_path="$unix_path"
40465  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40466    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40467    new_path="$unix_path"
40468  fi
40469
40470    # remove trailing .exe if any
40471    new_path="${new_path/%.exe/}"
40472
40473    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40474    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40475  fi
40476
40477    else
40478      # We're on a unix platform. Hooray! :)
40479      # First separate the path from the arguments. This will split at the first
40480      # space.
40481      complete="$NM"
40482      path="${complete%% *}"
40483      tmp="$complete EOL"
40484      arguments="${tmp#* }"
40485
40486      # Cannot rely on the command "which" here since it doesn't always work.
40487      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40488      if test -z "$is_absolute_path"; then
40489        # Path to executable is not absolute. Find it.
40490        IFS_save="$IFS"
40491        IFS=:
40492        for p in $PATH; do
40493          if test -f "$p/$path" && test -x "$p/$path"; then
40494            new_path="$p/$path"
40495            break
40496          fi
40497        done
40498        IFS="$IFS_save"
40499      else
40500        # This is an absolute path, we can use it without further modifications.
40501        new_path="$path"
40502      fi
40503
40504      if test "x$new_path" = x; then
40505        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40506$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40507        has_space=`$ECHO "$complete" | $GREP " "`
40508        if test "x$has_space" != x; then
40509          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40510$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40511        fi
40512        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40513      fi
40514    fi
40515
40516    # Now join together the path and the arguments once again
40517    if test "x$arguments" != xEOL; then
40518      new_complete="$new_path ${arguments% *}"
40519    else
40520      new_complete="$new_path"
40521    fi
40522
40523    if test "x$complete" != "x$new_complete"; then
40524      NM="$new_complete"
40525      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
40526$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
40527    fi
40528  fi
40529
40530
40531
40532  # Publish this variable in the help.
40533
40534
40535  if [ -z "${GNM+x}" ]; then
40536    # The variable is not set by user, try to locate tool using the code snippet
40537    for ac_prog in gnm
40538do
40539  # Extract the first word of "$ac_prog", so it can be a program name with args.
40540set dummy $ac_prog; ac_word=$2
40541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40542$as_echo_n "checking for $ac_word... " >&6; }
40543if ${ac_cv_path_GNM+:} false; then :
40544  $as_echo_n "(cached) " >&6
40545else
40546  case $GNM in
40547  [\\/]* | ?:[\\/]*)
40548  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40549  ;;
40550  *)
40551  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40552for as_dir in $PATH
40553do
40554  IFS=$as_save_IFS
40555  test -z "$as_dir" && as_dir=.
40556    for ac_exec_ext in '' $ac_executable_extensions; do
40557  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40558    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40559    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40560    break 2
40561  fi
40562done
40563  done
40564IFS=$as_save_IFS
40565
40566  ;;
40567esac
40568fi
40569GNM=$ac_cv_path_GNM
40570if test -n "$GNM"; then
40571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40572$as_echo "$GNM" >&6; }
40573else
40574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40575$as_echo "no" >&6; }
40576fi
40577
40578
40579  test -n "$GNM" && break
40580done
40581
40582  else
40583    # The variable is set, but is it from the command line or the environment?
40584
40585    # Try to remove the string !GNM! from our list.
40586    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
40587    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40588      # If it failed, the variable was not from the command line. Ignore it,
40589      # but warn the user (except for BASH, which is always set by the calling BASH).
40590      if test "xGNM" != xBASH; then
40591        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
40592$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
40593      fi
40594      # Try to locate tool using the code snippet
40595      for ac_prog in gnm
40596do
40597  # Extract the first word of "$ac_prog", so it can be a program name with args.
40598set dummy $ac_prog; ac_word=$2
40599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40600$as_echo_n "checking for $ac_word... " >&6; }
40601if ${ac_cv_path_GNM+:} false; then :
40602  $as_echo_n "(cached) " >&6
40603else
40604  case $GNM in
40605  [\\/]* | ?:[\\/]*)
40606  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40607  ;;
40608  *)
40609  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40610for as_dir in $PATH
40611do
40612  IFS=$as_save_IFS
40613  test -z "$as_dir" && as_dir=.
40614    for ac_exec_ext in '' $ac_executable_extensions; do
40615  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40616    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40617    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40618    break 2
40619  fi
40620done
40621  done
40622IFS=$as_save_IFS
40623
40624  ;;
40625esac
40626fi
40627GNM=$ac_cv_path_GNM
40628if test -n "$GNM"; then
40629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40630$as_echo "$GNM" >&6; }
40631else
40632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40633$as_echo "no" >&6; }
40634fi
40635
40636
40637  test -n "$GNM" && break
40638done
40639
40640    else
40641      # If it succeeded, then it was overridden by the user. We will use it
40642      # for the tool.
40643
40644      # First remove it from the list of overridden variables, so we can test
40645      # for unknown variables in the end.
40646      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40647
40648      # Check if we try to supply an empty value
40649      if test "x$GNM" = x; then
40650        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
40651$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
40652        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40653$as_echo_n "checking for GNM... " >&6; }
40654        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40655$as_echo "disabled" >&6; }
40656      else
40657        # Check if the provided tool contains a complete path.
40658        tool_specified="$GNM"
40659        tool_basename="${tool_specified##*/}"
40660        if test "x$tool_basename" = "x$tool_specified"; then
40661          # A command without a complete path is provided, search $PATH.
40662          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
40663$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
40664          # Extract the first word of "$tool_basename", so it can be a program name with args.
40665set dummy $tool_basename; ac_word=$2
40666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40667$as_echo_n "checking for $ac_word... " >&6; }
40668if ${ac_cv_path_GNM+:} false; then :
40669  $as_echo_n "(cached) " >&6
40670else
40671  case $GNM in
40672  [\\/]* | ?:[\\/]*)
40673  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40674  ;;
40675  *)
40676  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40677for as_dir in $PATH
40678do
40679  IFS=$as_save_IFS
40680  test -z "$as_dir" && as_dir=.
40681    for ac_exec_ext in '' $ac_executable_extensions; do
40682  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40683    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40684    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40685    break 2
40686  fi
40687done
40688  done
40689IFS=$as_save_IFS
40690
40691  ;;
40692esac
40693fi
40694GNM=$ac_cv_path_GNM
40695if test -n "$GNM"; then
40696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40697$as_echo "$GNM" >&6; }
40698else
40699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40700$as_echo "no" >&6; }
40701fi
40702
40703
40704          if test "x$GNM" = x; then
40705            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40706          fi
40707        else
40708          # Otherwise we believe it is a complete path. Use it as it is.
40709          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
40710$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
40711          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40712$as_echo_n "checking for GNM... " >&6; }
40713          if test ! -x "$tool_specified"; then
40714            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40715$as_echo "not found" >&6; }
40716            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
40717          fi
40718          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40719$as_echo "$tool_specified" >&6; }
40720        fi
40721      fi
40722    fi
40723
40724  fi
40725
40726
40727
40728  # Only process if variable expands to non-empty
40729
40730  if test "x$GNM" != x; then
40731    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40732
40733  # First separate the path from the arguments. This will split at the first
40734  # space.
40735  complete="$GNM"
40736  path="${complete%% *}"
40737  tmp="$complete EOL"
40738  arguments="${tmp#* }"
40739
40740  # Input might be given as Windows format, start by converting to
40741  # unix format.
40742  new_path=`$CYGPATH -u "$path"`
40743
40744  # Now try to locate executable using which
40745  new_path=`$WHICH "$new_path" 2> /dev/null`
40746  # bat and cmd files are not always considered executable in cygwin causing which
40747  # to not find them
40748  if test "x$new_path" = x \
40749      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40750      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40751    new_path=`$CYGPATH -u "$path"`
40752  fi
40753  if test "x$new_path" = x; then
40754    # Oops. Which didn't find the executable.
40755    # The splitting of arguments from the executable at a space might have been incorrect,
40756    # since paths with space are more likely in Windows. Give it another try with the whole
40757    # argument.
40758    path="$complete"
40759    arguments="EOL"
40760    new_path=`$CYGPATH -u "$path"`
40761    new_path=`$WHICH "$new_path" 2> /dev/null`
40762    # bat and cmd files are not always considered executable in cygwin causing which
40763    # to not find them
40764    if test "x$new_path" = x \
40765        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40766        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40767      new_path=`$CYGPATH -u "$path"`
40768    fi
40769    if test "x$new_path" = x; then
40770      # It's still not found. Now this is an unrecoverable error.
40771      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40772$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40773      has_space=`$ECHO "$complete" | $GREP " "`
40774      if test "x$has_space" != x; then
40775        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40776$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40777      fi
40778      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40779    fi
40780  fi
40781
40782  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40783  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40784  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40785  # "foo.exe" is OK but "foo" is an error.
40786  #
40787  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40788  # It is also a way to make sure we got the proper file name for the real test later on.
40789  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40790  if test "x$test_shortpath" = x; then
40791    # Short path failed, file does not exist as specified.
40792    # Try adding .exe or .cmd
40793    if test -f "${new_path}.exe"; then
40794      input_to_shortpath="${new_path}.exe"
40795    elif test -f "${new_path}.cmd"; then
40796      input_to_shortpath="${new_path}.cmd"
40797    else
40798      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
40799$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
40800      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40801$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40802      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40803    fi
40804  else
40805    input_to_shortpath="$new_path"
40806  fi
40807
40808  # Call helper function which possibly converts this using DOS-style short mode.
40809  # If so, the updated path is stored in $new_path.
40810  new_path="$input_to_shortpath"
40811
40812  input_path="$input_to_shortpath"
40813  # Check if we need to convert this using DOS-style short mode. If the path
40814  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40815  # take no chances and rewrite it.
40816  # Note: m4 eats our [], so we need to use [ and ] instead.
40817  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40818  if test "x$has_forbidden_chars" != x; then
40819    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40820    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40821    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40822    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40823      # Going to short mode and back again did indeed matter. Since short mode is
40824      # case insensitive, let's make it lowercase to improve readability.
40825      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40826      # Now convert it back to Unix-style (cygpath)
40827      input_path=`$CYGPATH -u "$shortmode_path"`
40828      new_path="$input_path"
40829    fi
40830  fi
40831
40832  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40833  if test "x$test_cygdrive_prefix" = x; then
40834    # As a simple fix, exclude /usr/bin since it's not a real path.
40835    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40836      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40837      # a path prefixed by /cygdrive for fixpath to work.
40838      new_path="$CYGWIN_ROOT_PATH$input_path"
40839    fi
40840  fi
40841
40842  # remove trailing .exe if any
40843  new_path="${new_path/%.exe/}"
40844
40845    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40846
40847  # First separate the path from the arguments. This will split at the first
40848  # space.
40849  complete="$GNM"
40850  path="${complete%% *}"
40851  tmp="$complete EOL"
40852  arguments="${tmp#* }"
40853
40854  # Input might be given as Windows format, start by converting to
40855  # unix format.
40856  new_path="$path"
40857
40858  windows_path="$new_path"
40859  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40860    unix_path=`$CYGPATH -u "$windows_path"`
40861    new_path="$unix_path"
40862  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40863    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40864    new_path="$unix_path"
40865  fi
40866
40867
40868  # Now try to locate executable using which
40869  new_path=`$WHICH "$new_path" 2> /dev/null`
40870
40871  if test "x$new_path" = x; then
40872    # Oops. Which didn't find the executable.
40873    # The splitting of arguments from the executable at a space might have been incorrect,
40874    # since paths with space are more likely in Windows. Give it another try with the whole
40875    # argument.
40876    path="$complete"
40877    arguments="EOL"
40878    new_path="$path"
40879
40880  windows_path="$new_path"
40881  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40882    unix_path=`$CYGPATH -u "$windows_path"`
40883    new_path="$unix_path"
40884  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40885    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40886    new_path="$unix_path"
40887  fi
40888
40889
40890    new_path=`$WHICH "$new_path" 2> /dev/null`
40891    # bat and cmd files are not always considered executable in MSYS causing which
40892    # to not find them
40893    if test "x$new_path" = x \
40894        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40895        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40896      new_path="$path"
40897
40898  windows_path="$new_path"
40899  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40900    unix_path=`$CYGPATH -u "$windows_path"`
40901    new_path="$unix_path"
40902  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40903    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40904    new_path="$unix_path"
40905  fi
40906
40907    fi
40908
40909    if test "x$new_path" = x; then
40910      # It's still not found. Now this is an unrecoverable error.
40911      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40912$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40913      has_space=`$ECHO "$complete" | $GREP " "`
40914      if test "x$has_space" != x; then
40915        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40916$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40917      fi
40918      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40919    fi
40920  fi
40921
40922  # Now new_path has a complete unix path to the binary
40923  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40924    # Keep paths in /bin as-is, but remove trailing .exe if any
40925    new_path="${new_path/%.exe/}"
40926    # Do not save /bin paths to all_fixpath_prefixes!
40927  else
40928    # Not in mixed or Windows style, start by that.
40929    new_path=`cmd //c echo $new_path`
40930
40931  input_path="$new_path"
40932  # Check if we need to convert this using DOS-style short mode. If the path
40933  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40934  # take no chances and rewrite it.
40935  # Note: m4 eats our [], so we need to use [ and ] instead.
40936  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40937  if test "x$has_forbidden_chars" != x; then
40938    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40939    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40940  fi
40941
40942    # Output is in $new_path
40943
40944  windows_path="$new_path"
40945  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40946    unix_path=`$CYGPATH -u "$windows_path"`
40947    new_path="$unix_path"
40948  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40949    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40950    new_path="$unix_path"
40951  fi
40952
40953    # remove trailing .exe if any
40954    new_path="${new_path/%.exe/}"
40955
40956    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40957    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40958  fi
40959
40960    else
40961      # We're on a unix platform. Hooray! :)
40962      # First separate the path from the arguments. This will split at the first
40963      # space.
40964      complete="$GNM"
40965      path="${complete%% *}"
40966      tmp="$complete EOL"
40967      arguments="${tmp#* }"
40968
40969      # Cannot rely on the command "which" here since it doesn't always work.
40970      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40971      if test -z "$is_absolute_path"; then
40972        # Path to executable is not absolute. Find it.
40973        IFS_save="$IFS"
40974        IFS=:
40975        for p in $PATH; do
40976          if test -f "$p/$path" && test -x "$p/$path"; then
40977            new_path="$p/$path"
40978            break
40979          fi
40980        done
40981        IFS="$IFS_save"
40982      else
40983        # This is an absolute path, we can use it without further modifications.
40984        new_path="$path"
40985      fi
40986
40987      if test "x$new_path" = x; then
40988        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40989$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40990        has_space=`$ECHO "$complete" | $GREP " "`
40991        if test "x$has_space" != x; then
40992          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40993$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40994        fi
40995        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40996      fi
40997    fi
40998
40999    # Now join together the path and the arguments once again
41000    if test "x$arguments" != xEOL; then
41001      new_complete="$new_path ${arguments% *}"
41002    else
41003      new_complete="$new_path"
41004    fi
41005
41006    if test "x$complete" != "x$new_complete"; then
41007      GNM="$new_complete"
41008      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
41009$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
41010    fi
41011  fi
41012
41013  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
41014    # FIXME: we should unify this with the solaris case above.
41015
41016
41017  # Publish this variable in the help.
41018
41019
41020  if [ -z "${STRIP+x}" ]; then
41021    # The variable is not set by user, try to locate tool using the code snippet
41022    if test -n "$ac_tool_prefix"; then
41023  for ac_prog in strip
41024  do
41025    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41026set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41028$as_echo_n "checking for $ac_word... " >&6; }
41029if ${ac_cv_prog_STRIP+:} false; then :
41030  $as_echo_n "(cached) " >&6
41031else
41032  if test -n "$STRIP"; then
41033  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41034else
41035as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41036for as_dir in $PATH
41037do
41038  IFS=$as_save_IFS
41039  test -z "$as_dir" && as_dir=.
41040    for ac_exec_ext in '' $ac_executable_extensions; do
41041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41042    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41044    break 2
41045  fi
41046done
41047  done
41048IFS=$as_save_IFS
41049
41050fi
41051fi
41052STRIP=$ac_cv_prog_STRIP
41053if test -n "$STRIP"; then
41054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41055$as_echo "$STRIP" >&6; }
41056else
41057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41058$as_echo "no" >&6; }
41059fi
41060
41061
41062    test -n "$STRIP" && break
41063  done
41064fi
41065if test -z "$STRIP"; then
41066  ac_ct_STRIP=$STRIP
41067  for ac_prog in strip
41068do
41069  # Extract the first word of "$ac_prog", so it can be a program name with args.
41070set dummy $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_ac_ct_STRIP+:} false; then :
41074  $as_echo_n "(cached) " >&6
41075else
41076  if test -n "$ac_ct_STRIP"; then
41077  ac_cv_prog_ac_ct_STRIP="$ac_ct_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_ac_ct_STRIP="$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
41096ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41097if test -n "$ac_ct_STRIP"; then
41098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41099$as_echo "$ac_ct_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 "$ac_ct_STRIP" && break
41107done
41108
41109  if test "x$ac_ct_STRIP" = x; then
41110    STRIP=""
41111  else
41112    case $cross_compiling:$ac_tool_warned in
41113yes:)
41114{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41115$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41116ac_tool_warned=yes ;;
41117esac
41118    STRIP=$ac_ct_STRIP
41119  fi
41120fi
41121
41122  else
41123    # The variable is set, but is it from the command line or the environment?
41124
41125    # Try to remove the string !STRIP! from our list.
41126    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
41127    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41128      # If it failed, the variable was not from the command line. Ignore it,
41129      # but warn the user (except for BASH, which is always set by the calling BASH).
41130      if test "xSTRIP" != xBASH; then
41131        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
41132$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
41133      fi
41134      # Try to locate tool using the code snippet
41135      if test -n "$ac_tool_prefix"; then
41136  for ac_prog in strip
41137  do
41138    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41139set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41141$as_echo_n "checking for $ac_word... " >&6; }
41142if ${ac_cv_prog_STRIP+:} false; then :
41143  $as_echo_n "(cached) " >&6
41144else
41145  if test -n "$STRIP"; then
41146  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41147else
41148as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41149for as_dir in $PATH
41150do
41151  IFS=$as_save_IFS
41152  test -z "$as_dir" && as_dir=.
41153    for ac_exec_ext in '' $ac_executable_extensions; do
41154  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41155    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41156    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41157    break 2
41158  fi
41159done
41160  done
41161IFS=$as_save_IFS
41162
41163fi
41164fi
41165STRIP=$ac_cv_prog_STRIP
41166if test -n "$STRIP"; then
41167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41168$as_echo "$STRIP" >&6; }
41169else
41170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41171$as_echo "no" >&6; }
41172fi
41173
41174
41175    test -n "$STRIP" && break
41176  done
41177fi
41178if test -z "$STRIP"; then
41179  ac_ct_STRIP=$STRIP
41180  for ac_prog in strip
41181do
41182  # Extract the first word of "$ac_prog", so it can be a program name with args.
41183set dummy $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_ac_ct_STRIP+:} false; then :
41187  $as_echo_n "(cached) " >&6
41188else
41189  if test -n "$ac_ct_STRIP"; then
41190  ac_cv_prog_ac_ct_STRIP="$ac_ct_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_ac_ct_STRIP="$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
41209ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41210if test -n "$ac_ct_STRIP"; then
41211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41212$as_echo "$ac_ct_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 "$ac_ct_STRIP" && break
41220done
41221
41222  if test "x$ac_ct_STRIP" = x; then
41223    STRIP=""
41224  else
41225    case $cross_compiling:$ac_tool_warned in
41226yes:)
41227{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41228$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41229ac_tool_warned=yes ;;
41230esac
41231    STRIP=$ac_ct_STRIP
41232  fi
41233fi
41234
41235    else
41236      # If it succeeded, then it was overridden by the user. We will use it
41237      # for the tool.
41238
41239      # First remove it from the list of overridden variables, so we can test
41240      # for unknown variables in the end.
41241      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41242
41243      # Check if we try to supply an empty value
41244      if test "x$STRIP" = x; then
41245        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
41246$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
41247        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41248$as_echo_n "checking for STRIP... " >&6; }
41249        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41250$as_echo "disabled" >&6; }
41251      else
41252        # Check if the provided tool contains a complete path.
41253        tool_specified="$STRIP"
41254        tool_basename="${tool_specified##*/}"
41255        if test "x$tool_basename" = "x$tool_specified"; then
41256          # A command without a complete path is provided, search $PATH.
41257          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
41258$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
41259          # Extract the first word of "$tool_basename", so it can be a program name with args.
41260set dummy $tool_basename; ac_word=$2
41261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41262$as_echo_n "checking for $ac_word... " >&6; }
41263if ${ac_cv_path_STRIP+:} false; then :
41264  $as_echo_n "(cached) " >&6
41265else
41266  case $STRIP in
41267  [\\/]* | ?:[\\/]*)
41268  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
41269  ;;
41270  *)
41271  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41272for as_dir in $PATH
41273do
41274  IFS=$as_save_IFS
41275  test -z "$as_dir" && as_dir=.
41276    for ac_exec_ext in '' $ac_executable_extensions; do
41277  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41278    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
41279    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41280    break 2
41281  fi
41282done
41283  done
41284IFS=$as_save_IFS
41285
41286  ;;
41287esac
41288fi
41289STRIP=$ac_cv_path_STRIP
41290if test -n "$STRIP"; then
41291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41292$as_echo "$STRIP" >&6; }
41293else
41294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41295$as_echo "no" >&6; }
41296fi
41297
41298
41299          if test "x$STRIP" = x; then
41300            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41301          fi
41302        else
41303          # Otherwise we believe it is a complete path. Use it as it is.
41304          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
41305$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
41306          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41307$as_echo_n "checking for STRIP... " >&6; }
41308          if test ! -x "$tool_specified"; then
41309            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41310$as_echo "not found" >&6; }
41311            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
41312          fi
41313          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41314$as_echo "$tool_specified" >&6; }
41315        fi
41316      fi
41317    fi
41318
41319  fi
41320
41321
41322
41323  # Only process if variable expands to non-empty
41324
41325  if test "x$STRIP" != x; then
41326    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41327
41328  # First separate the path from the arguments. This will split at the first
41329  # space.
41330  complete="$STRIP"
41331  path="${complete%% *}"
41332  tmp="$complete EOL"
41333  arguments="${tmp#* }"
41334
41335  # Input might be given as Windows format, start by converting to
41336  # unix format.
41337  new_path=`$CYGPATH -u "$path"`
41338
41339  # Now try to locate executable using which
41340  new_path=`$WHICH "$new_path" 2> /dev/null`
41341  # bat and cmd files are not always considered executable in cygwin causing which
41342  # to not find them
41343  if test "x$new_path" = x \
41344      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41345      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41346    new_path=`$CYGPATH -u "$path"`
41347  fi
41348  if test "x$new_path" = x; then
41349    # Oops. Which didn't find the executable.
41350    # The splitting of arguments from the executable at a space might have been incorrect,
41351    # since paths with space are more likely in Windows. Give it another try with the whole
41352    # argument.
41353    path="$complete"
41354    arguments="EOL"
41355    new_path=`$CYGPATH -u "$path"`
41356    new_path=`$WHICH "$new_path" 2> /dev/null`
41357    # bat and cmd files are not always considered executable in cygwin causing which
41358    # to not find them
41359    if test "x$new_path" = x \
41360        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41361        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41362      new_path=`$CYGPATH -u "$path"`
41363    fi
41364    if test "x$new_path" = x; then
41365      # It's still not found. Now this is an unrecoverable error.
41366      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41367$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41368      has_space=`$ECHO "$complete" | $GREP " "`
41369      if test "x$has_space" != x; then
41370        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41371$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41372      fi
41373      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41374    fi
41375  fi
41376
41377  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41378  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41379  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41380  # "foo.exe" is OK but "foo" is an error.
41381  #
41382  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41383  # It is also a way to make sure we got the proper file name for the real test later on.
41384  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41385  if test "x$test_shortpath" = x; then
41386    # Short path failed, file does not exist as specified.
41387    # Try adding .exe or .cmd
41388    if test -f "${new_path}.exe"; then
41389      input_to_shortpath="${new_path}.exe"
41390    elif test -f "${new_path}.cmd"; then
41391      input_to_shortpath="${new_path}.cmd"
41392    else
41393      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
41394$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
41395      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41396$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41397      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41398    fi
41399  else
41400    input_to_shortpath="$new_path"
41401  fi
41402
41403  # Call helper function which possibly converts this using DOS-style short mode.
41404  # If so, the updated path is stored in $new_path.
41405  new_path="$input_to_shortpath"
41406
41407  input_path="$input_to_shortpath"
41408  # Check if we need to convert this using DOS-style short mode. If the path
41409  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41410  # take no chances and rewrite it.
41411  # Note: m4 eats our [], so we need to use [ and ] instead.
41412  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41413  if test "x$has_forbidden_chars" != x; then
41414    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41415    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41416    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41417    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41418      # Going to short mode and back again did indeed matter. Since short mode is
41419      # case insensitive, let's make it lowercase to improve readability.
41420      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41421      # Now convert it back to Unix-style (cygpath)
41422      input_path=`$CYGPATH -u "$shortmode_path"`
41423      new_path="$input_path"
41424    fi
41425  fi
41426
41427  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41428  if test "x$test_cygdrive_prefix" = x; then
41429    # As a simple fix, exclude /usr/bin since it's not a real path.
41430    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41431      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41432      # a path prefixed by /cygdrive for fixpath to work.
41433      new_path="$CYGWIN_ROOT_PATH$input_path"
41434    fi
41435  fi
41436
41437  # remove trailing .exe if any
41438  new_path="${new_path/%.exe/}"
41439
41440    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41441
41442  # First separate the path from the arguments. This will split at the first
41443  # space.
41444  complete="$STRIP"
41445  path="${complete%% *}"
41446  tmp="$complete EOL"
41447  arguments="${tmp#* }"
41448
41449  # Input might be given as Windows format, start by converting to
41450  # unix format.
41451  new_path="$path"
41452
41453  windows_path="$new_path"
41454  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41455    unix_path=`$CYGPATH -u "$windows_path"`
41456    new_path="$unix_path"
41457  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41458    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41459    new_path="$unix_path"
41460  fi
41461
41462
41463  # Now try to locate executable using which
41464  new_path=`$WHICH "$new_path" 2> /dev/null`
41465
41466  if test "x$new_path" = x; then
41467    # Oops. Which didn't find the executable.
41468    # The splitting of arguments from the executable at a space might have been incorrect,
41469    # since paths with space are more likely in Windows. Give it another try with the whole
41470    # argument.
41471    path="$complete"
41472    arguments="EOL"
41473    new_path="$path"
41474
41475  windows_path="$new_path"
41476  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41477    unix_path=`$CYGPATH -u "$windows_path"`
41478    new_path="$unix_path"
41479  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41480    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41481    new_path="$unix_path"
41482  fi
41483
41484
41485    new_path=`$WHICH "$new_path" 2> /dev/null`
41486    # bat and cmd files are not always considered executable in MSYS causing which
41487    # to not find them
41488    if test "x$new_path" = x \
41489        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41490        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41491      new_path="$path"
41492
41493  windows_path="$new_path"
41494  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41495    unix_path=`$CYGPATH -u "$windows_path"`
41496    new_path="$unix_path"
41497  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41498    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41499    new_path="$unix_path"
41500  fi
41501
41502    fi
41503
41504    if test "x$new_path" = x; then
41505      # It's still not found. Now this is an unrecoverable error.
41506      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41507$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41508      has_space=`$ECHO "$complete" | $GREP " "`
41509      if test "x$has_space" != x; then
41510        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41511$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41512      fi
41513      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41514    fi
41515  fi
41516
41517  # Now new_path has a complete unix path to the binary
41518  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41519    # Keep paths in /bin as-is, but remove trailing .exe if any
41520    new_path="${new_path/%.exe/}"
41521    # Do not save /bin paths to all_fixpath_prefixes!
41522  else
41523    # Not in mixed or Windows style, start by that.
41524    new_path=`cmd //c echo $new_path`
41525
41526  input_path="$new_path"
41527  # Check if we need to convert this using DOS-style short mode. If the path
41528  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41529  # take no chances and rewrite it.
41530  # Note: m4 eats our [], so we need to use [ and ] instead.
41531  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41532  if test "x$has_forbidden_chars" != x; then
41533    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41534    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41535  fi
41536
41537    # Output is in $new_path
41538
41539  windows_path="$new_path"
41540  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41541    unix_path=`$CYGPATH -u "$windows_path"`
41542    new_path="$unix_path"
41543  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41544    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41545    new_path="$unix_path"
41546  fi
41547
41548    # remove trailing .exe if any
41549    new_path="${new_path/%.exe/}"
41550
41551    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41552    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41553  fi
41554
41555    else
41556      # We're on a unix platform. Hooray! :)
41557      # First separate the path from the arguments. This will split at the first
41558      # space.
41559      complete="$STRIP"
41560      path="${complete%% *}"
41561      tmp="$complete EOL"
41562      arguments="${tmp#* }"
41563
41564      # Cannot rely on the command "which" here since it doesn't always work.
41565      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41566      if test -z "$is_absolute_path"; then
41567        # Path to executable is not absolute. Find it.
41568        IFS_save="$IFS"
41569        IFS=:
41570        for p in $PATH; do
41571          if test -f "$p/$path" && test -x "$p/$path"; then
41572            new_path="$p/$path"
41573            break
41574          fi
41575        done
41576        IFS="$IFS_save"
41577      else
41578        # This is an absolute path, we can use it without further modifications.
41579        new_path="$path"
41580      fi
41581
41582      if test "x$new_path" = x; then
41583        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41584$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41585        has_space=`$ECHO "$complete" | $GREP " "`
41586        if test "x$has_space" != x; then
41587          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41588$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41589        fi
41590        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41591      fi
41592    fi
41593
41594    # Now join together the path and the arguments once again
41595    if test "x$arguments" != xEOL; then
41596      new_complete="$new_path ${arguments% *}"
41597    else
41598      new_complete="$new_path"
41599    fi
41600
41601    if test "x$complete" != "x$new_complete"; then
41602      STRIP="$new_complete"
41603      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
41604$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
41605    fi
41606  fi
41607
41608    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41609
41610
41611  # Publish this variable in the help.
41612
41613
41614  if [ -z "${NM+x}" ]; then
41615    # The variable is not set by user, try to locate tool using the code snippet
41616    if test -n "$ac_tool_prefix"; then
41617  for ac_prog in nm gcc-nm
41618  do
41619    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41620set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41622$as_echo_n "checking for $ac_word... " >&6; }
41623if ${ac_cv_prog_NM+:} false; then :
41624  $as_echo_n "(cached) " >&6
41625else
41626  if test -n "$NM"; then
41627  ac_cv_prog_NM="$NM" # Let the user override the test.
41628else
41629as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41630for as_dir in $PATH
41631do
41632  IFS=$as_save_IFS
41633  test -z "$as_dir" && as_dir=.
41634    for ac_exec_ext in '' $ac_executable_extensions; do
41635  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41636    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41637    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41638    break 2
41639  fi
41640done
41641  done
41642IFS=$as_save_IFS
41643
41644fi
41645fi
41646NM=$ac_cv_prog_NM
41647if test -n "$NM"; then
41648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41649$as_echo "$NM" >&6; }
41650else
41651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41652$as_echo "no" >&6; }
41653fi
41654
41655
41656    test -n "$NM" && break
41657  done
41658fi
41659if test -z "$NM"; then
41660  ac_ct_NM=$NM
41661  for ac_prog in nm gcc-nm
41662do
41663  # Extract the first word of "$ac_prog", so it can be a program name with args.
41664set dummy $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_ac_ct_NM+:} false; then :
41668  $as_echo_n "(cached) " >&6
41669else
41670  if test -n "$ac_ct_NM"; then
41671  ac_cv_prog_ac_ct_NM="$ac_ct_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_ac_ct_NM="$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
41690ac_ct_NM=$ac_cv_prog_ac_ct_NM
41691if test -n "$ac_ct_NM"; then
41692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41693$as_echo "$ac_ct_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 "$ac_ct_NM" && break
41701done
41702
41703  if test "x$ac_ct_NM" = x; then
41704    NM=""
41705  else
41706    case $cross_compiling:$ac_tool_warned in
41707yes:)
41708{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41709$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41710ac_tool_warned=yes ;;
41711esac
41712    NM=$ac_ct_NM
41713  fi
41714fi
41715
41716  else
41717    # The variable is set, but is it from the command line or the environment?
41718
41719    # Try to remove the string !NM! from our list.
41720    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41721    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41722      # If it failed, the variable was not from the command line. Ignore it,
41723      # but warn the user (except for BASH, which is always set by the calling BASH).
41724      if test "xNM" != xBASH; then
41725        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41726$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41727      fi
41728      # Try to locate tool using the code snippet
41729      if test -n "$ac_tool_prefix"; then
41730  for ac_prog in nm gcc-nm
41731  do
41732    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41733set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41735$as_echo_n "checking for $ac_word... " >&6; }
41736if ${ac_cv_prog_NM+:} false; then :
41737  $as_echo_n "(cached) " >&6
41738else
41739  if test -n "$NM"; then
41740  ac_cv_prog_NM="$NM" # Let the user override the test.
41741else
41742as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41743for as_dir in $PATH
41744do
41745  IFS=$as_save_IFS
41746  test -z "$as_dir" && as_dir=.
41747    for ac_exec_ext in '' $ac_executable_extensions; do
41748  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41749    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41750    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41751    break 2
41752  fi
41753done
41754  done
41755IFS=$as_save_IFS
41756
41757fi
41758fi
41759NM=$ac_cv_prog_NM
41760if test -n "$NM"; then
41761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41762$as_echo "$NM" >&6; }
41763else
41764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41765$as_echo "no" >&6; }
41766fi
41767
41768
41769    test -n "$NM" && break
41770  done
41771fi
41772if test -z "$NM"; then
41773  ac_ct_NM=$NM
41774  for ac_prog in nm gcc-nm
41775do
41776  # Extract the first word of "$ac_prog", so it can be a program name with args.
41777set dummy $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_ac_ct_NM+:} false; then :
41781  $as_echo_n "(cached) " >&6
41782else
41783  if test -n "$ac_ct_NM"; then
41784  ac_cv_prog_ac_ct_NM="$ac_ct_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_ac_ct_NM="$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
41803ac_ct_NM=$ac_cv_prog_ac_ct_NM
41804if test -n "$ac_ct_NM"; then
41805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41806$as_echo "$ac_ct_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 "$ac_ct_NM" && break
41814done
41815
41816  if test "x$ac_ct_NM" = x; then
41817    NM=""
41818  else
41819    case $cross_compiling:$ac_tool_warned in
41820yes:)
41821{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41822$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41823ac_tool_warned=yes ;;
41824esac
41825    NM=$ac_ct_NM
41826  fi
41827fi
41828
41829    else
41830      # If it succeeded, then it was overridden by the user. We will use it
41831      # for the tool.
41832
41833      # First remove it from the list of overridden variables, so we can test
41834      # for unknown variables in the end.
41835      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41836
41837      # Check if we try to supply an empty value
41838      if test "x$NM" = x; then
41839        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41840$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41841        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41842$as_echo_n "checking for NM... " >&6; }
41843        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41844$as_echo "disabled" >&6; }
41845      else
41846        # Check if the provided tool contains a complete path.
41847        tool_specified="$NM"
41848        tool_basename="${tool_specified##*/}"
41849        if test "x$tool_basename" = "x$tool_specified"; then
41850          # A command without a complete path is provided, search $PATH.
41851          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41852$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41853          # Extract the first word of "$tool_basename", so it can be a program name with args.
41854set dummy $tool_basename; ac_word=$2
41855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41856$as_echo_n "checking for $ac_word... " >&6; }
41857if ${ac_cv_path_NM+:} false; then :
41858  $as_echo_n "(cached) " >&6
41859else
41860  case $NM in
41861  [\\/]* | ?:[\\/]*)
41862  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41863  ;;
41864  *)
41865  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41866for as_dir in $PATH
41867do
41868  IFS=$as_save_IFS
41869  test -z "$as_dir" && as_dir=.
41870    for ac_exec_ext in '' $ac_executable_extensions; do
41871  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41872    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41873    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41874    break 2
41875  fi
41876done
41877  done
41878IFS=$as_save_IFS
41879
41880  ;;
41881esac
41882fi
41883NM=$ac_cv_path_NM
41884if test -n "$NM"; then
41885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41886$as_echo "$NM" >&6; }
41887else
41888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41889$as_echo "no" >&6; }
41890fi
41891
41892
41893          if test "x$NM" = x; then
41894            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41895          fi
41896        else
41897          # Otherwise we believe it is a complete path. Use it as it is.
41898          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41899$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41900          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41901$as_echo_n "checking for NM... " >&6; }
41902          if test ! -x "$tool_specified"; then
41903            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41904$as_echo "not found" >&6; }
41905            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41906          fi
41907          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41908$as_echo "$tool_specified" >&6; }
41909        fi
41910      fi
41911    fi
41912
41913  fi
41914
41915
41916    else
41917
41918
41919  # Publish this variable in the help.
41920
41921
41922  if [ -z "${NM+x}" ]; then
41923    # The variable is not set by user, try to locate tool using the code snippet
41924    if test -n "$ac_tool_prefix"; then
41925  for ac_prog in nm
41926  do
41927    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41928set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41930$as_echo_n "checking for $ac_word... " >&6; }
41931if ${ac_cv_prog_NM+:} false; then :
41932  $as_echo_n "(cached) " >&6
41933else
41934  if test -n "$NM"; then
41935  ac_cv_prog_NM="$NM" # Let the user override the test.
41936else
41937as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41938for as_dir in $PATH
41939do
41940  IFS=$as_save_IFS
41941  test -z "$as_dir" && as_dir=.
41942    for ac_exec_ext in '' $ac_executable_extensions; do
41943  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41944    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41945    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41946    break 2
41947  fi
41948done
41949  done
41950IFS=$as_save_IFS
41951
41952fi
41953fi
41954NM=$ac_cv_prog_NM
41955if test -n "$NM"; then
41956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41957$as_echo "$NM" >&6; }
41958else
41959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41960$as_echo "no" >&6; }
41961fi
41962
41963
41964    test -n "$NM" && break
41965  done
41966fi
41967if test -z "$NM"; then
41968  ac_ct_NM=$NM
41969  for ac_prog in nm
41970do
41971  # Extract the first word of "$ac_prog", so it can be a program name with args.
41972set dummy $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_ac_ct_NM+:} false; then :
41976  $as_echo_n "(cached) " >&6
41977else
41978  if test -n "$ac_ct_NM"; then
41979  ac_cv_prog_ac_ct_NM="$ac_ct_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_ac_ct_NM="$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
41998ac_ct_NM=$ac_cv_prog_ac_ct_NM
41999if test -n "$ac_ct_NM"; then
42000  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42001$as_echo "$ac_ct_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 "$ac_ct_NM" && break
42009done
42010
42011  if test "x$ac_ct_NM" = x; then
42012    NM=""
42013  else
42014    case $cross_compiling:$ac_tool_warned in
42015yes:)
42016{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42017$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42018ac_tool_warned=yes ;;
42019esac
42020    NM=$ac_ct_NM
42021  fi
42022fi
42023
42024  else
42025    # The variable is set, but is it from the command line or the environment?
42026
42027    # Try to remove the string !NM! from our list.
42028    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42029    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42030      # If it failed, the variable was not from the command line. Ignore it,
42031      # but warn the user (except for BASH, which is always set by the calling BASH).
42032      if test "xNM" != xBASH; then
42033        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42034$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42035      fi
42036      # Try to locate tool using the code snippet
42037      if test -n "$ac_tool_prefix"; then
42038  for ac_prog in nm
42039  do
42040    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42041set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42043$as_echo_n "checking for $ac_word... " >&6; }
42044if ${ac_cv_prog_NM+:} false; then :
42045  $as_echo_n "(cached) " >&6
42046else
42047  if test -n "$NM"; then
42048  ac_cv_prog_NM="$NM" # Let the user override the test.
42049else
42050as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42051for as_dir in $PATH
42052do
42053  IFS=$as_save_IFS
42054  test -z "$as_dir" && as_dir=.
42055    for ac_exec_ext in '' $ac_executable_extensions; do
42056  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42057    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42058    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42059    break 2
42060  fi
42061done
42062  done
42063IFS=$as_save_IFS
42064
42065fi
42066fi
42067NM=$ac_cv_prog_NM
42068if test -n "$NM"; then
42069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42070$as_echo "$NM" >&6; }
42071else
42072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42073$as_echo "no" >&6; }
42074fi
42075
42076
42077    test -n "$NM" && break
42078  done
42079fi
42080if test -z "$NM"; then
42081  ac_ct_NM=$NM
42082  for ac_prog in nm
42083do
42084  # Extract the first word of "$ac_prog", so it can be a program name with args.
42085set dummy $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_ac_ct_NM+:} false; then :
42089  $as_echo_n "(cached) " >&6
42090else
42091  if test -n "$ac_ct_NM"; then
42092  ac_cv_prog_ac_ct_NM="$ac_ct_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_ac_ct_NM="$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
42111ac_ct_NM=$ac_cv_prog_ac_ct_NM
42112if test -n "$ac_ct_NM"; then
42113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42114$as_echo "$ac_ct_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 "$ac_ct_NM" && break
42122done
42123
42124  if test "x$ac_ct_NM" = x; then
42125    NM=""
42126  else
42127    case $cross_compiling:$ac_tool_warned in
42128yes:)
42129{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42130$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42131ac_tool_warned=yes ;;
42132esac
42133    NM=$ac_ct_NM
42134  fi
42135fi
42136
42137    else
42138      # If it succeeded, then it was overridden by the user. We will use it
42139      # for the tool.
42140
42141      # First remove it from the list of overridden variables, so we can test
42142      # for unknown variables in the end.
42143      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42144
42145      # Check if we try to supply an empty value
42146      if test "x$NM" = x; then
42147        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42148$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42149        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42150$as_echo_n "checking for NM... " >&6; }
42151        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42152$as_echo "disabled" >&6; }
42153      else
42154        # Check if the provided tool contains a complete path.
42155        tool_specified="$NM"
42156        tool_basename="${tool_specified##*/}"
42157        if test "x$tool_basename" = "x$tool_specified"; then
42158          # A command without a complete path is provided, search $PATH.
42159          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42160$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42161          # Extract the first word of "$tool_basename", so it can be a program name with args.
42162set dummy $tool_basename; ac_word=$2
42163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42164$as_echo_n "checking for $ac_word... " >&6; }
42165if ${ac_cv_path_NM+:} false; then :
42166  $as_echo_n "(cached) " >&6
42167else
42168  case $NM in
42169  [\\/]* | ?:[\\/]*)
42170  ac_cv_path_NM="$NM" # Let the user override the test with a path.
42171  ;;
42172  *)
42173  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42174for as_dir in $PATH
42175do
42176  IFS=$as_save_IFS
42177  test -z "$as_dir" && as_dir=.
42178    for ac_exec_ext in '' $ac_executable_extensions; do
42179  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42180    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42181    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42182    break 2
42183  fi
42184done
42185  done
42186IFS=$as_save_IFS
42187
42188  ;;
42189esac
42190fi
42191NM=$ac_cv_path_NM
42192if test -n "$NM"; then
42193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42194$as_echo "$NM" >&6; }
42195else
42196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42197$as_echo "no" >&6; }
42198fi
42199
42200
42201          if test "x$NM" = x; then
42202            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42203          fi
42204        else
42205          # Otherwise we believe it is a complete path. Use it as it is.
42206          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42207$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42208          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42209$as_echo_n "checking for NM... " >&6; }
42210          if test ! -x "$tool_specified"; then
42211            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42212$as_echo "not found" >&6; }
42213            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42214          fi
42215          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42216$as_echo "$tool_specified" >&6; }
42217        fi
42218      fi
42219    fi
42220
42221  fi
42222
42223
42224    fi
42225
42226  # Only process if variable expands to non-empty
42227
42228  if test "x$NM" != x; then
42229    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42230
42231  # First separate the path from the arguments. This will split at the first
42232  # space.
42233  complete="$NM"
42234  path="${complete%% *}"
42235  tmp="$complete EOL"
42236  arguments="${tmp#* }"
42237
42238  # Input might be given as Windows format, start by converting to
42239  # unix format.
42240  new_path=`$CYGPATH -u "$path"`
42241
42242  # Now try to locate executable using which
42243  new_path=`$WHICH "$new_path" 2> /dev/null`
42244  # bat and cmd files are not always considered executable in cygwin causing which
42245  # to not find them
42246  if test "x$new_path" = x \
42247      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42248      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42249    new_path=`$CYGPATH -u "$path"`
42250  fi
42251  if test "x$new_path" = x; then
42252    # Oops. Which didn't find the executable.
42253    # The splitting of arguments from the executable at a space might have been incorrect,
42254    # since paths with space are more likely in Windows. Give it another try with the whole
42255    # argument.
42256    path="$complete"
42257    arguments="EOL"
42258    new_path=`$CYGPATH -u "$path"`
42259    new_path=`$WHICH "$new_path" 2> /dev/null`
42260    # bat and cmd files are not always considered executable in cygwin causing which
42261    # to not find them
42262    if test "x$new_path" = x \
42263        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42264        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42265      new_path=`$CYGPATH -u "$path"`
42266    fi
42267    if test "x$new_path" = x; then
42268      # It's still not found. Now this is an unrecoverable error.
42269      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42270$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42271      has_space=`$ECHO "$complete" | $GREP " "`
42272      if test "x$has_space" != x; then
42273        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42274$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42275      fi
42276      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42277    fi
42278  fi
42279
42280  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42281  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42282  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42283  # "foo.exe" is OK but "foo" is an error.
42284  #
42285  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42286  # It is also a way to make sure we got the proper file name for the real test later on.
42287  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42288  if test "x$test_shortpath" = x; then
42289    # Short path failed, file does not exist as specified.
42290    # Try adding .exe or .cmd
42291    if test -f "${new_path}.exe"; then
42292      input_to_shortpath="${new_path}.exe"
42293    elif test -f "${new_path}.cmd"; then
42294      input_to_shortpath="${new_path}.cmd"
42295    else
42296      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
42297$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
42298      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42299$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42300      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42301    fi
42302  else
42303    input_to_shortpath="$new_path"
42304  fi
42305
42306  # Call helper function which possibly converts this using DOS-style short mode.
42307  # If so, the updated path is stored in $new_path.
42308  new_path="$input_to_shortpath"
42309
42310  input_path="$input_to_shortpath"
42311  # Check if we need to convert this using DOS-style short mode. If the path
42312  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42313  # take no chances and rewrite it.
42314  # Note: m4 eats our [], so we need to use [ and ] instead.
42315  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42316  if test "x$has_forbidden_chars" != x; then
42317    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42318    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42319    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42320    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42321      # Going to short mode and back again did indeed matter. Since short mode is
42322      # case insensitive, let's make it lowercase to improve readability.
42323      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42324      # Now convert it back to Unix-style (cygpath)
42325      input_path=`$CYGPATH -u "$shortmode_path"`
42326      new_path="$input_path"
42327    fi
42328  fi
42329
42330  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42331  if test "x$test_cygdrive_prefix" = x; then
42332    # As a simple fix, exclude /usr/bin since it's not a real path.
42333    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42334      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42335      # a path prefixed by /cygdrive for fixpath to work.
42336      new_path="$CYGWIN_ROOT_PATH$input_path"
42337    fi
42338  fi
42339
42340  # remove trailing .exe if any
42341  new_path="${new_path/%.exe/}"
42342
42343    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42344
42345  # First separate the path from the arguments. This will split at the first
42346  # space.
42347  complete="$NM"
42348  path="${complete%% *}"
42349  tmp="$complete EOL"
42350  arguments="${tmp#* }"
42351
42352  # Input might be given as Windows format, start by converting to
42353  # unix format.
42354  new_path="$path"
42355
42356  windows_path="$new_path"
42357  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42358    unix_path=`$CYGPATH -u "$windows_path"`
42359    new_path="$unix_path"
42360  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42361    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42362    new_path="$unix_path"
42363  fi
42364
42365
42366  # Now try to locate executable using which
42367  new_path=`$WHICH "$new_path" 2> /dev/null`
42368
42369  if test "x$new_path" = x; then
42370    # Oops. Which didn't find the executable.
42371    # The splitting of arguments from the executable at a space might have been incorrect,
42372    # since paths with space are more likely in Windows. Give it another try with the whole
42373    # argument.
42374    path="$complete"
42375    arguments="EOL"
42376    new_path="$path"
42377
42378  windows_path="$new_path"
42379  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42380    unix_path=`$CYGPATH -u "$windows_path"`
42381    new_path="$unix_path"
42382  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42383    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42384    new_path="$unix_path"
42385  fi
42386
42387
42388    new_path=`$WHICH "$new_path" 2> /dev/null`
42389    # bat and cmd files are not always considered executable in MSYS causing which
42390    # to not find them
42391    if test "x$new_path" = x \
42392        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42393        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42394      new_path="$path"
42395
42396  windows_path="$new_path"
42397  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42398    unix_path=`$CYGPATH -u "$windows_path"`
42399    new_path="$unix_path"
42400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42401    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42402    new_path="$unix_path"
42403  fi
42404
42405    fi
42406
42407    if test "x$new_path" = x; then
42408      # It's still not found. Now this is an unrecoverable error.
42409      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42410$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42411      has_space=`$ECHO "$complete" | $GREP " "`
42412      if test "x$has_space" != x; then
42413        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42414$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42415      fi
42416      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42417    fi
42418  fi
42419
42420  # Now new_path has a complete unix path to the binary
42421  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42422    # Keep paths in /bin as-is, but remove trailing .exe if any
42423    new_path="${new_path/%.exe/}"
42424    # Do not save /bin paths to all_fixpath_prefixes!
42425  else
42426    # Not in mixed or Windows style, start by that.
42427    new_path=`cmd //c echo $new_path`
42428
42429  input_path="$new_path"
42430  # Check if we need to convert this using DOS-style short mode. If the path
42431  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42432  # take no chances and rewrite it.
42433  # Note: m4 eats our [], so we need to use [ and ] instead.
42434  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42435  if test "x$has_forbidden_chars" != x; then
42436    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42437    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42438  fi
42439
42440    # Output is in $new_path
42441
42442  windows_path="$new_path"
42443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42444    unix_path=`$CYGPATH -u "$windows_path"`
42445    new_path="$unix_path"
42446  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42447    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42448    new_path="$unix_path"
42449  fi
42450
42451    # remove trailing .exe if any
42452    new_path="${new_path/%.exe/}"
42453
42454    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42455    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42456  fi
42457
42458    else
42459      # We're on a unix platform. Hooray! :)
42460      # First separate the path from the arguments. This will split at the first
42461      # space.
42462      complete="$NM"
42463      path="${complete%% *}"
42464      tmp="$complete EOL"
42465      arguments="${tmp#* }"
42466
42467      # Cannot rely on the command "which" here since it doesn't always work.
42468      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42469      if test -z "$is_absolute_path"; then
42470        # Path to executable is not absolute. Find it.
42471        IFS_save="$IFS"
42472        IFS=:
42473        for p in $PATH; do
42474          if test -f "$p/$path" && test -x "$p/$path"; then
42475            new_path="$p/$path"
42476            break
42477          fi
42478        done
42479        IFS="$IFS_save"
42480      else
42481        # This is an absolute path, we can use it without further modifications.
42482        new_path="$path"
42483      fi
42484
42485      if test "x$new_path" = x; then
42486        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42487$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42488        has_space=`$ECHO "$complete" | $GREP " "`
42489        if test "x$has_space" != x; then
42490          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42491$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42492        fi
42493        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42494      fi
42495    fi
42496
42497    # Now join together the path and the arguments once again
42498    if test "x$arguments" != xEOL; then
42499      new_complete="$new_path ${arguments% *}"
42500    else
42501      new_complete="$new_path"
42502    fi
42503
42504    if test "x$complete" != "x$new_complete"; then
42505      NM="$new_complete"
42506      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
42507$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
42508    fi
42509  fi
42510
42511    GNM="$NM"
42512
42513  fi
42514
42515  # objcopy is used for moving debug symbols to separate files when
42516  # full debug symbols are enabled.
42517  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
42518
42519
42520  # Publish this variable in the help.
42521
42522
42523  if [ -z "${OBJCOPY+x}" ]; then
42524    # The variable is not set by user, try to locate tool using the code snippet
42525    if test -n "$ac_tool_prefix"; then
42526  for ac_prog in gobjcopy objcopy
42527  do
42528    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42529set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42531$as_echo_n "checking for $ac_word... " >&6; }
42532if ${ac_cv_prog_OBJCOPY+:} false; then :
42533  $as_echo_n "(cached) " >&6
42534else
42535  if test -n "$OBJCOPY"; then
42536  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42537else
42538as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42539for as_dir in $PATH
42540do
42541  IFS=$as_save_IFS
42542  test -z "$as_dir" && as_dir=.
42543    for ac_exec_ext in '' $ac_executable_extensions; do
42544  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42545    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42546    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42547    break 2
42548  fi
42549done
42550  done
42551IFS=$as_save_IFS
42552
42553fi
42554fi
42555OBJCOPY=$ac_cv_prog_OBJCOPY
42556if test -n "$OBJCOPY"; then
42557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42558$as_echo "$OBJCOPY" >&6; }
42559else
42560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42561$as_echo "no" >&6; }
42562fi
42563
42564
42565    test -n "$OBJCOPY" && break
42566  done
42567fi
42568if test -z "$OBJCOPY"; then
42569  ac_ct_OBJCOPY=$OBJCOPY
42570  for ac_prog in gobjcopy objcopy
42571do
42572  # Extract the first word of "$ac_prog", so it can be a program name with args.
42573set dummy $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_ac_ct_OBJCOPY+:} false; then :
42577  $as_echo_n "(cached) " >&6
42578else
42579  if test -n "$ac_ct_OBJCOPY"; then
42580  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_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_ac_ct_OBJCOPY="$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
42599ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42600if test -n "$ac_ct_OBJCOPY"; then
42601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42602$as_echo "$ac_ct_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 "$ac_ct_OBJCOPY" && break
42610done
42611
42612  if test "x$ac_ct_OBJCOPY" = x; then
42613    OBJCOPY=""
42614  else
42615    case $cross_compiling:$ac_tool_warned in
42616yes:)
42617{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42618$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42619ac_tool_warned=yes ;;
42620esac
42621    OBJCOPY=$ac_ct_OBJCOPY
42622  fi
42623fi
42624
42625  else
42626    # The variable is set, but is it from the command line or the environment?
42627
42628    # Try to remove the string !OBJCOPY! from our list.
42629    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
42630    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42631      # If it failed, the variable was not from the command line. Ignore it,
42632      # but warn the user (except for BASH, which is always set by the calling BASH).
42633      if test "xOBJCOPY" != xBASH; then
42634        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
42635$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
42636      fi
42637      # Try to locate tool using the code snippet
42638      if test -n "$ac_tool_prefix"; then
42639  for ac_prog in gobjcopy objcopy
42640  do
42641    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42642set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42644$as_echo_n "checking for $ac_word... " >&6; }
42645if ${ac_cv_prog_OBJCOPY+:} false; then :
42646  $as_echo_n "(cached) " >&6
42647else
42648  if test -n "$OBJCOPY"; then
42649  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42650else
42651as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42652for as_dir in $PATH
42653do
42654  IFS=$as_save_IFS
42655  test -z "$as_dir" && as_dir=.
42656    for ac_exec_ext in '' $ac_executable_extensions; do
42657  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42658    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42659    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42660    break 2
42661  fi
42662done
42663  done
42664IFS=$as_save_IFS
42665
42666fi
42667fi
42668OBJCOPY=$ac_cv_prog_OBJCOPY
42669if test -n "$OBJCOPY"; then
42670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42671$as_echo "$OBJCOPY" >&6; }
42672else
42673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42674$as_echo "no" >&6; }
42675fi
42676
42677
42678    test -n "$OBJCOPY" && break
42679  done
42680fi
42681if test -z "$OBJCOPY"; then
42682  ac_ct_OBJCOPY=$OBJCOPY
42683  for ac_prog in gobjcopy objcopy
42684do
42685  # Extract the first word of "$ac_prog", so it can be a program name with args.
42686set dummy $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_ac_ct_OBJCOPY+:} false; then :
42690  $as_echo_n "(cached) " >&6
42691else
42692  if test -n "$ac_ct_OBJCOPY"; then
42693  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_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_ac_ct_OBJCOPY="$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
42712ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42713if test -n "$ac_ct_OBJCOPY"; then
42714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42715$as_echo "$ac_ct_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 "$ac_ct_OBJCOPY" && break
42723done
42724
42725  if test "x$ac_ct_OBJCOPY" = x; then
42726    OBJCOPY=""
42727  else
42728    case $cross_compiling:$ac_tool_warned in
42729yes:)
42730{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42731$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42732ac_tool_warned=yes ;;
42733esac
42734    OBJCOPY=$ac_ct_OBJCOPY
42735  fi
42736fi
42737
42738    else
42739      # If it succeeded, then it was overridden by the user. We will use it
42740      # for the tool.
42741
42742      # First remove it from the list of overridden variables, so we can test
42743      # for unknown variables in the end.
42744      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42745
42746      # Check if we try to supply an empty value
42747      if test "x$OBJCOPY" = x; then
42748        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
42749$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
42750        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42751$as_echo_n "checking for OBJCOPY... " >&6; }
42752        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42753$as_echo "disabled" >&6; }
42754      else
42755        # Check if the provided tool contains a complete path.
42756        tool_specified="$OBJCOPY"
42757        tool_basename="${tool_specified##*/}"
42758        if test "x$tool_basename" = "x$tool_specified"; then
42759          # A command without a complete path is provided, search $PATH.
42760          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
42761$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
42762          # Extract the first word of "$tool_basename", so it can be a program name with args.
42763set dummy $tool_basename; ac_word=$2
42764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42765$as_echo_n "checking for $ac_word... " >&6; }
42766if ${ac_cv_path_OBJCOPY+:} false; then :
42767  $as_echo_n "(cached) " >&6
42768else
42769  case $OBJCOPY in
42770  [\\/]* | ?:[\\/]*)
42771  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
42772  ;;
42773  *)
42774  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42775for as_dir in $PATH
42776do
42777  IFS=$as_save_IFS
42778  test -z "$as_dir" && as_dir=.
42779    for ac_exec_ext in '' $ac_executable_extensions; do
42780  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42781    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
42782    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42783    break 2
42784  fi
42785done
42786  done
42787IFS=$as_save_IFS
42788
42789  ;;
42790esac
42791fi
42792OBJCOPY=$ac_cv_path_OBJCOPY
42793if test -n "$OBJCOPY"; then
42794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42795$as_echo "$OBJCOPY" >&6; }
42796else
42797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42798$as_echo "no" >&6; }
42799fi
42800
42801
42802          if test "x$OBJCOPY" = x; then
42803            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42804          fi
42805        else
42806          # Otherwise we believe it is a complete path. Use it as it is.
42807          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
42808$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
42809          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42810$as_echo_n "checking for OBJCOPY... " >&6; }
42811          if test ! -x "$tool_specified"; then
42812            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42813$as_echo "not found" >&6; }
42814            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
42815          fi
42816          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42817$as_echo "$tool_specified" >&6; }
42818        fi
42819      fi
42820    fi
42821
42822  fi
42823
42824
42825    # Only call fixup if objcopy was found.
42826    if test -n "$OBJCOPY"; then
42827
42828  # Only process if variable expands to non-empty
42829
42830  if test "x$OBJCOPY" != x; then
42831    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42832
42833  # First separate the path from the arguments. This will split at the first
42834  # space.
42835  complete="$OBJCOPY"
42836  path="${complete%% *}"
42837  tmp="$complete EOL"
42838  arguments="${tmp#* }"
42839
42840  # Input might be given as Windows format, start by converting to
42841  # unix format.
42842  new_path=`$CYGPATH -u "$path"`
42843
42844  # Now try to locate executable using which
42845  new_path=`$WHICH "$new_path" 2> /dev/null`
42846  # bat and cmd files are not always considered executable in cygwin causing which
42847  # to not find them
42848  if test "x$new_path" = x \
42849      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42850      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42851    new_path=`$CYGPATH -u "$path"`
42852  fi
42853  if test "x$new_path" = x; then
42854    # Oops. Which didn't find the executable.
42855    # The splitting of arguments from the executable at a space might have been incorrect,
42856    # since paths with space are more likely in Windows. Give it another try with the whole
42857    # argument.
42858    path="$complete"
42859    arguments="EOL"
42860    new_path=`$CYGPATH -u "$path"`
42861    new_path=`$WHICH "$new_path" 2> /dev/null`
42862    # bat and cmd files are not always considered executable in cygwin causing which
42863    # to not find them
42864    if test "x$new_path" = x \
42865        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42866        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42867      new_path=`$CYGPATH -u "$path"`
42868    fi
42869    if test "x$new_path" = x; then
42870      # It's still not found. Now this is an unrecoverable error.
42871      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42872$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42873      has_space=`$ECHO "$complete" | $GREP " "`
42874      if test "x$has_space" != x; then
42875        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42876$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42877      fi
42878      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42879    fi
42880  fi
42881
42882  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42883  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42884  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42885  # "foo.exe" is OK but "foo" is an error.
42886  #
42887  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42888  # It is also a way to make sure we got the proper file name for the real test later on.
42889  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42890  if test "x$test_shortpath" = x; then
42891    # Short path failed, file does not exist as specified.
42892    # Try adding .exe or .cmd
42893    if test -f "${new_path}.exe"; then
42894      input_to_shortpath="${new_path}.exe"
42895    elif test -f "${new_path}.cmd"; then
42896      input_to_shortpath="${new_path}.cmd"
42897    else
42898      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
42899$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
42900      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42901$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42902      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42903    fi
42904  else
42905    input_to_shortpath="$new_path"
42906  fi
42907
42908  # Call helper function which possibly converts this using DOS-style short mode.
42909  # If so, the updated path is stored in $new_path.
42910  new_path="$input_to_shortpath"
42911
42912  input_path="$input_to_shortpath"
42913  # Check if we need to convert this using DOS-style short mode. If the path
42914  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42915  # take no chances and rewrite it.
42916  # Note: m4 eats our [], so we need to use [ and ] instead.
42917  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42918  if test "x$has_forbidden_chars" != x; then
42919    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42920    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42921    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42922    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42923      # Going to short mode and back again did indeed matter. Since short mode is
42924      # case insensitive, let's make it lowercase to improve readability.
42925      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42926      # Now convert it back to Unix-style (cygpath)
42927      input_path=`$CYGPATH -u "$shortmode_path"`
42928      new_path="$input_path"
42929    fi
42930  fi
42931
42932  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42933  if test "x$test_cygdrive_prefix" = x; then
42934    # As a simple fix, exclude /usr/bin since it's not a real path.
42935    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42936      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42937      # a path prefixed by /cygdrive for fixpath to work.
42938      new_path="$CYGWIN_ROOT_PATH$input_path"
42939    fi
42940  fi
42941
42942  # remove trailing .exe if any
42943  new_path="${new_path/%.exe/}"
42944
42945    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42946
42947  # First separate the path from the arguments. This will split at the first
42948  # space.
42949  complete="$OBJCOPY"
42950  path="${complete%% *}"
42951  tmp="$complete EOL"
42952  arguments="${tmp#* }"
42953
42954  # Input might be given as Windows format, start by converting to
42955  # unix format.
42956  new_path="$path"
42957
42958  windows_path="$new_path"
42959  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42960    unix_path=`$CYGPATH -u "$windows_path"`
42961    new_path="$unix_path"
42962  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42963    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42964    new_path="$unix_path"
42965  fi
42966
42967
42968  # Now try to locate executable using which
42969  new_path=`$WHICH "$new_path" 2> /dev/null`
42970
42971  if test "x$new_path" = x; then
42972    # Oops. Which didn't find the executable.
42973    # The splitting of arguments from the executable at a space might have been incorrect,
42974    # since paths with space are more likely in Windows. Give it another try with the whole
42975    # argument.
42976    path="$complete"
42977    arguments="EOL"
42978    new_path="$path"
42979
42980  windows_path="$new_path"
42981  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42982    unix_path=`$CYGPATH -u "$windows_path"`
42983    new_path="$unix_path"
42984  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42985    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42986    new_path="$unix_path"
42987  fi
42988
42989
42990    new_path=`$WHICH "$new_path" 2> /dev/null`
42991    # bat and cmd files are not always considered executable in MSYS causing which
42992    # to not find them
42993    if test "x$new_path" = x \
42994        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42995        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42996      new_path="$path"
42997
42998  windows_path="$new_path"
42999  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43000    unix_path=`$CYGPATH -u "$windows_path"`
43001    new_path="$unix_path"
43002  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43003    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43004    new_path="$unix_path"
43005  fi
43006
43007    fi
43008
43009    if test "x$new_path" = x; then
43010      # It's still not found. Now this is an unrecoverable error.
43011      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43012$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43013      has_space=`$ECHO "$complete" | $GREP " "`
43014      if test "x$has_space" != x; then
43015        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43016$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43017      fi
43018      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43019    fi
43020  fi
43021
43022  # Now new_path has a complete unix path to the binary
43023  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43024    # Keep paths in /bin as-is, but remove trailing .exe if any
43025    new_path="${new_path/%.exe/}"
43026    # Do not save /bin paths to all_fixpath_prefixes!
43027  else
43028    # Not in mixed or Windows style, start by that.
43029    new_path=`cmd //c echo $new_path`
43030
43031  input_path="$new_path"
43032  # Check if we need to convert this using DOS-style short mode. If the path
43033  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43034  # take no chances and rewrite it.
43035  # Note: m4 eats our [], so we need to use [ and ] instead.
43036  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43037  if test "x$has_forbidden_chars" != x; then
43038    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43039    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43040  fi
43041
43042    # Output is in $new_path
43043
43044  windows_path="$new_path"
43045  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43046    unix_path=`$CYGPATH -u "$windows_path"`
43047    new_path="$unix_path"
43048  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43049    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43050    new_path="$unix_path"
43051  fi
43052
43053    # remove trailing .exe if any
43054    new_path="${new_path/%.exe/}"
43055
43056    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43057    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43058  fi
43059
43060    else
43061      # We're on a unix platform. Hooray! :)
43062      # First separate the path from the arguments. This will split at the first
43063      # space.
43064      complete="$OBJCOPY"
43065      path="${complete%% *}"
43066      tmp="$complete EOL"
43067      arguments="${tmp#* }"
43068
43069      # Cannot rely on the command "which" here since it doesn't always work.
43070      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43071      if test -z "$is_absolute_path"; then
43072        # Path to executable is not absolute. Find it.
43073        IFS_save="$IFS"
43074        IFS=:
43075        for p in $PATH; do
43076          if test -f "$p/$path" && test -x "$p/$path"; then
43077            new_path="$p/$path"
43078            break
43079          fi
43080        done
43081        IFS="$IFS_save"
43082      else
43083        # This is an absolute path, we can use it without further modifications.
43084        new_path="$path"
43085      fi
43086
43087      if test "x$new_path" = x; then
43088        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43089$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43090        has_space=`$ECHO "$complete" | $GREP " "`
43091        if test "x$has_space" != x; then
43092          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43093$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43094        fi
43095        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43096      fi
43097    fi
43098
43099    # Now join together the path and the arguments once again
43100    if test "x$arguments" != xEOL; then
43101      new_complete="$new_path ${arguments% *}"
43102    else
43103      new_complete="$new_path"
43104    fi
43105
43106    if test "x$complete" != "x$new_complete"; then
43107      OBJCOPY="$new_complete"
43108      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
43109$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
43110    fi
43111  fi
43112
43113      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
43114        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
43115        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
43116        # - version number is last blank separate word on first line
43117        # - version number formats that have been seen:
43118        #   - <major>.<minor>
43119        #   - <major>.<minor>.<micro>
43120        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
43121        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
43122         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
43123              -e 's/.* //' \
43124              -e '/^[01]\./b bad' \
43125              -e '/^2\./{' \
43126              -e '  s/^2\.//' \
43127              -e '  /^[0-9]$/b bad' \
43128              -e '  /^[0-9]\./b bad' \
43129              -e '  /^1[0-9]$/b bad' \
43130              -e '  /^1[0-9]\./b bad' \
43131              -e '  /^20\./b bad' \
43132              -e '  /^21\.0$/b bad' \
43133              -e '  /^21\.0\./b bad' \
43134              -e '}' \
43135              -e ':good' \
43136              -e 's/.*/VALID_VERSION/p' \
43137              -e 'q' \
43138              -e ':bad' \
43139              -e 's/.*/BAD_VERSION/p' \
43140              -e 'q'`
43141        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
43142          OBJCOPY=
43143          { $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
43144$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
43145          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
43146$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
43147          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
43148$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
43149          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
43150$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
43151          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
43152$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
43153        fi
43154      fi
43155    fi
43156  fi
43157
43158
43159
43160  # Publish this variable in the help.
43161
43162
43163  if [ -z "${OBJDUMP+x}" ]; then
43164    # The variable is not set by user, try to locate tool using the code snippet
43165    if test -n "$ac_tool_prefix"; then
43166  for ac_prog in gobjdump objdump
43167  do
43168    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43169set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43171$as_echo_n "checking for $ac_word... " >&6; }
43172if ${ac_cv_prog_OBJDUMP+:} false; then :
43173  $as_echo_n "(cached) " >&6
43174else
43175  if test -n "$OBJDUMP"; then
43176  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43177else
43178as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43179for as_dir in $PATH
43180do
43181  IFS=$as_save_IFS
43182  test -z "$as_dir" && as_dir=.
43183    for ac_exec_ext in '' $ac_executable_extensions; do
43184  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43185    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43186    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43187    break 2
43188  fi
43189done
43190  done
43191IFS=$as_save_IFS
43192
43193fi
43194fi
43195OBJDUMP=$ac_cv_prog_OBJDUMP
43196if test -n "$OBJDUMP"; then
43197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43198$as_echo "$OBJDUMP" >&6; }
43199else
43200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43201$as_echo "no" >&6; }
43202fi
43203
43204
43205    test -n "$OBJDUMP" && break
43206  done
43207fi
43208if test -z "$OBJDUMP"; then
43209  ac_ct_OBJDUMP=$OBJDUMP
43210  for ac_prog in gobjdump objdump
43211do
43212  # Extract the first word of "$ac_prog", so it can be a program name with args.
43213set dummy $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_ac_ct_OBJDUMP+:} false; then :
43217  $as_echo_n "(cached) " >&6
43218else
43219  if test -n "$ac_ct_OBJDUMP"; then
43220  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_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_ac_ct_OBJDUMP="$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
43239ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43240if test -n "$ac_ct_OBJDUMP"; then
43241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43242$as_echo "$ac_ct_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 "$ac_ct_OBJDUMP" && break
43250done
43251
43252  if test "x$ac_ct_OBJDUMP" = x; then
43253    OBJDUMP=""
43254  else
43255    case $cross_compiling:$ac_tool_warned in
43256yes:)
43257{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43258$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43259ac_tool_warned=yes ;;
43260esac
43261    OBJDUMP=$ac_ct_OBJDUMP
43262  fi
43263fi
43264
43265  else
43266    # The variable is set, but is it from the command line or the environment?
43267
43268    # Try to remove the string !OBJDUMP! from our list.
43269    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
43270    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43271      # If it failed, the variable was not from the command line. Ignore it,
43272      # but warn the user (except for BASH, which is always set by the calling BASH).
43273      if test "xOBJDUMP" != xBASH; then
43274        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
43275$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
43276      fi
43277      # Try to locate tool using the code snippet
43278      if test -n "$ac_tool_prefix"; then
43279  for ac_prog in gobjdump objdump
43280  do
43281    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43282set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43284$as_echo_n "checking for $ac_word... " >&6; }
43285if ${ac_cv_prog_OBJDUMP+:} false; then :
43286  $as_echo_n "(cached) " >&6
43287else
43288  if test -n "$OBJDUMP"; then
43289  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43290else
43291as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43292for as_dir in $PATH
43293do
43294  IFS=$as_save_IFS
43295  test -z "$as_dir" && as_dir=.
43296    for ac_exec_ext in '' $ac_executable_extensions; do
43297  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43298    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43299    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43300    break 2
43301  fi
43302done
43303  done
43304IFS=$as_save_IFS
43305
43306fi
43307fi
43308OBJDUMP=$ac_cv_prog_OBJDUMP
43309if test -n "$OBJDUMP"; then
43310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43311$as_echo "$OBJDUMP" >&6; }
43312else
43313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43314$as_echo "no" >&6; }
43315fi
43316
43317
43318    test -n "$OBJDUMP" && break
43319  done
43320fi
43321if test -z "$OBJDUMP"; then
43322  ac_ct_OBJDUMP=$OBJDUMP
43323  for ac_prog in gobjdump objdump
43324do
43325  # Extract the first word of "$ac_prog", so it can be a program name with args.
43326set dummy $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_ac_ct_OBJDUMP+:} false; then :
43330  $as_echo_n "(cached) " >&6
43331else
43332  if test -n "$ac_ct_OBJDUMP"; then
43333  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_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_ac_ct_OBJDUMP="$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
43352ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43353if test -n "$ac_ct_OBJDUMP"; then
43354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43355$as_echo "$ac_ct_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 "$ac_ct_OBJDUMP" && break
43363done
43364
43365  if test "x$ac_ct_OBJDUMP" = x; then
43366    OBJDUMP=""
43367  else
43368    case $cross_compiling:$ac_tool_warned in
43369yes:)
43370{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43371$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43372ac_tool_warned=yes ;;
43373esac
43374    OBJDUMP=$ac_ct_OBJDUMP
43375  fi
43376fi
43377
43378    else
43379      # If it succeeded, then it was overridden by the user. We will use it
43380      # for the tool.
43381
43382      # First remove it from the list of overridden variables, so we can test
43383      # for unknown variables in the end.
43384      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43385
43386      # Check if we try to supply an empty value
43387      if test "x$OBJDUMP" = x; then
43388        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
43389$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
43390        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43391$as_echo_n "checking for OBJDUMP... " >&6; }
43392        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43393$as_echo "disabled" >&6; }
43394      else
43395        # Check if the provided tool contains a complete path.
43396        tool_specified="$OBJDUMP"
43397        tool_basename="${tool_specified##*/}"
43398        if test "x$tool_basename" = "x$tool_specified"; then
43399          # A command without a complete path is provided, search $PATH.
43400          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
43401$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
43402          # Extract the first word of "$tool_basename", so it can be a program name with args.
43403set dummy $tool_basename; ac_word=$2
43404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43405$as_echo_n "checking for $ac_word... " >&6; }
43406if ${ac_cv_path_OBJDUMP+:} false; then :
43407  $as_echo_n "(cached) " >&6
43408else
43409  case $OBJDUMP in
43410  [\\/]* | ?:[\\/]*)
43411  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
43412  ;;
43413  *)
43414  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43415for as_dir in $PATH
43416do
43417  IFS=$as_save_IFS
43418  test -z "$as_dir" && as_dir=.
43419    for ac_exec_ext in '' $ac_executable_extensions; do
43420  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43421    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
43422    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43423    break 2
43424  fi
43425done
43426  done
43427IFS=$as_save_IFS
43428
43429  ;;
43430esac
43431fi
43432OBJDUMP=$ac_cv_path_OBJDUMP
43433if test -n "$OBJDUMP"; then
43434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43435$as_echo "$OBJDUMP" >&6; }
43436else
43437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43438$as_echo "no" >&6; }
43439fi
43440
43441
43442          if test "x$OBJDUMP" = x; then
43443            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43444          fi
43445        else
43446          # Otherwise we believe it is a complete path. Use it as it is.
43447          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
43448$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
43449          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43450$as_echo_n "checking for OBJDUMP... " >&6; }
43451          if test ! -x "$tool_specified"; then
43452            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43453$as_echo "not found" >&6; }
43454            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
43455          fi
43456          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43457$as_echo "$tool_specified" >&6; }
43458        fi
43459      fi
43460    fi
43461
43462  fi
43463
43464
43465  if test "x$OBJDUMP" != x; then
43466    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
43467    # bails if argument is missing.
43468
43469  # Only process if variable expands to non-empty
43470
43471  if test "x$OBJDUMP" != x; then
43472    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43473
43474  # First separate the path from the arguments. This will split at the first
43475  # space.
43476  complete="$OBJDUMP"
43477  path="${complete%% *}"
43478  tmp="$complete EOL"
43479  arguments="${tmp#* }"
43480
43481  # Input might be given as Windows format, start by converting to
43482  # unix format.
43483  new_path=`$CYGPATH -u "$path"`
43484
43485  # Now try to locate executable using which
43486  new_path=`$WHICH "$new_path" 2> /dev/null`
43487  # bat and cmd files are not always considered executable in cygwin causing which
43488  # to not find them
43489  if test "x$new_path" = x \
43490      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43491      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43492    new_path=`$CYGPATH -u "$path"`
43493  fi
43494  if test "x$new_path" = x; then
43495    # Oops. Which didn't find the executable.
43496    # The splitting of arguments from the executable at a space might have been incorrect,
43497    # since paths with space are more likely in Windows. Give it another try with the whole
43498    # argument.
43499    path="$complete"
43500    arguments="EOL"
43501    new_path=`$CYGPATH -u "$path"`
43502    new_path=`$WHICH "$new_path" 2> /dev/null`
43503    # bat and cmd files are not always considered executable in cygwin causing which
43504    # to not find them
43505    if test "x$new_path" = x \
43506        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43507        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43508      new_path=`$CYGPATH -u "$path"`
43509    fi
43510    if test "x$new_path" = x; then
43511      # It's still not found. Now this is an unrecoverable error.
43512      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43513$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43514      has_space=`$ECHO "$complete" | $GREP " "`
43515      if test "x$has_space" != x; then
43516        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43517$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43518      fi
43519      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43520    fi
43521  fi
43522
43523  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43524  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43525  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43526  # "foo.exe" is OK but "foo" is an error.
43527  #
43528  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43529  # It is also a way to make sure we got the proper file name for the real test later on.
43530  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43531  if test "x$test_shortpath" = x; then
43532    # Short path failed, file does not exist as specified.
43533    # Try adding .exe or .cmd
43534    if test -f "${new_path}.exe"; then
43535      input_to_shortpath="${new_path}.exe"
43536    elif test -f "${new_path}.cmd"; then
43537      input_to_shortpath="${new_path}.cmd"
43538    else
43539      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
43540$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
43541      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43542$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43543      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43544    fi
43545  else
43546    input_to_shortpath="$new_path"
43547  fi
43548
43549  # Call helper function which possibly converts this using DOS-style short mode.
43550  # If so, the updated path is stored in $new_path.
43551  new_path="$input_to_shortpath"
43552
43553  input_path="$input_to_shortpath"
43554  # Check if we need to convert this using DOS-style short mode. If the path
43555  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43556  # take no chances and rewrite it.
43557  # Note: m4 eats our [], so we need to use [ and ] instead.
43558  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43559  if test "x$has_forbidden_chars" != x; then
43560    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43561    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43562    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43563    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43564      # Going to short mode and back again did indeed matter. Since short mode is
43565      # case insensitive, let's make it lowercase to improve readability.
43566      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43567      # Now convert it back to Unix-style (cygpath)
43568      input_path=`$CYGPATH -u "$shortmode_path"`
43569      new_path="$input_path"
43570    fi
43571  fi
43572
43573  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43574  if test "x$test_cygdrive_prefix" = x; then
43575    # As a simple fix, exclude /usr/bin since it's not a real path.
43576    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43577      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43578      # a path prefixed by /cygdrive for fixpath to work.
43579      new_path="$CYGWIN_ROOT_PATH$input_path"
43580    fi
43581  fi
43582
43583  # remove trailing .exe if any
43584  new_path="${new_path/%.exe/}"
43585
43586    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43587
43588  # First separate the path from the arguments. This will split at the first
43589  # space.
43590  complete="$OBJDUMP"
43591  path="${complete%% *}"
43592  tmp="$complete EOL"
43593  arguments="${tmp#* }"
43594
43595  # Input might be given as Windows format, start by converting to
43596  # unix format.
43597  new_path="$path"
43598
43599  windows_path="$new_path"
43600  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43601    unix_path=`$CYGPATH -u "$windows_path"`
43602    new_path="$unix_path"
43603  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43604    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43605    new_path="$unix_path"
43606  fi
43607
43608
43609  # Now try to locate executable using which
43610  new_path=`$WHICH "$new_path" 2> /dev/null`
43611
43612  if test "x$new_path" = x; then
43613    # Oops. Which didn't find the executable.
43614    # The splitting of arguments from the executable at a space might have been incorrect,
43615    # since paths with space are more likely in Windows. Give it another try with the whole
43616    # argument.
43617    path="$complete"
43618    arguments="EOL"
43619    new_path="$path"
43620
43621  windows_path="$new_path"
43622  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43623    unix_path=`$CYGPATH -u "$windows_path"`
43624    new_path="$unix_path"
43625  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43626    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43627    new_path="$unix_path"
43628  fi
43629
43630
43631    new_path=`$WHICH "$new_path" 2> /dev/null`
43632    # bat and cmd files are not always considered executable in MSYS causing which
43633    # to not find them
43634    if test "x$new_path" = x \
43635        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43636        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43637      new_path="$path"
43638
43639  windows_path="$new_path"
43640  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43641    unix_path=`$CYGPATH -u "$windows_path"`
43642    new_path="$unix_path"
43643  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43644    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43645    new_path="$unix_path"
43646  fi
43647
43648    fi
43649
43650    if test "x$new_path" = x; then
43651      # It's still not found. Now this is an unrecoverable error.
43652      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43653$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43654      has_space=`$ECHO "$complete" | $GREP " "`
43655      if test "x$has_space" != x; then
43656        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43657$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43658      fi
43659      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43660    fi
43661  fi
43662
43663  # Now new_path has a complete unix path to the binary
43664  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43665    # Keep paths in /bin as-is, but remove trailing .exe if any
43666    new_path="${new_path/%.exe/}"
43667    # Do not save /bin paths to all_fixpath_prefixes!
43668  else
43669    # Not in mixed or Windows style, start by that.
43670    new_path=`cmd //c echo $new_path`
43671
43672  input_path="$new_path"
43673  # Check if we need to convert this using DOS-style short mode. If the path
43674  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43675  # take no chances and rewrite it.
43676  # Note: m4 eats our [], so we need to use [ and ] instead.
43677  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43678  if test "x$has_forbidden_chars" != x; then
43679    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43680    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43681  fi
43682
43683    # Output is in $new_path
43684
43685  windows_path="$new_path"
43686  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43687    unix_path=`$CYGPATH -u "$windows_path"`
43688    new_path="$unix_path"
43689  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43690    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43691    new_path="$unix_path"
43692  fi
43693
43694    # remove trailing .exe if any
43695    new_path="${new_path/%.exe/}"
43696
43697    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43698    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43699  fi
43700
43701    else
43702      # We're on a unix platform. Hooray! :)
43703      # First separate the path from the arguments. This will split at the first
43704      # space.
43705      complete="$OBJDUMP"
43706      path="${complete%% *}"
43707      tmp="$complete EOL"
43708      arguments="${tmp#* }"
43709
43710      # Cannot rely on the command "which" here since it doesn't always work.
43711      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43712      if test -z "$is_absolute_path"; then
43713        # Path to executable is not absolute. Find it.
43714        IFS_save="$IFS"
43715        IFS=:
43716        for p in $PATH; do
43717          if test -f "$p/$path" && test -x "$p/$path"; then
43718            new_path="$p/$path"
43719            break
43720          fi
43721        done
43722        IFS="$IFS_save"
43723      else
43724        # This is an absolute path, we can use it without further modifications.
43725        new_path="$path"
43726      fi
43727
43728      if test "x$new_path" = x; then
43729        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43730$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43731        has_space=`$ECHO "$complete" | $GREP " "`
43732        if test "x$has_space" != x; then
43733          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43734$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43735        fi
43736        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43737      fi
43738    fi
43739
43740    # Now join together the path and the arguments once again
43741    if test "x$arguments" != xEOL; then
43742      new_complete="$new_path ${arguments% *}"
43743    else
43744      new_complete="$new_path"
43745    fi
43746
43747    if test "x$complete" != "x$new_complete"; then
43748      OBJDUMP="$new_complete"
43749      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
43750$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
43751    fi
43752  fi
43753
43754  fi
43755
43756
43757  # Restore old path, except for the microsoft toolchain, which requires VS_PATH
43758  # to remain in place. Otherwise the compiler will not work in some siutations
43759  # in later configure checks.
43760  if test "x$TOOLCHAIN_TYPE" != "xmicrosoft"; then
43761    PATH="$OLD_PATH"
43762  fi
43763
43764  # Restore the flags to the user specified values.
43765  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
43766  CFLAGS="$ORG_CFLAGS"
43767  CXXFLAGS="$ORG_CXXFLAGS"
43768
43769
43770# Finally do some processing after the detection phase
43771
43772  if test "x$COMPILE_TYPE" = "xcross"; then
43773    # Now we need to find a C/C++ compiler that can build executables for the
43774    # build platform. We can't use the AC_PROG_CC macro, since it can only be
43775    # used once. Also, we need to do this without adding a tools dir to the
43776    # path, otherwise we might pick up cross-compilers which don't use standard
43777    # naming.
43778
43779    OLDPATH="$PATH"
43780
43781
43782# Check whether --with-build-devkit was given.
43783if test "${with_build_devkit+set}" = set; then :
43784  withval=$with_build_devkit;
43785fi
43786
43787    if test "x$with_build_devkit" = "xyes"; then
43788      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
43789    elif test -n "$with_build_devkit"; then
43790      if test ! -d "$with_build_devkit"; then
43791        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
43792      else
43793
43794  # Only process if variable expands to non-empty
43795
43796  if test "x$with_build_devkit" != x; then
43797    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43798
43799  # Input might be given as Windows format, start by converting to
43800  # unix format.
43801  path="$with_build_devkit"
43802  new_path=`$CYGPATH -u "$path"`
43803
43804  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43805  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43806  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43807  # "foo.exe" is OK but "foo" is an error.
43808  #
43809  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43810  # It is also a way to make sure we got the proper file name for the real test later on.
43811  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43812  if test "x$test_shortpath" = x; then
43813    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43814$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43815    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
43816  fi
43817
43818  # Call helper function which possibly converts this using DOS-style short mode.
43819  # If so, the updated path is stored in $new_path.
43820
43821  input_path="$new_path"
43822  # Check if we need to convert this using DOS-style short mode. If the path
43823  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43824  # take no chances and rewrite it.
43825  # Note: m4 eats our [], so we need to use [ and ] instead.
43826  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43827  if test "x$has_forbidden_chars" != x; then
43828    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43829    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43830    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43831    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43832      # Going to short mode and back again did indeed matter. Since short mode is
43833      # case insensitive, let's make it lowercase to improve readability.
43834      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43835      # Now convert it back to Unix-style (cygpath)
43836      input_path=`$CYGPATH -u "$shortmode_path"`
43837      new_path="$input_path"
43838    fi
43839  fi
43840
43841  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43842  if test "x$test_cygdrive_prefix" = x; then
43843    # As a simple fix, exclude /usr/bin since it's not a real path.
43844    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43845      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43846      # a path prefixed by /cygdrive for fixpath to work.
43847      new_path="$CYGWIN_ROOT_PATH$input_path"
43848    fi
43849  fi
43850
43851
43852  if test "x$path" != "x$new_path"; then
43853    with_build_devkit="$new_path"
43854    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43855$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43856  fi
43857
43858    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43859
43860  path="$with_build_devkit"
43861  has_colon=`$ECHO $path | $GREP ^.:`
43862  new_path="$path"
43863  if test "x$has_colon" = x; then
43864    # Not in mixed or Windows style, start by that.
43865    new_path=`cmd //c echo $path`
43866  fi
43867
43868
43869  input_path="$new_path"
43870  # Check if we need to convert this using DOS-style short mode. If the path
43871  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43872  # take no chances and rewrite it.
43873  # Note: m4 eats our [], so we need to use [ and ] instead.
43874  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43875  if test "x$has_forbidden_chars" != x; then
43876    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43877    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43878  fi
43879
43880
43881  windows_path="$new_path"
43882  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43883    unix_path=`$CYGPATH -u "$windows_path"`
43884    new_path="$unix_path"
43885  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43886    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43887    new_path="$unix_path"
43888  fi
43889
43890  if test "x$path" != "x$new_path"; then
43891    with_build_devkit="$new_path"
43892    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43893$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43894  fi
43895
43896  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43897  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43898
43899    else
43900      # We're on a unix platform. Hooray! :)
43901      path="$with_build_devkit"
43902      has_space=`$ECHO "$path" | $GREP " "`
43903      if test "x$has_space" != x; then
43904        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43905$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43906        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43907      fi
43908
43909      # Use eval to expand a potential ~
43910      eval path="$path"
43911      if test ! -f "$path" && test ! -d "$path"; then
43912        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
43913      fi
43914
43915      if test -d "$path"; then
43916        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
43917      else
43918        dir="`$DIRNAME "$path"`"
43919        base="`$BASENAME "$path"`"
43920        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
43921      fi
43922    fi
43923  fi
43924
43925        BUILD_DEVKIT_ROOT="$with_build_devkit"
43926        # Check for a meta data info file in the root of the devkit
43927        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
43928          # Process devkit.info so that existing devkit variables are not
43929          # modified by this
43930          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
43931              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
43932              -e "s/\$host/\$build/g" \
43933              $BUILD_DEVKIT_ROOT/devkit.info \
43934              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43935          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43936          # This potentially sets the following:
43937          # A descriptive name of the devkit
43938
43939  if test "x$BUILD_DEVKIT_NAME" = x; then
43940    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
43941  fi
43942
43943          # Corresponds to --with-extra-path
43944
43945  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
43946    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
43947  fi
43948
43949          # Corresponds to --with-toolchain-path
43950
43951  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43952    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
43953  fi
43954
43955          # Corresponds to --with-sysroot
43956
43957  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
43958    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
43959  fi
43960
43961          # Skip the Window specific parts
43962        fi
43963
43964        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
43965$as_echo_n "checking for build platform devkit... " >&6; }
43966        if test "x$BUILD_DEVKIT_NAME" != x; then
43967          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
43968$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
43969        else
43970          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
43971$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
43972        fi
43973
43974        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
43975
43976  if test "x$BUILD_SYSROOT" != "x"; then
43977    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43978      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43979        # Solaris Studio does not have a concept of sysroot. Instead we must
43980        # make sure the default include and lib dirs are appended to each
43981        # compile and link command line. Must also add -I-xbuiltin to enable
43982        # inlining of system functions and intrinsics.
43983        BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
43984        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
43985            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
43986      fi
43987    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
43988      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
43989      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
43990    elif test "x$TOOLCHAIN_TYPE" = xclang; then
43991      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
43992      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
43993    fi
43994    # Propagate the sysroot args to hotspot
43995    BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
43996    BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
43997    BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
43998    # The global CFLAGS and LDFLAGS variables need these for configure to function
43999    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
44000    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
44001    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44002    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44003  fi
44004
44005  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44006    # We also need -iframework<path>/System/Library/Frameworks
44007    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44008    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44009    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
44010    # set this here so it doesn't have to be peppered throughout the forest
44011    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44012    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44013  fi
44014
44015
44016
44017
44018
44019         # Fallback default of just /bin if DEVKIT_PATH is not defined
44020        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44021          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
44022        fi
44023        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
44024      fi
44025    fi
44026
44027    # FIXME: we should list the discovered compilers as an exclude pattern!
44028    # If we do that, we can do this detection before POST_DETECTION, and still
44029    # find the build compilers in the tools dir, if needed.
44030
44031
44032
44033  # Publish this variable in the help.
44034
44035
44036  if [ -z "${BUILD_CC+x}" ]; then
44037    # The variable is not set by user, try to locate tool using the code snippet
44038    for ac_prog in cl cc gcc
44039do
44040  # Extract the first word of "$ac_prog", so it can be a program name with args.
44041set dummy $ac_prog; ac_word=$2
44042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44043$as_echo_n "checking for $ac_word... " >&6; }
44044if ${ac_cv_path_BUILD_CC+:} false; then :
44045  $as_echo_n "(cached) " >&6
44046else
44047  case $BUILD_CC in
44048  [\\/]* | ?:[\\/]*)
44049  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44050  ;;
44051  *)
44052  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44053for as_dir in $PATH
44054do
44055  IFS=$as_save_IFS
44056  test -z "$as_dir" && as_dir=.
44057    for ac_exec_ext in '' $ac_executable_extensions; do
44058  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44059    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44060    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44061    break 2
44062  fi
44063done
44064  done
44065IFS=$as_save_IFS
44066
44067  ;;
44068esac
44069fi
44070BUILD_CC=$ac_cv_path_BUILD_CC
44071if test -n "$BUILD_CC"; then
44072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44073$as_echo "$BUILD_CC" >&6; }
44074else
44075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44076$as_echo "no" >&6; }
44077fi
44078
44079
44080  test -n "$BUILD_CC" && break
44081done
44082
44083  else
44084    # The variable is set, but is it from the command line or the environment?
44085
44086    # Try to remove the string !BUILD_CC! from our list.
44087    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
44088    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44089      # If it failed, the variable was not from the command line. Ignore it,
44090      # but warn the user (except for BASH, which is always set by the calling BASH).
44091      if test "xBUILD_CC" != xBASH; then
44092        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
44093$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
44094      fi
44095      # Try to locate tool using the code snippet
44096      for ac_prog in cl cc gcc
44097do
44098  # Extract the first word of "$ac_prog", so it can be a program name with args.
44099set dummy $ac_prog; ac_word=$2
44100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44101$as_echo_n "checking for $ac_word... " >&6; }
44102if ${ac_cv_path_BUILD_CC+:} false; then :
44103  $as_echo_n "(cached) " >&6
44104else
44105  case $BUILD_CC in
44106  [\\/]* | ?:[\\/]*)
44107  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44108  ;;
44109  *)
44110  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44111for as_dir in $PATH
44112do
44113  IFS=$as_save_IFS
44114  test -z "$as_dir" && as_dir=.
44115    for ac_exec_ext in '' $ac_executable_extensions; do
44116  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44117    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44118    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44119    break 2
44120  fi
44121done
44122  done
44123IFS=$as_save_IFS
44124
44125  ;;
44126esac
44127fi
44128BUILD_CC=$ac_cv_path_BUILD_CC
44129if test -n "$BUILD_CC"; then
44130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44131$as_echo "$BUILD_CC" >&6; }
44132else
44133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44134$as_echo "no" >&6; }
44135fi
44136
44137
44138  test -n "$BUILD_CC" && break
44139done
44140
44141    else
44142      # If it succeeded, then it was overridden by the user. We will use it
44143      # for the tool.
44144
44145      # First remove it from the list of overridden variables, so we can test
44146      # for unknown variables in the end.
44147      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44148
44149      # Check if we try to supply an empty value
44150      if test "x$BUILD_CC" = x; then
44151        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
44152$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
44153        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44154$as_echo_n "checking for BUILD_CC... " >&6; }
44155        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44156$as_echo "disabled" >&6; }
44157      else
44158        # Check if the provided tool contains a complete path.
44159        tool_specified="$BUILD_CC"
44160        tool_basename="${tool_specified##*/}"
44161        if test "x$tool_basename" = "x$tool_specified"; then
44162          # A command without a complete path is provided, search $PATH.
44163          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
44164$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
44165          # Extract the first word of "$tool_basename", so it can be a program name with args.
44166set dummy $tool_basename; ac_word=$2
44167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44168$as_echo_n "checking for $ac_word... " >&6; }
44169if ${ac_cv_path_BUILD_CC+:} false; then :
44170  $as_echo_n "(cached) " >&6
44171else
44172  case $BUILD_CC in
44173  [\\/]* | ?:[\\/]*)
44174  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44175  ;;
44176  *)
44177  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44178for as_dir in $PATH
44179do
44180  IFS=$as_save_IFS
44181  test -z "$as_dir" && as_dir=.
44182    for ac_exec_ext in '' $ac_executable_extensions; do
44183  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44184    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44185    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44186    break 2
44187  fi
44188done
44189  done
44190IFS=$as_save_IFS
44191
44192  ;;
44193esac
44194fi
44195BUILD_CC=$ac_cv_path_BUILD_CC
44196if test -n "$BUILD_CC"; then
44197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44198$as_echo "$BUILD_CC" >&6; }
44199else
44200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44201$as_echo "no" >&6; }
44202fi
44203
44204
44205          if test "x$BUILD_CC" = x; then
44206            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44207          fi
44208        else
44209          # Otherwise we believe it is a complete path. Use it as it is.
44210          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
44211$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
44212          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44213$as_echo_n "checking for BUILD_CC... " >&6; }
44214          if test ! -x "$tool_specified"; then
44215            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44216$as_echo "not found" >&6; }
44217            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
44218          fi
44219          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44220$as_echo "$tool_specified" >&6; }
44221        fi
44222      fi
44223    fi
44224
44225  fi
44226
44227
44228
44229  if test "x$BUILD_CC" = x; then
44230    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
44231  fi
44232
44233
44234
44235  # Only process if variable expands to non-empty
44236
44237  if test "x$BUILD_CC" != x; then
44238    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44239
44240  # First separate the path from the arguments. This will split at the first
44241  # space.
44242  complete="$BUILD_CC"
44243  path="${complete%% *}"
44244  tmp="$complete EOL"
44245  arguments="${tmp#* }"
44246
44247  # Input might be given as Windows format, start by converting to
44248  # unix format.
44249  new_path=`$CYGPATH -u "$path"`
44250
44251  # Now try to locate executable using which
44252  new_path=`$WHICH "$new_path" 2> /dev/null`
44253  # bat and cmd files are not always considered executable in cygwin causing which
44254  # to not find them
44255  if test "x$new_path" = x \
44256      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44257      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44258    new_path=`$CYGPATH -u "$path"`
44259  fi
44260  if test "x$new_path" = x; then
44261    # Oops. Which didn't find the executable.
44262    # The splitting of arguments from the executable at a space might have been incorrect,
44263    # since paths with space are more likely in Windows. Give it another try with the whole
44264    # argument.
44265    path="$complete"
44266    arguments="EOL"
44267    new_path=`$CYGPATH -u "$path"`
44268    new_path=`$WHICH "$new_path" 2> /dev/null`
44269    # bat and cmd files are not always considered executable in cygwin causing which
44270    # to not find them
44271    if test "x$new_path" = x \
44272        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44273        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44274      new_path=`$CYGPATH -u "$path"`
44275    fi
44276    if test "x$new_path" = x; then
44277      # It's still not found. Now this is an unrecoverable error.
44278      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44279$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44280      has_space=`$ECHO "$complete" | $GREP " "`
44281      if test "x$has_space" != x; then
44282        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44283$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44284      fi
44285      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44286    fi
44287  fi
44288
44289  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44290  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44291  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44292  # "foo.exe" is OK but "foo" is an error.
44293  #
44294  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44295  # It is also a way to make sure we got the proper file name for the real test later on.
44296  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44297  if test "x$test_shortpath" = x; then
44298    # Short path failed, file does not exist as specified.
44299    # Try adding .exe or .cmd
44300    if test -f "${new_path}.exe"; then
44301      input_to_shortpath="${new_path}.exe"
44302    elif test -f "${new_path}.cmd"; then
44303      input_to_shortpath="${new_path}.cmd"
44304    else
44305      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
44306$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
44307      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44308$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44309      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44310    fi
44311  else
44312    input_to_shortpath="$new_path"
44313  fi
44314
44315  # Call helper function which possibly converts this using DOS-style short mode.
44316  # If so, the updated path is stored in $new_path.
44317  new_path="$input_to_shortpath"
44318
44319  input_path="$input_to_shortpath"
44320  # Check if we need to convert this using DOS-style short mode. If the path
44321  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44322  # take no chances and rewrite it.
44323  # Note: m4 eats our [], so we need to use [ and ] instead.
44324  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44325  if test "x$has_forbidden_chars" != x; then
44326    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44327    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44328    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44329    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44330      # Going to short mode and back again did indeed matter. Since short mode is
44331      # case insensitive, let's make it lowercase to improve readability.
44332      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44333      # Now convert it back to Unix-style (cygpath)
44334      input_path=`$CYGPATH -u "$shortmode_path"`
44335      new_path="$input_path"
44336    fi
44337  fi
44338
44339  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44340  if test "x$test_cygdrive_prefix" = x; then
44341    # As a simple fix, exclude /usr/bin since it's not a real path.
44342    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44343      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44344      # a path prefixed by /cygdrive for fixpath to work.
44345      new_path="$CYGWIN_ROOT_PATH$input_path"
44346    fi
44347  fi
44348
44349  # remove trailing .exe if any
44350  new_path="${new_path/%.exe/}"
44351
44352    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44353
44354  # First separate the path from the arguments. This will split at the first
44355  # space.
44356  complete="$BUILD_CC"
44357  path="${complete%% *}"
44358  tmp="$complete EOL"
44359  arguments="${tmp#* }"
44360
44361  # Input might be given as Windows format, start by converting to
44362  # unix format.
44363  new_path="$path"
44364
44365  windows_path="$new_path"
44366  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44367    unix_path=`$CYGPATH -u "$windows_path"`
44368    new_path="$unix_path"
44369  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44370    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44371    new_path="$unix_path"
44372  fi
44373
44374
44375  # Now try to locate executable using which
44376  new_path=`$WHICH "$new_path" 2> /dev/null`
44377
44378  if test "x$new_path" = x; then
44379    # Oops. Which didn't find the executable.
44380    # The splitting of arguments from the executable at a space might have been incorrect,
44381    # since paths with space are more likely in Windows. Give it another try with the whole
44382    # argument.
44383    path="$complete"
44384    arguments="EOL"
44385    new_path="$path"
44386
44387  windows_path="$new_path"
44388  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44389    unix_path=`$CYGPATH -u "$windows_path"`
44390    new_path="$unix_path"
44391  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44392    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44393    new_path="$unix_path"
44394  fi
44395
44396
44397    new_path=`$WHICH "$new_path" 2> /dev/null`
44398    # bat and cmd files are not always considered executable in MSYS causing which
44399    # to not find them
44400    if test "x$new_path" = x \
44401        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44402        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
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    fi
44415
44416    if test "x$new_path" = x; then
44417      # It's still not found. Now this is an unrecoverable error.
44418      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44419$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44420      has_space=`$ECHO "$complete" | $GREP " "`
44421      if test "x$has_space" != x; then
44422        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44423$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44424      fi
44425      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44426    fi
44427  fi
44428
44429  # Now new_path has a complete unix path to the binary
44430  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44431    # Keep paths in /bin as-is, but remove trailing .exe if any
44432    new_path="${new_path/%.exe/}"
44433    # Do not save /bin paths to all_fixpath_prefixes!
44434  else
44435    # Not in mixed or Windows style, start by that.
44436    new_path=`cmd //c echo $new_path`
44437
44438  input_path="$new_path"
44439  # Check if we need to convert this using DOS-style short mode. If the path
44440  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44441  # take no chances and rewrite it.
44442  # Note: m4 eats our [], so we need to use [ and ] instead.
44443  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44444  if test "x$has_forbidden_chars" != x; then
44445    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44446    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44447  fi
44448
44449    # Output is in $new_path
44450
44451  windows_path="$new_path"
44452  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44453    unix_path=`$CYGPATH -u "$windows_path"`
44454    new_path="$unix_path"
44455  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44456    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44457    new_path="$unix_path"
44458  fi
44459
44460    # remove trailing .exe if any
44461    new_path="${new_path/%.exe/}"
44462
44463    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44464    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44465  fi
44466
44467    else
44468      # We're on a unix platform. Hooray! :)
44469      # First separate the path from the arguments. This will split at the first
44470      # space.
44471      complete="$BUILD_CC"
44472      path="${complete%% *}"
44473      tmp="$complete EOL"
44474      arguments="${tmp#* }"
44475
44476      # Cannot rely on the command "which" here since it doesn't always work.
44477      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44478      if test -z "$is_absolute_path"; then
44479        # Path to executable is not absolute. Find it.
44480        IFS_save="$IFS"
44481        IFS=:
44482        for p in $PATH; do
44483          if test -f "$p/$path" && test -x "$p/$path"; then
44484            new_path="$p/$path"
44485            break
44486          fi
44487        done
44488        IFS="$IFS_save"
44489      else
44490        # This is an absolute path, we can use it without further modifications.
44491        new_path="$path"
44492      fi
44493
44494      if test "x$new_path" = x; then
44495        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44496$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44497        has_space=`$ECHO "$complete" | $GREP " "`
44498        if test "x$has_space" != x; then
44499          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44500$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44501        fi
44502        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44503      fi
44504    fi
44505
44506    # Now join together the path and the arguments once again
44507    if test "x$arguments" != xEOL; then
44508      new_complete="$new_path ${arguments% *}"
44509    else
44510      new_complete="$new_path"
44511    fi
44512
44513    if test "x$complete" != "x$new_complete"; then
44514      BUILD_CC="$new_complete"
44515      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
44516$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
44517    fi
44518  fi
44519
44520
44521
44522
44523  # Publish this variable in the help.
44524
44525
44526  if [ -z "${BUILD_CXX+x}" ]; then
44527    # The variable is not set by user, try to locate tool using the code snippet
44528    for ac_prog in cl CC g++
44529do
44530  # Extract the first word of "$ac_prog", so it can be a program name with args.
44531set dummy $ac_prog; ac_word=$2
44532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44533$as_echo_n "checking for $ac_word... " >&6; }
44534if ${ac_cv_path_BUILD_CXX+:} false; then :
44535  $as_echo_n "(cached) " >&6
44536else
44537  case $BUILD_CXX in
44538  [\\/]* | ?:[\\/]*)
44539  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44540  ;;
44541  *)
44542  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44543for as_dir in $PATH
44544do
44545  IFS=$as_save_IFS
44546  test -z "$as_dir" && as_dir=.
44547    for ac_exec_ext in '' $ac_executable_extensions; do
44548  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44549    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44550    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44551    break 2
44552  fi
44553done
44554  done
44555IFS=$as_save_IFS
44556
44557  ;;
44558esac
44559fi
44560BUILD_CXX=$ac_cv_path_BUILD_CXX
44561if test -n "$BUILD_CXX"; then
44562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44563$as_echo "$BUILD_CXX" >&6; }
44564else
44565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44566$as_echo "no" >&6; }
44567fi
44568
44569
44570  test -n "$BUILD_CXX" && break
44571done
44572
44573  else
44574    # The variable is set, but is it from the command line or the environment?
44575
44576    # Try to remove the string !BUILD_CXX! from our list.
44577    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
44578    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44579      # If it failed, the variable was not from the command line. Ignore it,
44580      # but warn the user (except for BASH, which is always set by the calling BASH).
44581      if test "xBUILD_CXX" != xBASH; then
44582        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
44583$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
44584      fi
44585      # Try to locate tool using the code snippet
44586      for ac_prog in cl CC g++
44587do
44588  # Extract the first word of "$ac_prog", so it can be a program name with args.
44589set dummy $ac_prog; ac_word=$2
44590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44591$as_echo_n "checking for $ac_word... " >&6; }
44592if ${ac_cv_path_BUILD_CXX+:} false; then :
44593  $as_echo_n "(cached) " >&6
44594else
44595  case $BUILD_CXX in
44596  [\\/]* | ?:[\\/]*)
44597  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44598  ;;
44599  *)
44600  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44601for as_dir in $PATH
44602do
44603  IFS=$as_save_IFS
44604  test -z "$as_dir" && as_dir=.
44605    for ac_exec_ext in '' $ac_executable_extensions; do
44606  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44607    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44608    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44609    break 2
44610  fi
44611done
44612  done
44613IFS=$as_save_IFS
44614
44615  ;;
44616esac
44617fi
44618BUILD_CXX=$ac_cv_path_BUILD_CXX
44619if test -n "$BUILD_CXX"; then
44620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44621$as_echo "$BUILD_CXX" >&6; }
44622else
44623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44624$as_echo "no" >&6; }
44625fi
44626
44627
44628  test -n "$BUILD_CXX" && break
44629done
44630
44631    else
44632      # If it succeeded, then it was overridden by the user. We will use it
44633      # for the tool.
44634
44635      # First remove it from the list of overridden variables, so we can test
44636      # for unknown variables in the end.
44637      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44638
44639      # Check if we try to supply an empty value
44640      if test "x$BUILD_CXX" = x; then
44641        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
44642$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
44643        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44644$as_echo_n "checking for BUILD_CXX... " >&6; }
44645        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44646$as_echo "disabled" >&6; }
44647      else
44648        # Check if the provided tool contains a complete path.
44649        tool_specified="$BUILD_CXX"
44650        tool_basename="${tool_specified##*/}"
44651        if test "x$tool_basename" = "x$tool_specified"; then
44652          # A command without a complete path is provided, search $PATH.
44653          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
44654$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
44655          # Extract the first word of "$tool_basename", so it can be a program name with args.
44656set dummy $tool_basename; ac_word=$2
44657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44658$as_echo_n "checking for $ac_word... " >&6; }
44659if ${ac_cv_path_BUILD_CXX+:} false; then :
44660  $as_echo_n "(cached) " >&6
44661else
44662  case $BUILD_CXX in
44663  [\\/]* | ?:[\\/]*)
44664  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44665  ;;
44666  *)
44667  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44668for as_dir in $PATH
44669do
44670  IFS=$as_save_IFS
44671  test -z "$as_dir" && as_dir=.
44672    for ac_exec_ext in '' $ac_executable_extensions; do
44673  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44674    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44675    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44676    break 2
44677  fi
44678done
44679  done
44680IFS=$as_save_IFS
44681
44682  ;;
44683esac
44684fi
44685BUILD_CXX=$ac_cv_path_BUILD_CXX
44686if test -n "$BUILD_CXX"; then
44687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44688$as_echo "$BUILD_CXX" >&6; }
44689else
44690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44691$as_echo "no" >&6; }
44692fi
44693
44694
44695          if test "x$BUILD_CXX" = x; then
44696            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44697          fi
44698        else
44699          # Otherwise we believe it is a complete path. Use it as it is.
44700          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
44701$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
44702          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44703$as_echo_n "checking for BUILD_CXX... " >&6; }
44704          if test ! -x "$tool_specified"; then
44705            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44706$as_echo "not found" >&6; }
44707            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
44708          fi
44709          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44710$as_echo "$tool_specified" >&6; }
44711        fi
44712      fi
44713    fi
44714
44715  fi
44716
44717
44718
44719  if test "x$BUILD_CXX" = x; then
44720    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
44721  fi
44722
44723
44724
44725  # Only process if variable expands to non-empty
44726
44727  if test "x$BUILD_CXX" != x; then
44728    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44729
44730  # First separate the path from the arguments. This will split at the first
44731  # space.
44732  complete="$BUILD_CXX"
44733  path="${complete%% *}"
44734  tmp="$complete EOL"
44735  arguments="${tmp#* }"
44736
44737  # Input might be given as Windows format, start by converting to
44738  # unix format.
44739  new_path=`$CYGPATH -u "$path"`
44740
44741  # Now try to locate executable using which
44742  new_path=`$WHICH "$new_path" 2> /dev/null`
44743  # bat and cmd files are not always considered executable in cygwin causing which
44744  # to not find them
44745  if test "x$new_path" = x \
44746      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44747      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44748    new_path=`$CYGPATH -u "$path"`
44749  fi
44750  if test "x$new_path" = x; then
44751    # Oops. Which didn't find the executable.
44752    # The splitting of arguments from the executable at a space might have been incorrect,
44753    # since paths with space are more likely in Windows. Give it another try with the whole
44754    # argument.
44755    path="$complete"
44756    arguments="EOL"
44757    new_path=`$CYGPATH -u "$path"`
44758    new_path=`$WHICH "$new_path" 2> /dev/null`
44759    # bat and cmd files are not always considered executable in cygwin causing which
44760    # to not find them
44761    if test "x$new_path" = x \
44762        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44763        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44764      new_path=`$CYGPATH -u "$path"`
44765    fi
44766    if test "x$new_path" = x; then
44767      # It's still not found. Now this is an unrecoverable error.
44768      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44769$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44770      has_space=`$ECHO "$complete" | $GREP " "`
44771      if test "x$has_space" != x; then
44772        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44773$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44774      fi
44775      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44776    fi
44777  fi
44778
44779  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44780  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44781  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44782  # "foo.exe" is OK but "foo" is an error.
44783  #
44784  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44785  # It is also a way to make sure we got the proper file name for the real test later on.
44786  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44787  if test "x$test_shortpath" = x; then
44788    # Short path failed, file does not exist as specified.
44789    # Try adding .exe or .cmd
44790    if test -f "${new_path}.exe"; then
44791      input_to_shortpath="${new_path}.exe"
44792    elif test -f "${new_path}.cmd"; then
44793      input_to_shortpath="${new_path}.cmd"
44794    else
44795      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
44796$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
44797      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44798$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44799      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44800    fi
44801  else
44802    input_to_shortpath="$new_path"
44803  fi
44804
44805  # Call helper function which possibly converts this using DOS-style short mode.
44806  # If so, the updated path is stored in $new_path.
44807  new_path="$input_to_shortpath"
44808
44809  input_path="$input_to_shortpath"
44810  # Check if we need to convert this using DOS-style short mode. If the path
44811  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44812  # take no chances and rewrite it.
44813  # Note: m4 eats our [], so we need to use [ and ] instead.
44814  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44815  if test "x$has_forbidden_chars" != x; then
44816    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44817    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44818    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44819    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44820      # Going to short mode and back again did indeed matter. Since short mode is
44821      # case insensitive, let's make it lowercase to improve readability.
44822      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44823      # Now convert it back to Unix-style (cygpath)
44824      input_path=`$CYGPATH -u "$shortmode_path"`
44825      new_path="$input_path"
44826    fi
44827  fi
44828
44829  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44830  if test "x$test_cygdrive_prefix" = x; then
44831    # As a simple fix, exclude /usr/bin since it's not a real path.
44832    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44833      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44834      # a path prefixed by /cygdrive for fixpath to work.
44835      new_path="$CYGWIN_ROOT_PATH$input_path"
44836    fi
44837  fi
44838
44839  # remove trailing .exe if any
44840  new_path="${new_path/%.exe/}"
44841
44842    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44843
44844  # First separate the path from the arguments. This will split at the first
44845  # space.
44846  complete="$BUILD_CXX"
44847  path="${complete%% *}"
44848  tmp="$complete EOL"
44849  arguments="${tmp#* }"
44850
44851  # Input might be given as Windows format, start by converting to
44852  # unix format.
44853  new_path="$path"
44854
44855  windows_path="$new_path"
44856  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44857    unix_path=`$CYGPATH -u "$windows_path"`
44858    new_path="$unix_path"
44859  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44860    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44861    new_path="$unix_path"
44862  fi
44863
44864
44865  # Now try to locate executable using which
44866  new_path=`$WHICH "$new_path" 2> /dev/null`
44867
44868  if test "x$new_path" = x; then
44869    # Oops. Which didn't find the executable.
44870    # The splitting of arguments from the executable at a space might have been incorrect,
44871    # since paths with space are more likely in Windows. Give it another try with the whole
44872    # argument.
44873    path="$complete"
44874    arguments="EOL"
44875    new_path="$path"
44876
44877  windows_path="$new_path"
44878  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44879    unix_path=`$CYGPATH -u "$windows_path"`
44880    new_path="$unix_path"
44881  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44882    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44883    new_path="$unix_path"
44884  fi
44885
44886
44887    new_path=`$WHICH "$new_path" 2> /dev/null`
44888    # bat and cmd files are not always considered executable in MSYS causing which
44889    # to not find them
44890    if test "x$new_path" = x \
44891        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44892        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
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    fi
44905
44906    if test "x$new_path" = x; then
44907      # It's still not found. Now this is an unrecoverable error.
44908      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44909$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44910      has_space=`$ECHO "$complete" | $GREP " "`
44911      if test "x$has_space" != x; then
44912        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44913$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44914      fi
44915      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44916    fi
44917  fi
44918
44919  # Now new_path has a complete unix path to the binary
44920  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44921    # Keep paths in /bin as-is, but remove trailing .exe if any
44922    new_path="${new_path/%.exe/}"
44923    # Do not save /bin paths to all_fixpath_prefixes!
44924  else
44925    # Not in mixed or Windows style, start by that.
44926    new_path=`cmd //c echo $new_path`
44927
44928  input_path="$new_path"
44929  # Check if we need to convert this using DOS-style short mode. If the path
44930  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44931  # take no chances and rewrite it.
44932  # Note: m4 eats our [], so we need to use [ and ] instead.
44933  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44934  if test "x$has_forbidden_chars" != x; then
44935    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44936    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44937  fi
44938
44939    # Output is in $new_path
44940
44941  windows_path="$new_path"
44942  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44943    unix_path=`$CYGPATH -u "$windows_path"`
44944    new_path="$unix_path"
44945  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44946    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44947    new_path="$unix_path"
44948  fi
44949
44950    # remove trailing .exe if any
44951    new_path="${new_path/%.exe/}"
44952
44953    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44954    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44955  fi
44956
44957    else
44958      # We're on a unix platform. Hooray! :)
44959      # First separate the path from the arguments. This will split at the first
44960      # space.
44961      complete="$BUILD_CXX"
44962      path="${complete%% *}"
44963      tmp="$complete EOL"
44964      arguments="${tmp#* }"
44965
44966      # Cannot rely on the command "which" here since it doesn't always work.
44967      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44968      if test -z "$is_absolute_path"; then
44969        # Path to executable is not absolute. Find it.
44970        IFS_save="$IFS"
44971        IFS=:
44972        for p in $PATH; do
44973          if test -f "$p/$path" && test -x "$p/$path"; then
44974            new_path="$p/$path"
44975            break
44976          fi
44977        done
44978        IFS="$IFS_save"
44979      else
44980        # This is an absolute path, we can use it without further modifications.
44981        new_path="$path"
44982      fi
44983
44984      if test "x$new_path" = x; then
44985        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44986$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44987        has_space=`$ECHO "$complete" | $GREP " "`
44988        if test "x$has_space" != x; then
44989          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44990$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44991        fi
44992        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44993      fi
44994    fi
44995
44996    # Now join together the path and the arguments once again
44997    if test "x$arguments" != xEOL; then
44998      new_complete="$new_path ${arguments% *}"
44999    else
45000      new_complete="$new_path"
45001    fi
45002
45003    if test "x$complete" != "x$new_complete"; then
45004      BUILD_CXX="$new_complete"
45005      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
45006$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
45007    fi
45008  fi
45009
45010
45011
45012  # Publish this variable in the help.
45013
45014
45015  if [ -z "${BUILD_NM+x}" ]; then
45016    # The variable is not set by user, try to locate tool using the code snippet
45017    for ac_prog in nm gcc-nm
45018do
45019  # Extract the first word of "$ac_prog", so it can be a program name with args.
45020set dummy $ac_prog; ac_word=$2
45021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45022$as_echo_n "checking for $ac_word... " >&6; }
45023if ${ac_cv_path_BUILD_NM+:} false; then :
45024  $as_echo_n "(cached) " >&6
45025else
45026  case $BUILD_NM in
45027  [\\/]* | ?:[\\/]*)
45028  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45029  ;;
45030  *)
45031  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45032for as_dir in $PATH
45033do
45034  IFS=$as_save_IFS
45035  test -z "$as_dir" && as_dir=.
45036    for ac_exec_ext in '' $ac_executable_extensions; do
45037  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45038    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45039    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45040    break 2
45041  fi
45042done
45043  done
45044IFS=$as_save_IFS
45045
45046  ;;
45047esac
45048fi
45049BUILD_NM=$ac_cv_path_BUILD_NM
45050if test -n "$BUILD_NM"; then
45051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45052$as_echo "$BUILD_NM" >&6; }
45053else
45054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45055$as_echo "no" >&6; }
45056fi
45057
45058
45059  test -n "$BUILD_NM" && break
45060done
45061
45062  else
45063    # The variable is set, but is it from the command line or the environment?
45064
45065    # Try to remove the string !BUILD_NM! from our list.
45066    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
45067    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45068      # If it failed, the variable was not from the command line. Ignore it,
45069      # but warn the user (except for BASH, which is always set by the calling BASH).
45070      if test "xBUILD_NM" != xBASH; then
45071        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
45072$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
45073      fi
45074      # Try to locate tool using the code snippet
45075      for ac_prog in nm gcc-nm
45076do
45077  # Extract the first word of "$ac_prog", so it can be a program name with args.
45078set dummy $ac_prog; ac_word=$2
45079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45080$as_echo_n "checking for $ac_word... " >&6; }
45081if ${ac_cv_path_BUILD_NM+:} false; then :
45082  $as_echo_n "(cached) " >&6
45083else
45084  case $BUILD_NM in
45085  [\\/]* | ?:[\\/]*)
45086  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45087  ;;
45088  *)
45089  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45090for as_dir in $PATH
45091do
45092  IFS=$as_save_IFS
45093  test -z "$as_dir" && as_dir=.
45094    for ac_exec_ext in '' $ac_executable_extensions; do
45095  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45096    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45097    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45098    break 2
45099  fi
45100done
45101  done
45102IFS=$as_save_IFS
45103
45104  ;;
45105esac
45106fi
45107BUILD_NM=$ac_cv_path_BUILD_NM
45108if test -n "$BUILD_NM"; then
45109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45110$as_echo "$BUILD_NM" >&6; }
45111else
45112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45113$as_echo "no" >&6; }
45114fi
45115
45116
45117  test -n "$BUILD_NM" && break
45118done
45119
45120    else
45121      # If it succeeded, then it was overridden by the user. We will use it
45122      # for the tool.
45123
45124      # First remove it from the list of overridden variables, so we can test
45125      # for unknown variables in the end.
45126      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45127
45128      # Check if we try to supply an empty value
45129      if test "x$BUILD_NM" = x; then
45130        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
45131$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
45132        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45133$as_echo_n "checking for BUILD_NM... " >&6; }
45134        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45135$as_echo "disabled" >&6; }
45136      else
45137        # Check if the provided tool contains a complete path.
45138        tool_specified="$BUILD_NM"
45139        tool_basename="${tool_specified##*/}"
45140        if test "x$tool_basename" = "x$tool_specified"; then
45141          # A command without a complete path is provided, search $PATH.
45142          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
45143$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
45144          # Extract the first word of "$tool_basename", so it can be a program name with args.
45145set dummy $tool_basename; ac_word=$2
45146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45147$as_echo_n "checking for $ac_word... " >&6; }
45148if ${ac_cv_path_BUILD_NM+:} false; then :
45149  $as_echo_n "(cached) " >&6
45150else
45151  case $BUILD_NM in
45152  [\\/]* | ?:[\\/]*)
45153  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45154  ;;
45155  *)
45156  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45157for as_dir in $PATH
45158do
45159  IFS=$as_save_IFS
45160  test -z "$as_dir" && as_dir=.
45161    for ac_exec_ext in '' $ac_executable_extensions; do
45162  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45163    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45164    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45165    break 2
45166  fi
45167done
45168  done
45169IFS=$as_save_IFS
45170
45171  ;;
45172esac
45173fi
45174BUILD_NM=$ac_cv_path_BUILD_NM
45175if test -n "$BUILD_NM"; then
45176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45177$as_echo "$BUILD_NM" >&6; }
45178else
45179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45180$as_echo "no" >&6; }
45181fi
45182
45183
45184          if test "x$BUILD_NM" = x; then
45185            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45186          fi
45187        else
45188          # Otherwise we believe it is a complete path. Use it as it is.
45189          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
45190$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
45191          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45192$as_echo_n "checking for BUILD_NM... " >&6; }
45193          if test ! -x "$tool_specified"; then
45194            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45195$as_echo "not found" >&6; }
45196            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
45197          fi
45198          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45199$as_echo "$tool_specified" >&6; }
45200        fi
45201      fi
45202    fi
45203
45204  fi
45205
45206
45207
45208  # Only process if variable expands to non-empty
45209
45210  if test "x$BUILD_NM" != x; then
45211    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45212
45213  # First separate the path from the arguments. This will split at the first
45214  # space.
45215  complete="$BUILD_NM"
45216  path="${complete%% *}"
45217  tmp="$complete EOL"
45218  arguments="${tmp#* }"
45219
45220  # Input might be given as Windows format, start by converting to
45221  # unix format.
45222  new_path=`$CYGPATH -u "$path"`
45223
45224  # Now try to locate executable using which
45225  new_path=`$WHICH "$new_path" 2> /dev/null`
45226  # bat and cmd files are not always considered executable in cygwin causing which
45227  # to not find them
45228  if test "x$new_path" = x \
45229      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45230      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45231    new_path=`$CYGPATH -u "$path"`
45232  fi
45233  if test "x$new_path" = x; then
45234    # Oops. Which didn't find the executable.
45235    # The splitting of arguments from the executable at a space might have been incorrect,
45236    # since paths with space are more likely in Windows. Give it another try with the whole
45237    # argument.
45238    path="$complete"
45239    arguments="EOL"
45240    new_path=`$CYGPATH -u "$path"`
45241    new_path=`$WHICH "$new_path" 2> /dev/null`
45242    # bat and cmd files are not always considered executable in cygwin causing which
45243    # to not find them
45244    if test "x$new_path" = x \
45245        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45246        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45247      new_path=`$CYGPATH -u "$path"`
45248    fi
45249    if test "x$new_path" = x; then
45250      # It's still not found. Now this is an unrecoverable error.
45251      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45252$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45253      has_space=`$ECHO "$complete" | $GREP " "`
45254      if test "x$has_space" != x; then
45255        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45256$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45257      fi
45258      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45259    fi
45260  fi
45261
45262  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45263  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45264  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45265  # "foo.exe" is OK but "foo" is an error.
45266  #
45267  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45268  # It is also a way to make sure we got the proper file name for the real test later on.
45269  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45270  if test "x$test_shortpath" = x; then
45271    # Short path failed, file does not exist as specified.
45272    # Try adding .exe or .cmd
45273    if test -f "${new_path}.exe"; then
45274      input_to_shortpath="${new_path}.exe"
45275    elif test -f "${new_path}.cmd"; then
45276      input_to_shortpath="${new_path}.cmd"
45277    else
45278      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
45279$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
45280      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45281$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45282      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45283    fi
45284  else
45285    input_to_shortpath="$new_path"
45286  fi
45287
45288  # Call helper function which possibly converts this using DOS-style short mode.
45289  # If so, the updated path is stored in $new_path.
45290  new_path="$input_to_shortpath"
45291
45292  input_path="$input_to_shortpath"
45293  # Check if we need to convert this using DOS-style short mode. If the path
45294  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45295  # take no chances and rewrite it.
45296  # Note: m4 eats our [], so we need to use [ and ] instead.
45297  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45298  if test "x$has_forbidden_chars" != x; then
45299    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45300    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45301    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45302    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45303      # Going to short mode and back again did indeed matter. Since short mode is
45304      # case insensitive, let's make it lowercase to improve readability.
45305      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45306      # Now convert it back to Unix-style (cygpath)
45307      input_path=`$CYGPATH -u "$shortmode_path"`
45308      new_path="$input_path"
45309    fi
45310  fi
45311
45312  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45313  if test "x$test_cygdrive_prefix" = x; then
45314    # As a simple fix, exclude /usr/bin since it's not a real path.
45315    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45316      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45317      # a path prefixed by /cygdrive for fixpath to work.
45318      new_path="$CYGWIN_ROOT_PATH$input_path"
45319    fi
45320  fi
45321
45322  # remove trailing .exe if any
45323  new_path="${new_path/%.exe/}"
45324
45325    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45326
45327  # First separate the path from the arguments. This will split at the first
45328  # space.
45329  complete="$BUILD_NM"
45330  path="${complete%% *}"
45331  tmp="$complete EOL"
45332  arguments="${tmp#* }"
45333
45334  # Input might be given as Windows format, start by converting to
45335  # unix format.
45336  new_path="$path"
45337
45338  windows_path="$new_path"
45339  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45340    unix_path=`$CYGPATH -u "$windows_path"`
45341    new_path="$unix_path"
45342  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45343    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45344    new_path="$unix_path"
45345  fi
45346
45347
45348  # Now try to locate executable using which
45349  new_path=`$WHICH "$new_path" 2> /dev/null`
45350
45351  if test "x$new_path" = x; then
45352    # Oops. Which didn't find the executable.
45353    # The splitting of arguments from the executable at a space might have been incorrect,
45354    # since paths with space are more likely in Windows. Give it another try with the whole
45355    # argument.
45356    path="$complete"
45357    arguments="EOL"
45358    new_path="$path"
45359
45360  windows_path="$new_path"
45361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45362    unix_path=`$CYGPATH -u "$windows_path"`
45363    new_path="$unix_path"
45364  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45365    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45366    new_path="$unix_path"
45367  fi
45368
45369
45370    new_path=`$WHICH "$new_path" 2> /dev/null`
45371    # bat and cmd files are not always considered executable in MSYS causing which
45372    # to not find them
45373    if test "x$new_path" = x \
45374        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45375        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
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    fi
45388
45389    if test "x$new_path" = x; then
45390      # It's still not found. Now this is an unrecoverable error.
45391      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45392$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45393      has_space=`$ECHO "$complete" | $GREP " "`
45394      if test "x$has_space" != x; then
45395        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45396$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45397      fi
45398      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45399    fi
45400  fi
45401
45402  # Now new_path has a complete unix path to the binary
45403  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45404    # Keep paths in /bin as-is, but remove trailing .exe if any
45405    new_path="${new_path/%.exe/}"
45406    # Do not save /bin paths to all_fixpath_prefixes!
45407  else
45408    # Not in mixed or Windows style, start by that.
45409    new_path=`cmd //c echo $new_path`
45410
45411  input_path="$new_path"
45412  # Check if we need to convert this using DOS-style short mode. If the path
45413  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45414  # take no chances and rewrite it.
45415  # Note: m4 eats our [], so we need to use [ and ] instead.
45416  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45417  if test "x$has_forbidden_chars" != x; then
45418    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45419    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45420  fi
45421
45422    # Output is in $new_path
45423
45424  windows_path="$new_path"
45425  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45426    unix_path=`$CYGPATH -u "$windows_path"`
45427    new_path="$unix_path"
45428  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45429    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45430    new_path="$unix_path"
45431  fi
45432
45433    # remove trailing .exe if any
45434    new_path="${new_path/%.exe/}"
45435
45436    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45437    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45438  fi
45439
45440    else
45441      # We're on a unix platform. Hooray! :)
45442      # First separate the path from the arguments. This will split at the first
45443      # space.
45444      complete="$BUILD_NM"
45445      path="${complete%% *}"
45446      tmp="$complete EOL"
45447      arguments="${tmp#* }"
45448
45449      # Cannot rely on the command "which" here since it doesn't always work.
45450      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45451      if test -z "$is_absolute_path"; then
45452        # Path to executable is not absolute. Find it.
45453        IFS_save="$IFS"
45454        IFS=:
45455        for p in $PATH; do
45456          if test -f "$p/$path" && test -x "$p/$path"; then
45457            new_path="$p/$path"
45458            break
45459          fi
45460        done
45461        IFS="$IFS_save"
45462      else
45463        # This is an absolute path, we can use it without further modifications.
45464        new_path="$path"
45465      fi
45466
45467      if test "x$new_path" = x; then
45468        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45469$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45470        has_space=`$ECHO "$complete" | $GREP " "`
45471        if test "x$has_space" != x; then
45472          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45473$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45474        fi
45475        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45476      fi
45477    fi
45478
45479    # Now join together the path and the arguments once again
45480    if test "x$arguments" != xEOL; then
45481      new_complete="$new_path ${arguments% *}"
45482    else
45483      new_complete="$new_path"
45484    fi
45485
45486    if test "x$complete" != "x$new_complete"; then
45487      BUILD_NM="$new_complete"
45488      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
45489$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
45490    fi
45491  fi
45492
45493
45494
45495  # Publish this variable in the help.
45496
45497
45498  if [ -z "${BUILD_AR+x}" ]; then
45499    # The variable is not set by user, try to locate tool using the code snippet
45500    for ac_prog in ar gcc-ar
45501do
45502  # Extract the first word of "$ac_prog", so it can be a program name with args.
45503set dummy $ac_prog; ac_word=$2
45504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45505$as_echo_n "checking for $ac_word... " >&6; }
45506if ${ac_cv_path_BUILD_AR+:} false; then :
45507  $as_echo_n "(cached) " >&6
45508else
45509  case $BUILD_AR in
45510  [\\/]* | ?:[\\/]*)
45511  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45512  ;;
45513  *)
45514  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45515for as_dir in $PATH
45516do
45517  IFS=$as_save_IFS
45518  test -z "$as_dir" && as_dir=.
45519    for ac_exec_ext in '' $ac_executable_extensions; do
45520  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45521    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45522    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45523    break 2
45524  fi
45525done
45526  done
45527IFS=$as_save_IFS
45528
45529  ;;
45530esac
45531fi
45532BUILD_AR=$ac_cv_path_BUILD_AR
45533if test -n "$BUILD_AR"; then
45534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45535$as_echo "$BUILD_AR" >&6; }
45536else
45537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45538$as_echo "no" >&6; }
45539fi
45540
45541
45542  test -n "$BUILD_AR" && break
45543done
45544
45545  else
45546    # The variable is set, but is it from the command line or the environment?
45547
45548    # Try to remove the string !BUILD_AR! from our list.
45549    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
45550    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45551      # If it failed, the variable was not from the command line. Ignore it,
45552      # but warn the user (except for BASH, which is always set by the calling BASH).
45553      if test "xBUILD_AR" != xBASH; then
45554        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
45555$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
45556      fi
45557      # Try to locate tool using the code snippet
45558      for ac_prog in ar gcc-ar
45559do
45560  # Extract the first word of "$ac_prog", so it can be a program name with args.
45561set dummy $ac_prog; ac_word=$2
45562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45563$as_echo_n "checking for $ac_word... " >&6; }
45564if ${ac_cv_path_BUILD_AR+:} false; then :
45565  $as_echo_n "(cached) " >&6
45566else
45567  case $BUILD_AR in
45568  [\\/]* | ?:[\\/]*)
45569  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45570  ;;
45571  *)
45572  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45573for as_dir in $PATH
45574do
45575  IFS=$as_save_IFS
45576  test -z "$as_dir" && as_dir=.
45577    for ac_exec_ext in '' $ac_executable_extensions; do
45578  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45579    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45580    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45581    break 2
45582  fi
45583done
45584  done
45585IFS=$as_save_IFS
45586
45587  ;;
45588esac
45589fi
45590BUILD_AR=$ac_cv_path_BUILD_AR
45591if test -n "$BUILD_AR"; then
45592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45593$as_echo "$BUILD_AR" >&6; }
45594else
45595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45596$as_echo "no" >&6; }
45597fi
45598
45599
45600  test -n "$BUILD_AR" && break
45601done
45602
45603    else
45604      # If it succeeded, then it was overridden by the user. We will use it
45605      # for the tool.
45606
45607      # First remove it from the list of overridden variables, so we can test
45608      # for unknown variables in the end.
45609      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45610
45611      # Check if we try to supply an empty value
45612      if test "x$BUILD_AR" = x; then
45613        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
45614$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
45615        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45616$as_echo_n "checking for BUILD_AR... " >&6; }
45617        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45618$as_echo "disabled" >&6; }
45619      else
45620        # Check if the provided tool contains a complete path.
45621        tool_specified="$BUILD_AR"
45622        tool_basename="${tool_specified##*/}"
45623        if test "x$tool_basename" = "x$tool_specified"; then
45624          # A command without a complete path is provided, search $PATH.
45625          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
45626$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
45627          # Extract the first word of "$tool_basename", so it can be a program name with args.
45628set dummy $tool_basename; ac_word=$2
45629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45630$as_echo_n "checking for $ac_word... " >&6; }
45631if ${ac_cv_path_BUILD_AR+:} false; then :
45632  $as_echo_n "(cached) " >&6
45633else
45634  case $BUILD_AR in
45635  [\\/]* | ?:[\\/]*)
45636  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45637  ;;
45638  *)
45639  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45640for as_dir in $PATH
45641do
45642  IFS=$as_save_IFS
45643  test -z "$as_dir" && as_dir=.
45644    for ac_exec_ext in '' $ac_executable_extensions; do
45645  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45646    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45647    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45648    break 2
45649  fi
45650done
45651  done
45652IFS=$as_save_IFS
45653
45654  ;;
45655esac
45656fi
45657BUILD_AR=$ac_cv_path_BUILD_AR
45658if test -n "$BUILD_AR"; then
45659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45660$as_echo "$BUILD_AR" >&6; }
45661else
45662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45663$as_echo "no" >&6; }
45664fi
45665
45666
45667          if test "x$BUILD_AR" = x; then
45668            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45669          fi
45670        else
45671          # Otherwise we believe it is a complete path. Use it as it is.
45672          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
45673$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
45674          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45675$as_echo_n "checking for BUILD_AR... " >&6; }
45676          if test ! -x "$tool_specified"; then
45677            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45678$as_echo "not found" >&6; }
45679            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
45680          fi
45681          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45682$as_echo "$tool_specified" >&6; }
45683        fi
45684      fi
45685    fi
45686
45687  fi
45688
45689
45690
45691  # Only process if variable expands to non-empty
45692
45693  if test "x$BUILD_AR" != x; then
45694    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45695
45696  # First separate the path from the arguments. This will split at the first
45697  # space.
45698  complete="$BUILD_AR"
45699  path="${complete%% *}"
45700  tmp="$complete EOL"
45701  arguments="${tmp#* }"
45702
45703  # Input might be given as Windows format, start by converting to
45704  # unix format.
45705  new_path=`$CYGPATH -u "$path"`
45706
45707  # Now try to locate executable using which
45708  new_path=`$WHICH "$new_path" 2> /dev/null`
45709  # bat and cmd files are not always considered executable in cygwin causing which
45710  # to not find them
45711  if test "x$new_path" = x \
45712      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45713      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45714    new_path=`$CYGPATH -u "$path"`
45715  fi
45716  if test "x$new_path" = x; then
45717    # Oops. Which didn't find the executable.
45718    # The splitting of arguments from the executable at a space might have been incorrect,
45719    # since paths with space are more likely in Windows. Give it another try with the whole
45720    # argument.
45721    path="$complete"
45722    arguments="EOL"
45723    new_path=`$CYGPATH -u "$path"`
45724    new_path=`$WHICH "$new_path" 2> /dev/null`
45725    # bat and cmd files are not always considered executable in cygwin causing which
45726    # to not find them
45727    if test "x$new_path" = x \
45728        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45729        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45730      new_path=`$CYGPATH -u "$path"`
45731    fi
45732    if test "x$new_path" = x; then
45733      # It's still not found. Now this is an unrecoverable error.
45734      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45735$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45736      has_space=`$ECHO "$complete" | $GREP " "`
45737      if test "x$has_space" != x; then
45738        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45739$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45740      fi
45741      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45742    fi
45743  fi
45744
45745  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45746  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45747  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45748  # "foo.exe" is OK but "foo" is an error.
45749  #
45750  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45751  # It is also a way to make sure we got the proper file name for the real test later on.
45752  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45753  if test "x$test_shortpath" = x; then
45754    # Short path failed, file does not exist as specified.
45755    # Try adding .exe or .cmd
45756    if test -f "${new_path}.exe"; then
45757      input_to_shortpath="${new_path}.exe"
45758    elif test -f "${new_path}.cmd"; then
45759      input_to_shortpath="${new_path}.cmd"
45760    else
45761      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
45762$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
45763      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45764$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45765      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45766    fi
45767  else
45768    input_to_shortpath="$new_path"
45769  fi
45770
45771  # Call helper function which possibly converts this using DOS-style short mode.
45772  # If so, the updated path is stored in $new_path.
45773  new_path="$input_to_shortpath"
45774
45775  input_path="$input_to_shortpath"
45776  # Check if we need to convert this using DOS-style short mode. If the path
45777  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45778  # take no chances and rewrite it.
45779  # Note: m4 eats our [], so we need to use [ and ] instead.
45780  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45781  if test "x$has_forbidden_chars" != x; then
45782    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45783    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45784    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45785    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45786      # Going to short mode and back again did indeed matter. Since short mode is
45787      # case insensitive, let's make it lowercase to improve readability.
45788      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45789      # Now convert it back to Unix-style (cygpath)
45790      input_path=`$CYGPATH -u "$shortmode_path"`
45791      new_path="$input_path"
45792    fi
45793  fi
45794
45795  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45796  if test "x$test_cygdrive_prefix" = x; then
45797    # As a simple fix, exclude /usr/bin since it's not a real path.
45798    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45799      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45800      # a path prefixed by /cygdrive for fixpath to work.
45801      new_path="$CYGWIN_ROOT_PATH$input_path"
45802    fi
45803  fi
45804
45805  # remove trailing .exe if any
45806  new_path="${new_path/%.exe/}"
45807
45808    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45809
45810  # First separate the path from the arguments. This will split at the first
45811  # space.
45812  complete="$BUILD_AR"
45813  path="${complete%% *}"
45814  tmp="$complete EOL"
45815  arguments="${tmp#* }"
45816
45817  # Input might be given as Windows format, start by converting to
45818  # unix format.
45819  new_path="$path"
45820
45821  windows_path="$new_path"
45822  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45823    unix_path=`$CYGPATH -u "$windows_path"`
45824    new_path="$unix_path"
45825  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45826    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45827    new_path="$unix_path"
45828  fi
45829
45830
45831  # Now try to locate executable using which
45832  new_path=`$WHICH "$new_path" 2> /dev/null`
45833
45834  if test "x$new_path" = x; then
45835    # Oops. Which didn't find the executable.
45836    # The splitting of arguments from the executable at a space might have been incorrect,
45837    # since paths with space are more likely in Windows. Give it another try with the whole
45838    # argument.
45839    path="$complete"
45840    arguments="EOL"
45841    new_path="$path"
45842
45843  windows_path="$new_path"
45844  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45845    unix_path=`$CYGPATH -u "$windows_path"`
45846    new_path="$unix_path"
45847  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45848    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45849    new_path="$unix_path"
45850  fi
45851
45852
45853    new_path=`$WHICH "$new_path" 2> /dev/null`
45854    # bat and cmd files are not always considered executable in MSYS causing which
45855    # to not find them
45856    if test "x$new_path" = x \
45857        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45858        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
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    fi
45871
45872    if test "x$new_path" = x; then
45873      # It's still not found. Now this is an unrecoverable error.
45874      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45875$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45876      has_space=`$ECHO "$complete" | $GREP " "`
45877      if test "x$has_space" != x; then
45878        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45879$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45880      fi
45881      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45882    fi
45883  fi
45884
45885  # Now new_path has a complete unix path to the binary
45886  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45887    # Keep paths in /bin as-is, but remove trailing .exe if any
45888    new_path="${new_path/%.exe/}"
45889    # Do not save /bin paths to all_fixpath_prefixes!
45890  else
45891    # Not in mixed or Windows style, start by that.
45892    new_path=`cmd //c echo $new_path`
45893
45894  input_path="$new_path"
45895  # Check if we need to convert this using DOS-style short mode. If the path
45896  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45897  # take no chances and rewrite it.
45898  # Note: m4 eats our [], so we need to use [ and ] instead.
45899  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45900  if test "x$has_forbidden_chars" != x; then
45901    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45902    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45903  fi
45904
45905    # Output is in $new_path
45906
45907  windows_path="$new_path"
45908  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45909    unix_path=`$CYGPATH -u "$windows_path"`
45910    new_path="$unix_path"
45911  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45912    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45913    new_path="$unix_path"
45914  fi
45915
45916    # remove trailing .exe if any
45917    new_path="${new_path/%.exe/}"
45918
45919    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45920    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45921  fi
45922
45923    else
45924      # We're on a unix platform. Hooray! :)
45925      # First separate the path from the arguments. This will split at the first
45926      # space.
45927      complete="$BUILD_AR"
45928      path="${complete%% *}"
45929      tmp="$complete EOL"
45930      arguments="${tmp#* }"
45931
45932      # Cannot rely on the command "which" here since it doesn't always work.
45933      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45934      if test -z "$is_absolute_path"; then
45935        # Path to executable is not absolute. Find it.
45936        IFS_save="$IFS"
45937        IFS=:
45938        for p in $PATH; do
45939          if test -f "$p/$path" && test -x "$p/$path"; then
45940            new_path="$p/$path"
45941            break
45942          fi
45943        done
45944        IFS="$IFS_save"
45945      else
45946        # This is an absolute path, we can use it without further modifications.
45947        new_path="$path"
45948      fi
45949
45950      if test "x$new_path" = x; then
45951        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45952$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45953        has_space=`$ECHO "$complete" | $GREP " "`
45954        if test "x$has_space" != x; then
45955          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45956$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45957        fi
45958        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45959      fi
45960    fi
45961
45962    # Now join together the path and the arguments once again
45963    if test "x$arguments" != xEOL; then
45964      new_complete="$new_path ${arguments% *}"
45965    else
45966      new_complete="$new_path"
45967    fi
45968
45969    if test "x$complete" != "x$new_complete"; then
45970      BUILD_AR="$new_complete"
45971      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
45972$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
45973    fi
45974  fi
45975
45976
45977
45978  # Publish this variable in the help.
45979
45980
45981  if [ -z "${BUILD_OBJCOPY+x}" ]; then
45982    # The variable is not set by user, try to locate tool using the code snippet
45983    for ac_prog in objcopy
45984do
45985  # Extract the first word of "$ac_prog", so it can be a program name with args.
45986set dummy $ac_prog; ac_word=$2
45987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45988$as_echo_n "checking for $ac_word... " >&6; }
45989if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
45990  $as_echo_n "(cached) " >&6
45991else
45992  case $BUILD_OBJCOPY in
45993  [\\/]* | ?:[\\/]*)
45994  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
45995  ;;
45996  *)
45997  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45998for as_dir in $PATH
45999do
46000  IFS=$as_save_IFS
46001  test -z "$as_dir" && as_dir=.
46002    for ac_exec_ext in '' $ac_executable_extensions; do
46003  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46004    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46005    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46006    break 2
46007  fi
46008done
46009  done
46010IFS=$as_save_IFS
46011
46012  ;;
46013esac
46014fi
46015BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46016if test -n "$BUILD_OBJCOPY"; then
46017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46018$as_echo "$BUILD_OBJCOPY" >&6; }
46019else
46020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46021$as_echo "no" >&6; }
46022fi
46023
46024
46025  test -n "$BUILD_OBJCOPY" && break
46026done
46027
46028  else
46029    # The variable is set, but is it from the command line or the environment?
46030
46031    # Try to remove the string !BUILD_OBJCOPY! from our list.
46032    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
46033    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46034      # If it failed, the variable was not from the command line. Ignore it,
46035      # but warn the user (except for BASH, which is always set by the calling BASH).
46036      if test "xBUILD_OBJCOPY" != xBASH; then
46037        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
46038$as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
46039      fi
46040      # Try to locate tool using the code snippet
46041      for ac_prog in objcopy
46042do
46043  # Extract the first word of "$ac_prog", so it can be a program name with args.
46044set dummy $ac_prog; ac_word=$2
46045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46046$as_echo_n "checking for $ac_word... " >&6; }
46047if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46048  $as_echo_n "(cached) " >&6
46049else
46050  case $BUILD_OBJCOPY in
46051  [\\/]* | ?:[\\/]*)
46052  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46053  ;;
46054  *)
46055  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46056for as_dir in $PATH
46057do
46058  IFS=$as_save_IFS
46059  test -z "$as_dir" && as_dir=.
46060    for ac_exec_ext in '' $ac_executable_extensions; do
46061  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46062    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46063    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46064    break 2
46065  fi
46066done
46067  done
46068IFS=$as_save_IFS
46069
46070  ;;
46071esac
46072fi
46073BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46074if test -n "$BUILD_OBJCOPY"; then
46075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46076$as_echo "$BUILD_OBJCOPY" >&6; }
46077else
46078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46079$as_echo "no" >&6; }
46080fi
46081
46082
46083  test -n "$BUILD_OBJCOPY" && break
46084done
46085
46086    else
46087      # If it succeeded, then it was overridden by the user. We will use it
46088      # for the tool.
46089
46090      # First remove it from the list of overridden variables, so we can test
46091      # for unknown variables in the end.
46092      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46093
46094      # Check if we try to supply an empty value
46095      if test "x$BUILD_OBJCOPY" = x; then
46096        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
46097$as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
46098        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46099$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46100        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46101$as_echo "disabled" >&6; }
46102      else
46103        # Check if the provided tool contains a complete path.
46104        tool_specified="$BUILD_OBJCOPY"
46105        tool_basename="${tool_specified##*/}"
46106        if test "x$tool_basename" = "x$tool_specified"; then
46107          # A command without a complete path is provided, search $PATH.
46108          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
46109$as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
46110          # Extract the first word of "$tool_basename", so it can be a program name with args.
46111set dummy $tool_basename; ac_word=$2
46112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46113$as_echo_n "checking for $ac_word... " >&6; }
46114if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46115  $as_echo_n "(cached) " >&6
46116else
46117  case $BUILD_OBJCOPY in
46118  [\\/]* | ?:[\\/]*)
46119  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46120  ;;
46121  *)
46122  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46123for as_dir in $PATH
46124do
46125  IFS=$as_save_IFS
46126  test -z "$as_dir" && as_dir=.
46127    for ac_exec_ext in '' $ac_executable_extensions; do
46128  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46129    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46130    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46131    break 2
46132  fi
46133done
46134  done
46135IFS=$as_save_IFS
46136
46137  ;;
46138esac
46139fi
46140BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46141if test -n "$BUILD_OBJCOPY"; then
46142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46143$as_echo "$BUILD_OBJCOPY" >&6; }
46144else
46145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46146$as_echo "no" >&6; }
46147fi
46148
46149
46150          if test "x$BUILD_OBJCOPY" = x; then
46151            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46152          fi
46153        else
46154          # Otherwise we believe it is a complete path. Use it as it is.
46155          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
46156$as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
46157          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46158$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46159          if test ! -x "$tool_specified"; then
46160            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46161$as_echo "not found" >&6; }
46162            as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
46163          fi
46164          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46165$as_echo "$tool_specified" >&6; }
46166        fi
46167      fi
46168    fi
46169
46170  fi
46171
46172
46173
46174  # Only process if variable expands to non-empty
46175
46176  if test "x$BUILD_OBJCOPY" != x; then
46177    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46178
46179  # First separate the path from the arguments. This will split at the first
46180  # space.
46181  complete="$BUILD_OBJCOPY"
46182  path="${complete%% *}"
46183  tmp="$complete EOL"
46184  arguments="${tmp#* }"
46185
46186  # Input might be given as Windows format, start by converting to
46187  # unix format.
46188  new_path=`$CYGPATH -u "$path"`
46189
46190  # Now try to locate executable using which
46191  new_path=`$WHICH "$new_path" 2> /dev/null`
46192  # bat and cmd files are not always considered executable in cygwin causing which
46193  # to not find them
46194  if test "x$new_path" = x \
46195      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46196      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46197    new_path=`$CYGPATH -u "$path"`
46198  fi
46199  if test "x$new_path" = x; then
46200    # Oops. Which didn't find the executable.
46201    # The splitting of arguments from the executable at a space might have been incorrect,
46202    # since paths with space are more likely in Windows. Give it another try with the whole
46203    # argument.
46204    path="$complete"
46205    arguments="EOL"
46206    new_path=`$CYGPATH -u "$path"`
46207    new_path=`$WHICH "$new_path" 2> /dev/null`
46208    # bat and cmd files are not always considered executable in cygwin causing which
46209    # to not find them
46210    if test "x$new_path" = x \
46211        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46212        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46213      new_path=`$CYGPATH -u "$path"`
46214    fi
46215    if test "x$new_path" = x; then
46216      # It's still not found. Now this is an unrecoverable error.
46217      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46218$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46219      has_space=`$ECHO "$complete" | $GREP " "`
46220      if test "x$has_space" != x; then
46221        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46222$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46223      fi
46224      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46225    fi
46226  fi
46227
46228  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46229  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46230  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46231  # "foo.exe" is OK but "foo" is an error.
46232  #
46233  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46234  # It is also a way to make sure we got the proper file name for the real test later on.
46235  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46236  if test "x$test_shortpath" = x; then
46237    # Short path failed, file does not exist as specified.
46238    # Try adding .exe or .cmd
46239    if test -f "${new_path}.exe"; then
46240      input_to_shortpath="${new_path}.exe"
46241    elif test -f "${new_path}.cmd"; then
46242      input_to_shortpath="${new_path}.cmd"
46243    else
46244      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
46245$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
46246      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46247$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46248      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46249    fi
46250  else
46251    input_to_shortpath="$new_path"
46252  fi
46253
46254  # Call helper function which possibly converts this using DOS-style short mode.
46255  # If so, the updated path is stored in $new_path.
46256  new_path="$input_to_shortpath"
46257
46258  input_path="$input_to_shortpath"
46259  # Check if we need to convert this using DOS-style short mode. If the path
46260  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46261  # take no chances and rewrite it.
46262  # Note: m4 eats our [], so we need to use [ and ] instead.
46263  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46264  if test "x$has_forbidden_chars" != x; then
46265    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46266    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46267    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46268    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46269      # Going to short mode and back again did indeed matter. Since short mode is
46270      # case insensitive, let's make it lowercase to improve readability.
46271      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46272      # Now convert it back to Unix-style (cygpath)
46273      input_path=`$CYGPATH -u "$shortmode_path"`
46274      new_path="$input_path"
46275    fi
46276  fi
46277
46278  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46279  if test "x$test_cygdrive_prefix" = x; then
46280    # As a simple fix, exclude /usr/bin since it's not a real path.
46281    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46282      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46283      # a path prefixed by /cygdrive for fixpath to work.
46284      new_path="$CYGWIN_ROOT_PATH$input_path"
46285    fi
46286  fi
46287
46288  # remove trailing .exe if any
46289  new_path="${new_path/%.exe/}"
46290
46291    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46292
46293  # First separate the path from the arguments. This will split at the first
46294  # space.
46295  complete="$BUILD_OBJCOPY"
46296  path="${complete%% *}"
46297  tmp="$complete EOL"
46298  arguments="${tmp#* }"
46299
46300  # Input might be given as Windows format, start by converting to
46301  # unix format.
46302  new_path="$path"
46303
46304  windows_path="$new_path"
46305  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46306    unix_path=`$CYGPATH -u "$windows_path"`
46307    new_path="$unix_path"
46308  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46309    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46310    new_path="$unix_path"
46311  fi
46312
46313
46314  # Now try to locate executable using which
46315  new_path=`$WHICH "$new_path" 2> /dev/null`
46316
46317  if test "x$new_path" = x; then
46318    # Oops. Which didn't find the executable.
46319    # The splitting of arguments from the executable at a space might have been incorrect,
46320    # since paths with space are more likely in Windows. Give it another try with the whole
46321    # argument.
46322    path="$complete"
46323    arguments="EOL"
46324    new_path="$path"
46325
46326  windows_path="$new_path"
46327  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46328    unix_path=`$CYGPATH -u "$windows_path"`
46329    new_path="$unix_path"
46330  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46331    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46332    new_path="$unix_path"
46333  fi
46334
46335
46336    new_path=`$WHICH "$new_path" 2> /dev/null`
46337    # bat and cmd files are not always considered executable in MSYS causing which
46338    # to not find them
46339    if test "x$new_path" = x \
46340        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46341        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
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    fi
46354
46355    if test "x$new_path" = x; then
46356      # It's still not found. Now this is an unrecoverable error.
46357      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46358$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46359      has_space=`$ECHO "$complete" | $GREP " "`
46360      if test "x$has_space" != x; then
46361        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46362$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46363      fi
46364      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46365    fi
46366  fi
46367
46368  # Now new_path has a complete unix path to the binary
46369  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46370    # Keep paths in /bin as-is, but remove trailing .exe if any
46371    new_path="${new_path/%.exe/}"
46372    # Do not save /bin paths to all_fixpath_prefixes!
46373  else
46374    # Not in mixed or Windows style, start by that.
46375    new_path=`cmd //c echo $new_path`
46376
46377  input_path="$new_path"
46378  # Check if we need to convert this using DOS-style short mode. If the path
46379  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46380  # take no chances and rewrite it.
46381  # Note: m4 eats our [], so we need to use [ and ] instead.
46382  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46383  if test "x$has_forbidden_chars" != x; then
46384    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46385    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46386  fi
46387
46388    # Output is in $new_path
46389
46390  windows_path="$new_path"
46391  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46392    unix_path=`$CYGPATH -u "$windows_path"`
46393    new_path="$unix_path"
46394  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46395    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46396    new_path="$unix_path"
46397  fi
46398
46399    # remove trailing .exe if any
46400    new_path="${new_path/%.exe/}"
46401
46402    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46403    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46404  fi
46405
46406    else
46407      # We're on a unix platform. Hooray! :)
46408      # First separate the path from the arguments. This will split at the first
46409      # space.
46410      complete="$BUILD_OBJCOPY"
46411      path="${complete%% *}"
46412      tmp="$complete EOL"
46413      arguments="${tmp#* }"
46414
46415      # Cannot rely on the command "which" here since it doesn't always work.
46416      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46417      if test -z "$is_absolute_path"; then
46418        # Path to executable is not absolute. Find it.
46419        IFS_save="$IFS"
46420        IFS=:
46421        for p in $PATH; do
46422          if test -f "$p/$path" && test -x "$p/$path"; then
46423            new_path="$p/$path"
46424            break
46425          fi
46426        done
46427        IFS="$IFS_save"
46428      else
46429        # This is an absolute path, we can use it without further modifications.
46430        new_path="$path"
46431      fi
46432
46433      if test "x$new_path" = x; then
46434        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46435$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46436        has_space=`$ECHO "$complete" | $GREP " "`
46437        if test "x$has_space" != x; then
46438          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46439$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46440        fi
46441        as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46442      fi
46443    fi
46444
46445    # Now join together the path and the arguments once again
46446    if test "x$arguments" != xEOL; then
46447      new_complete="$new_path ${arguments% *}"
46448    else
46449      new_complete="$new_path"
46450    fi
46451
46452    if test "x$complete" != "x$new_complete"; then
46453      BUILD_OBJCOPY="$new_complete"
46454      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
46455$as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
46456    fi
46457  fi
46458
46459
46460
46461  # Publish this variable in the help.
46462
46463
46464  if [ -z "${BUILD_STRIP+x}" ]; then
46465    # The variable is not set by user, try to locate tool using the code snippet
46466    for ac_prog in strip
46467do
46468  # Extract the first word of "$ac_prog", so it can be a program name with args.
46469set dummy $ac_prog; ac_word=$2
46470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46471$as_echo_n "checking for $ac_word... " >&6; }
46472if ${ac_cv_path_BUILD_STRIP+:} false; then :
46473  $as_echo_n "(cached) " >&6
46474else
46475  case $BUILD_STRIP in
46476  [\\/]* | ?:[\\/]*)
46477  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46478  ;;
46479  *)
46480  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46481for as_dir in $PATH
46482do
46483  IFS=$as_save_IFS
46484  test -z "$as_dir" && as_dir=.
46485    for ac_exec_ext in '' $ac_executable_extensions; do
46486  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46487    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46488    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46489    break 2
46490  fi
46491done
46492  done
46493IFS=$as_save_IFS
46494
46495  ;;
46496esac
46497fi
46498BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46499if test -n "$BUILD_STRIP"; then
46500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46501$as_echo "$BUILD_STRIP" >&6; }
46502else
46503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46504$as_echo "no" >&6; }
46505fi
46506
46507
46508  test -n "$BUILD_STRIP" && break
46509done
46510
46511  else
46512    # The variable is set, but is it from the command line or the environment?
46513
46514    # Try to remove the string !BUILD_STRIP! from our list.
46515    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
46516    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46517      # If it failed, the variable was not from the command line. Ignore it,
46518      # but warn the user (except for BASH, which is always set by the calling BASH).
46519      if test "xBUILD_STRIP" != xBASH; then
46520        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
46521$as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
46522      fi
46523      # Try to locate tool using the code snippet
46524      for ac_prog in strip
46525do
46526  # Extract the first word of "$ac_prog", so it can be a program name with args.
46527set dummy $ac_prog; ac_word=$2
46528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46529$as_echo_n "checking for $ac_word... " >&6; }
46530if ${ac_cv_path_BUILD_STRIP+:} false; then :
46531  $as_echo_n "(cached) " >&6
46532else
46533  case $BUILD_STRIP in
46534  [\\/]* | ?:[\\/]*)
46535  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46536  ;;
46537  *)
46538  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46539for as_dir in $PATH
46540do
46541  IFS=$as_save_IFS
46542  test -z "$as_dir" && as_dir=.
46543    for ac_exec_ext in '' $ac_executable_extensions; do
46544  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46545    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46546    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46547    break 2
46548  fi
46549done
46550  done
46551IFS=$as_save_IFS
46552
46553  ;;
46554esac
46555fi
46556BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46557if test -n "$BUILD_STRIP"; then
46558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46559$as_echo "$BUILD_STRIP" >&6; }
46560else
46561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46562$as_echo "no" >&6; }
46563fi
46564
46565
46566  test -n "$BUILD_STRIP" && break
46567done
46568
46569    else
46570      # If it succeeded, then it was overridden by the user. We will use it
46571      # for the tool.
46572
46573      # First remove it from the list of overridden variables, so we can test
46574      # for unknown variables in the end.
46575      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46576
46577      # Check if we try to supply an empty value
46578      if test "x$BUILD_STRIP" = x; then
46579        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
46580$as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
46581        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46582$as_echo_n "checking for BUILD_STRIP... " >&6; }
46583        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46584$as_echo "disabled" >&6; }
46585      else
46586        # Check if the provided tool contains a complete path.
46587        tool_specified="$BUILD_STRIP"
46588        tool_basename="${tool_specified##*/}"
46589        if test "x$tool_basename" = "x$tool_specified"; then
46590          # A command without a complete path is provided, search $PATH.
46591          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
46592$as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
46593          # Extract the first word of "$tool_basename", so it can be a program name with args.
46594set dummy $tool_basename; ac_word=$2
46595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46596$as_echo_n "checking for $ac_word... " >&6; }
46597if ${ac_cv_path_BUILD_STRIP+:} false; then :
46598  $as_echo_n "(cached) " >&6
46599else
46600  case $BUILD_STRIP in
46601  [\\/]* | ?:[\\/]*)
46602  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46603  ;;
46604  *)
46605  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46606for as_dir in $PATH
46607do
46608  IFS=$as_save_IFS
46609  test -z "$as_dir" && as_dir=.
46610    for ac_exec_ext in '' $ac_executable_extensions; do
46611  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46612    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46613    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46614    break 2
46615  fi
46616done
46617  done
46618IFS=$as_save_IFS
46619
46620  ;;
46621esac
46622fi
46623BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46624if test -n "$BUILD_STRIP"; then
46625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46626$as_echo "$BUILD_STRIP" >&6; }
46627else
46628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46629$as_echo "no" >&6; }
46630fi
46631
46632
46633          if test "x$BUILD_STRIP" = x; then
46634            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46635          fi
46636        else
46637          # Otherwise we believe it is a complete path. Use it as it is.
46638          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
46639$as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
46640          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46641$as_echo_n "checking for BUILD_STRIP... " >&6; }
46642          if test ! -x "$tool_specified"; then
46643            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46644$as_echo "not found" >&6; }
46645            as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
46646          fi
46647          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46648$as_echo "$tool_specified" >&6; }
46649        fi
46650      fi
46651    fi
46652
46653  fi
46654
46655
46656
46657  # Only process if variable expands to non-empty
46658
46659  if test "x$BUILD_STRIP" != x; then
46660    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46661
46662  # First separate the path from the arguments. This will split at the first
46663  # space.
46664  complete="$BUILD_STRIP"
46665  path="${complete%% *}"
46666  tmp="$complete EOL"
46667  arguments="${tmp#* }"
46668
46669  # Input might be given as Windows format, start by converting to
46670  # unix format.
46671  new_path=`$CYGPATH -u "$path"`
46672
46673  # Now try to locate executable using which
46674  new_path=`$WHICH "$new_path" 2> /dev/null`
46675  # bat and cmd files are not always considered executable in cygwin causing which
46676  # to not find them
46677  if test "x$new_path" = x \
46678      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46679      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46680    new_path=`$CYGPATH -u "$path"`
46681  fi
46682  if test "x$new_path" = x; then
46683    # Oops. Which didn't find the executable.
46684    # The splitting of arguments from the executable at a space might have been incorrect,
46685    # since paths with space are more likely in Windows. Give it another try with the whole
46686    # argument.
46687    path="$complete"
46688    arguments="EOL"
46689    new_path=`$CYGPATH -u "$path"`
46690    new_path=`$WHICH "$new_path" 2> /dev/null`
46691    # bat and cmd files are not always considered executable in cygwin causing which
46692    # to not find them
46693    if test "x$new_path" = x \
46694        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46695        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46696      new_path=`$CYGPATH -u "$path"`
46697    fi
46698    if test "x$new_path" = x; then
46699      # It's still not found. Now this is an unrecoverable error.
46700      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46701$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46702      has_space=`$ECHO "$complete" | $GREP " "`
46703      if test "x$has_space" != x; then
46704        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46705$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46706      fi
46707      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46708    fi
46709  fi
46710
46711  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46712  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46713  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46714  # "foo.exe" is OK but "foo" is an error.
46715  #
46716  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46717  # It is also a way to make sure we got the proper file name for the real test later on.
46718  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46719  if test "x$test_shortpath" = x; then
46720    # Short path failed, file does not exist as specified.
46721    # Try adding .exe or .cmd
46722    if test -f "${new_path}.exe"; then
46723      input_to_shortpath="${new_path}.exe"
46724    elif test -f "${new_path}.cmd"; then
46725      input_to_shortpath="${new_path}.cmd"
46726    else
46727      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
46728$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
46729      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46730$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46731      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46732    fi
46733  else
46734    input_to_shortpath="$new_path"
46735  fi
46736
46737  # Call helper function which possibly converts this using DOS-style short mode.
46738  # If so, the updated path is stored in $new_path.
46739  new_path="$input_to_shortpath"
46740
46741  input_path="$input_to_shortpath"
46742  # Check if we need to convert this using DOS-style short mode. If the path
46743  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46744  # take no chances and rewrite it.
46745  # Note: m4 eats our [], so we need to use [ and ] instead.
46746  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46747  if test "x$has_forbidden_chars" != x; then
46748    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46749    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46750    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46751    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46752      # Going to short mode and back again did indeed matter. Since short mode is
46753      # case insensitive, let's make it lowercase to improve readability.
46754      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46755      # Now convert it back to Unix-style (cygpath)
46756      input_path=`$CYGPATH -u "$shortmode_path"`
46757      new_path="$input_path"
46758    fi
46759  fi
46760
46761  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46762  if test "x$test_cygdrive_prefix" = x; then
46763    # As a simple fix, exclude /usr/bin since it's not a real path.
46764    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46765      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46766      # a path prefixed by /cygdrive for fixpath to work.
46767      new_path="$CYGWIN_ROOT_PATH$input_path"
46768    fi
46769  fi
46770
46771  # remove trailing .exe if any
46772  new_path="${new_path/%.exe/}"
46773
46774    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46775
46776  # First separate the path from the arguments. This will split at the first
46777  # space.
46778  complete="$BUILD_STRIP"
46779  path="${complete%% *}"
46780  tmp="$complete EOL"
46781  arguments="${tmp#* }"
46782
46783  # Input might be given as Windows format, start by converting to
46784  # unix format.
46785  new_path="$path"
46786
46787  windows_path="$new_path"
46788  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46789    unix_path=`$CYGPATH -u "$windows_path"`
46790    new_path="$unix_path"
46791  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46792    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46793    new_path="$unix_path"
46794  fi
46795
46796
46797  # Now try to locate executable using which
46798  new_path=`$WHICH "$new_path" 2> /dev/null`
46799
46800  if test "x$new_path" = x; then
46801    # Oops. Which didn't find the executable.
46802    # The splitting of arguments from the executable at a space might have been incorrect,
46803    # since paths with space are more likely in Windows. Give it another try with the whole
46804    # argument.
46805    path="$complete"
46806    arguments="EOL"
46807    new_path="$path"
46808
46809  windows_path="$new_path"
46810  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46811    unix_path=`$CYGPATH -u "$windows_path"`
46812    new_path="$unix_path"
46813  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46814    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46815    new_path="$unix_path"
46816  fi
46817
46818
46819    new_path=`$WHICH "$new_path" 2> /dev/null`
46820    # bat and cmd files are not always considered executable in MSYS causing which
46821    # to not find them
46822    if test "x$new_path" = x \
46823        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46824        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
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    fi
46837
46838    if test "x$new_path" = x; then
46839      # It's still not found. Now this is an unrecoverable error.
46840      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46841$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46842      has_space=`$ECHO "$complete" | $GREP " "`
46843      if test "x$has_space" != x; then
46844        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46845$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46846      fi
46847      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46848    fi
46849  fi
46850
46851  # Now new_path has a complete unix path to the binary
46852  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46853    # Keep paths in /bin as-is, but remove trailing .exe if any
46854    new_path="${new_path/%.exe/}"
46855    # Do not save /bin paths to all_fixpath_prefixes!
46856  else
46857    # Not in mixed or Windows style, start by that.
46858    new_path=`cmd //c echo $new_path`
46859
46860  input_path="$new_path"
46861  # Check if we need to convert this using DOS-style short mode. If the path
46862  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46863  # take no chances and rewrite it.
46864  # Note: m4 eats our [], so we need to use [ and ] instead.
46865  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46866  if test "x$has_forbidden_chars" != x; then
46867    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46868    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46869  fi
46870
46871    # Output is in $new_path
46872
46873  windows_path="$new_path"
46874  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46875    unix_path=`$CYGPATH -u "$windows_path"`
46876    new_path="$unix_path"
46877  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46878    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46879    new_path="$unix_path"
46880  fi
46881
46882    # remove trailing .exe if any
46883    new_path="${new_path/%.exe/}"
46884
46885    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46886    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46887  fi
46888
46889    else
46890      # We're on a unix platform. Hooray! :)
46891      # First separate the path from the arguments. This will split at the first
46892      # space.
46893      complete="$BUILD_STRIP"
46894      path="${complete%% *}"
46895      tmp="$complete EOL"
46896      arguments="${tmp#* }"
46897
46898      # Cannot rely on the command "which" here since it doesn't always work.
46899      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46900      if test -z "$is_absolute_path"; then
46901        # Path to executable is not absolute. Find it.
46902        IFS_save="$IFS"
46903        IFS=:
46904        for p in $PATH; do
46905          if test -f "$p/$path" && test -x "$p/$path"; then
46906            new_path="$p/$path"
46907            break
46908          fi
46909        done
46910        IFS="$IFS_save"
46911      else
46912        # This is an absolute path, we can use it without further modifications.
46913        new_path="$path"
46914      fi
46915
46916      if test "x$new_path" = x; then
46917        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46918$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46919        has_space=`$ECHO "$complete" | $GREP " "`
46920        if test "x$has_space" != x; then
46921          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46922$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46923        fi
46924        as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46925      fi
46926    fi
46927
46928    # Now join together the path and the arguments once again
46929    if test "x$arguments" != xEOL; then
46930      new_complete="$new_path ${arguments% *}"
46931    else
46932      new_complete="$new_path"
46933    fi
46934
46935    if test "x$complete" != "x$new_complete"; then
46936      BUILD_STRIP="$new_complete"
46937      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
46938$as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
46939    fi
46940  fi
46941
46942    # Assume the C compiler is the assembler
46943    BUILD_AS="$BUILD_CC -c"
46944    # Just like for the target compiler, use the compiler as linker
46945    BUILD_LD="$BUILD_CC"
46946    BUILD_LDCXX="$BUILD_CXX"
46947
46948    PATH="$OLDPATH"
46949
46950
46951  COMPILER=$BUILD_CC
46952  COMPILER_NAME=BuildC
46953
46954  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46955    # cc -V output typically looks like
46956    #     cc: Sun C 5.12 Linux_i386 2011/11/16
46957    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
46958    # Check that this is likely to be the Solaris Studio cc.
46959    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
46960    if test $? -ne 0; then
46961      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46962      { $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
46963$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46964      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46965$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
46966      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
46967$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
46968      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46969    fi
46970    # Remove usage instructions (if present), and
46971    # collapse compiler output into a single line
46972    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
46973        $SED -e 's/ *[Uu]sage:.*//'`
46974    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
46975        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
46976  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
46977    # xlc -qversion output typically looks like
46978    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
46979    #     Version: 11.01.0000.0015
46980    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
46981    # Check that this is likely to be the IBM XL C compiler.
46982    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
46983    if test $? -ne 0; then
46984      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46985      { $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
46986$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46987      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46988$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
46989      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
46990$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
46991      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46992    fi
46993    # Collapse compiler output into a single line
46994    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
46995    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
46996        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
46997  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46998    # There is no specific version flag, but all output starts with a version string.
46999    # First line typically looks something like:
47000    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47001    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47002    # Check that this is likely to be Microsoft CL.EXE.
47003    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47004    if test $? -ne 0; then
47005      { $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
47006$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47007      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47008$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47009      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47010    fi
47011    # Collapse compiler output into a single line
47012    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47013    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47014        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47015  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47016    # gcc --version output typically looks like
47017    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47018    #     Copyright (C) 2013 Free Software Foundation, Inc.
47019    #     This is free software; see the source for copying conditions.  There is NO
47020    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47021    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47022    # Check that this is likely to be GCC.
47023    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47024    if test $? -ne 0; then
47025      { $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
47026$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47027      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47028$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47029      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47030    fi
47031    # Remove Copyright and legalese from version string, and
47032    # collapse into a single line
47033    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47034        $SED -e 's/ *Copyright .*//'`
47035    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47036        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47037  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47038    # clang --version output typically looks like
47039    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47040    #    clang version 3.3 (tags/RELEASE_33/final)
47041    # or
47042    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47043    #    Target: x86_64-pc-linux-gnu
47044    #    Thread model: posix
47045    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47046    # Check that this is likely to be clang
47047    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47048    if test $? -ne 0; then
47049      { $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
47050$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47051      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47052$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47053      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47054    fi
47055    # Collapse compiler output into a single line
47056    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47057    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47058        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47059  else
47060      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47061  fi
47062  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47063  BUILD_CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47064  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47065  BUILD_CC_VERSION_STRING="$COMPILER_VERSION_STRING"
47066
47067  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47068$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47069
47070
47071  COMPILER=$BUILD_CXX
47072  COMPILER_NAME=BuildC++
47073
47074  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47075    # cc -V output typically looks like
47076    #     cc: Sun C 5.12 Linux_i386 2011/11/16
47077    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47078    # Check that this is likely to be the Solaris Studio cc.
47079    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
47080    if test $? -ne 0; then
47081      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47082      { $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
47083$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47084      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47085$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47086      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47087$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47088      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47089    fi
47090    # Remove usage instructions (if present), and
47091    # collapse compiler output into a single line
47092    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47093        $SED -e 's/ *[Uu]sage:.*//'`
47094    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47095        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47096  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47097    # xlc -qversion output typically looks like
47098    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47099    #     Version: 11.01.0000.0015
47100    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47101    # Check that this is likely to be the IBM XL C compiler.
47102    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47103    if test $? -ne 0; then
47104      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47105      { $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
47106$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47107      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47108$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47109      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47110$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47111      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47112    fi
47113    # Collapse compiler output into a single line
47114    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47115    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47116        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47117  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47118    # There is no specific version flag, but all output starts with a version string.
47119    # First line typically looks something like:
47120    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47121    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47122    # Check that this is likely to be Microsoft CL.EXE.
47123    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47124    if test $? -ne 0; then
47125      { $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
47126$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47127      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47128$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47129      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47130    fi
47131    # Collapse compiler output into a single line
47132    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47133    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47134        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47135  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47136    # gcc --version output typically looks like
47137    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47138    #     Copyright (C) 2013 Free Software Foundation, Inc.
47139    #     This is free software; see the source for copying conditions.  There is NO
47140    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47141    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47142    # Check that this is likely to be GCC.
47143    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47144    if test $? -ne 0; then
47145      { $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
47146$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47147      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47148$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47149      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47150    fi
47151    # Remove Copyright and legalese from version string, and
47152    # collapse into a single line
47153    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47154        $SED -e 's/ *Copyright .*//'`
47155    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47156        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47157  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47158    # clang --version output typically looks like
47159    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47160    #    clang version 3.3 (tags/RELEASE_33/final)
47161    # or
47162    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47163    #    Target: x86_64-pc-linux-gnu
47164    #    Thread model: posix
47165    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47166    # Check that this is likely to be clang
47167    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /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 with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47172$as_echo "$as_me: The result from running with --version 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/^.* version \([1-9][0-9.]*\).*$/\1/'`
47179  else
47180      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47181  fi
47182  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47183  BUILD_CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47184  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47185  BUILD_CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
47186
47187  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47188$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47189
47190
47191  if test "x$BUILD_CC_VERSION_NUMBER" != "x$BUILD_CXX_VERSION_NUMBER"; then
47192    { $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
47193$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&2;}
47194    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47195$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47196  fi
47197
47198  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47199  if  [[ "[$]BUILD_CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
47200    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than three parts (X.Y.Z): $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&5
47201$as_echo "$as_me: WARNING: C compiler version number has more than three parts (X.Y.Z): $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47202  fi
47203
47204  if  [[  "[$]BUILD_CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47205    { $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
47206$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47207  fi
47208
47209  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$BUILD_CC_VERSION_NUMBER"`
47210
47211  else
47212    # If we are not cross compiling, use the normal target compilers for
47213    # building the build platform executables.
47214    BUILD_CC="$CC"
47215    BUILD_CXX="$CXX"
47216    BUILD_LD="$LD"
47217    BUILD_LDCXX="$LDCXX"
47218    BUILD_NM="$NM"
47219    BUILD_AS="$AS"
47220    BUILD_OBJCOPY="$OBJCOPY"
47221    BUILD_STRIP="$STRIP"
47222    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
47223    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
47224    BUILD_AR="$AR"
47225
47226
47227  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
47228    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
47229$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
47230    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47231$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47232  fi
47233
47234  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47235  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
47236    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than three parts (X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
47237$as_echo "$as_me: WARNING: C compiler version number has more than three parts (X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47238  fi
47239
47240  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47241    { $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
47242$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47243  fi
47244
47245  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$CC_VERSION_NUMBER"`
47246
47247  fi
47248
47249
47250
47251
47252
47253
47254
47255
47256
47257
47258
47259
47260  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47261    # For hotspot, we need these in Windows mixed path,
47262    # so rewrite them all. Need added .exe suffix.
47263    HOTSPOT_CXX="$CXX.exe"
47264    HOTSPOT_LD="$LD.exe"
47265    HOTSPOT_MT="$MT.exe"
47266    HOTSPOT_RC="$RC.exe"
47267
47268  unix_path="$HOTSPOT_CXX"
47269  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47270    windows_path=`$CYGPATH -m "$unix_path"`
47271    HOTSPOT_CXX="$windows_path"
47272  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47273    windows_path=`cmd //c echo $unix_path`
47274    HOTSPOT_CXX="$windows_path"
47275  fi
47276
47277
47278  unix_path="$HOTSPOT_LD"
47279  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47280    windows_path=`$CYGPATH -m "$unix_path"`
47281    HOTSPOT_LD="$windows_path"
47282  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47283    windows_path=`cmd //c echo $unix_path`
47284    HOTSPOT_LD="$windows_path"
47285  fi
47286
47287
47288  unix_path="$HOTSPOT_MT"
47289  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47290    windows_path=`$CYGPATH -m "$unix_path"`
47291    HOTSPOT_MT="$windows_path"
47292  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47293    windows_path=`cmd //c echo $unix_path`
47294    HOTSPOT_MT="$windows_path"
47295  fi
47296
47297
47298  unix_path="$HOTSPOT_RC"
47299  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47300    windows_path=`$CYGPATH -m "$unix_path"`
47301    HOTSPOT_RC="$windows_path"
47302  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47303    windows_path=`cmd //c echo $unix_path`
47304    HOTSPOT_RC="$windows_path"
47305  fi
47306
47307
47308
47309  else
47310    HOTSPOT_CXX="$CXX"
47311    HOTSPOT_LD="$LD"
47312  fi
47313
47314
47315
47316  if test  "x$TOOLCHAIN_TYPE" = xclang; then
47317    USE_CLANG=true
47318  fi
47319
47320
47321
47322
47323
47324  # The package path is used only on macosx?
47325  # FIXME: clean this up, and/or move it elsewhere.
47326  PACKAGE_PATH=/opt/local
47327
47328
47329  # Check for extra potential brokenness.
47330  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47331    # On Windows, double-check that we got the right compiler.
47332    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47333    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
47334    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
47335      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
47336        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
47337      fi
47338    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
47339      if test "x$COMPILER_CPU_TEST" != "xx64"; then
47340        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
47341      fi
47342    fi
47343  fi
47344
47345  if test "x$TOOLCHAIN_TYPE" = xgcc; then
47346    # If this is a --hash-style=gnu system, use --hash-style=both, why?
47347    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
47348    # This is later checked when setting flags.
47349
47350    # "-Og" suppported for GCC 4.8 and later
47351    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
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
47382
47383
47384
47385
47386
47387
47388
47389
47390
47391
47392
47393
47394
47395
47396
47397
47398
47399    # Execute function body
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
47431
47432
47433
47434
47435
47436
47437
47438
47439
47440
47441
47442
47443
47444
47445
47446
47447
47448    # Execute function body
47449
47450  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47451$as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47452  supports=yes
47453
47454  saved_cflags="$CFLAGS"
47455  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
47456  ac_ext=c
47457ac_cpp='$CPP $CPPFLAGS'
47458ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47459ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47460ac_compiler_gnu=$ac_cv_c_compiler_gnu
47461
47462  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47463/* end confdefs.h.  */
47464int i;
47465_ACEOF
47466if ac_fn_c_try_compile "$LINENO"; then :
47467
47468else
47469  supports=no
47470fi
47471rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47472  ac_ext=cpp
47473ac_cpp='$CXXCPP $CPPFLAGS'
47474ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47475ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47476ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47477
47478  CFLAGS="$saved_cflags"
47479
47480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47481$as_echo "$supports" >&6; }
47482  if test "x$supports" = "xyes" ; then
47483    :
47484    C_COMP_SUPPORTS="yes"
47485  else
47486    :
47487    C_COMP_SUPPORTS="no"
47488  fi
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
47531
47532
47533
47534
47535
47536
47537
47538
47539
47540
47541
47542
47543
47544
47545
47546
47547
47548    # Execute function body
47549
47550  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47551$as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47552  supports=yes
47553
47554  saved_cxxflags="$CXXFLAGS"
47555  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
47556  ac_ext=cpp
47557ac_cpp='$CXXCPP $CPPFLAGS'
47558ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47559ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47560ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47561
47562  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47563/* end confdefs.h.  */
47564int i;
47565_ACEOF
47566if ac_fn_cxx_try_compile "$LINENO"; then :
47567
47568else
47569  supports=no
47570fi
47571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47572  ac_ext=cpp
47573ac_cpp='$CXXCPP $CPPFLAGS'
47574ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47575ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47576ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47577
47578  CXXFLAGS="$saved_cxxflags"
47579
47580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47581$as_echo "$supports" >&6; }
47582  if test "x$supports" = "xyes" ; then
47583    :
47584    CXX_COMP_SUPPORTS="yes"
47585  else
47586    :
47587    CXX_COMP_SUPPORTS="no"
47588  fi
47589
47590
47591
47592
47593
47594
47595
47596
47597
47598
47599
47600
47601
47602  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47603$as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47604  supports=no
47605  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
47606
47607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47608$as_echo "$supports" >&6; }
47609  if test "x$supports" = "xyes" ; then
47610    :
47611    HAS_CFLAG_OPTIMIZE_DEBUG=true
47612  else
47613    :
47614    HAS_CFLAG_OPTIMIZE_DEBUG=false
47615  fi
47616
47617
47618
47619
47620
47621
47622
47623    # "-z relro" supported in GNU binutils 2.17 and later
47624    LINKER_RELRO_FLAG="-Wl,-z,relro"
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
47655
47656
47657
47658
47659
47660
47661
47662
47663
47664
47665
47666
47667
47668
47669
47670
47671
47672    # Execute function body
47673
47674  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
47675$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
47676  supports=yes
47677
47678  saved_ldflags="$LDFLAGS"
47679  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
47680  ac_ext=c
47681ac_cpp='$CPP $CPPFLAGS'
47682ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47683ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47684ac_compiler_gnu=$ac_cv_c_compiler_gnu
47685
47686  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47687/* end confdefs.h.  */
47688
47689int
47690main ()
47691{
47692
47693  ;
47694  return 0;
47695}
47696_ACEOF
47697if ac_fn_c_try_link "$LINENO"; then :
47698
47699else
47700  supports=no
47701fi
47702rm -f core conftest.err conftest.$ac_objext \
47703    conftest$ac_exeext conftest.$ac_ext
47704  ac_ext=cpp
47705ac_cpp='$CXXCPP $CPPFLAGS'
47706ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47707ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47708ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47709
47710  LDFLAGS="$saved_ldflags"
47711
47712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47713$as_echo "$supports" >&6; }
47714  if test "x$supports" = "xyes" ; then
47715    :
47716    HAS_LINKER_RELRO=true
47717  else
47718    :
47719    HAS_LINKER_RELRO=false
47720  fi
47721
47722
47723
47724
47725
47726
47727
47728
47729
47730
47731
47732
47733
47734    # "-z now" supported in GNU binutils 2.11 and later
47735    LINKER_NOW_FLAG="-Wl,-z,now"
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
47766
47767
47768
47769
47770
47771
47772
47773
47774
47775
47776
47777
47778
47779
47780
47781
47782
47783    # Execute function body
47784
47785  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
47786$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
47787  supports=yes
47788
47789  saved_ldflags="$LDFLAGS"
47790  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
47791  ac_ext=c
47792ac_cpp='$CPP $CPPFLAGS'
47793ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47794ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47795ac_compiler_gnu=$ac_cv_c_compiler_gnu
47796
47797  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47798/* end confdefs.h.  */
47799
47800int
47801main ()
47802{
47803
47804  ;
47805  return 0;
47806}
47807_ACEOF
47808if ac_fn_c_try_link "$LINENO"; then :
47809
47810else
47811  supports=no
47812fi
47813rm -f core conftest.err conftest.$ac_objext \
47814    conftest$ac_exeext conftest.$ac_ext
47815  ac_ext=cpp
47816ac_cpp='$CXXCPP $CPPFLAGS'
47817ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47818ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47819ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47820
47821  LDFLAGS="$saved_ldflags"
47822
47823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47824$as_echo "$supports" >&6; }
47825  if test "x$supports" = "xyes" ; then
47826    :
47827    HAS_LINKER_NOW=true
47828  else
47829    :
47830    HAS_LINKER_NOW=false
47831  fi
47832
47833
47834
47835
47836
47837
47838
47839
47840
47841
47842
47843
47844  fi
47845
47846  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
47847  # in executable.'
47848  USING_BROKEN_SUSE_LD=no
47849  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
47850    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
47851$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
47852    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
47853    $ECHO "int main() { }" > main.c
47854    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
47855      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47856$as_echo "no" >&6; }
47857      USING_BROKEN_SUSE_LD=no
47858    else
47859      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47860$as_echo "yes" >&6; }
47861      USING_BROKEN_SUSE_LD=yes
47862    fi
47863    $RM version-script.map main.c a.out
47864  fi
47865
47866
47867  # Setup hotspot lecagy names for toolchains
47868  HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
47869  if test "x$TOOLCHAIN_TYPE" = xclang; then
47870    HOTSPOT_TOOLCHAIN_TYPE=gcc
47871  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47872    HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
47873  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47874    HOTSPOT_TOOLCHAIN_TYPE=visCPP
47875  fi
47876
47877
47878
47879# Setup the JTReg Regression Test Harness.
47880
47881
47882# Check whether --with-jtreg was given.
47883if test "${with_jtreg+set}" = set; then :
47884  withval=$with_jtreg;
47885else
47886  with_jtreg=no
47887fi
47888
47889
47890  if test "x$with_jtreg" = xno; then
47891    # jtreg disabled
47892    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47893$as_echo_n "checking for jtreg... " >&6; }
47894    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47895$as_echo "no" >&6; }
47896  else
47897    if test "x$with_jtreg" != xyes; then
47898      # with path specified.
47899      JT_HOME="$with_jtreg"
47900    fi
47901
47902    if test "x$JT_HOME" != x; then
47903      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47904$as_echo_n "checking for jtreg... " >&6; }
47905
47906      # use JT_HOME enviroment var.
47907
47908  # Only process if variable expands to non-empty
47909
47910  if test "x$JT_HOME" != x; then
47911    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47912
47913  # Input might be given as Windows format, start by converting to
47914  # unix format.
47915  path="$JT_HOME"
47916  new_path=`$CYGPATH -u "$path"`
47917
47918  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47919  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47920  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47921  # "foo.exe" is OK but "foo" is an error.
47922  #
47923  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47924  # It is also a way to make sure we got the proper file name for the real test later on.
47925  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47926  if test "x$test_shortpath" = x; then
47927    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47928$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
47929    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
47930  fi
47931
47932  # Call helper function which possibly converts this using DOS-style short mode.
47933  # If so, the updated path is stored in $new_path.
47934
47935  input_path="$new_path"
47936  # Check if we need to convert this using DOS-style short mode. If the path
47937  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47938  # take no chances and rewrite it.
47939  # Note: m4 eats our [], so we need to use [ and ] instead.
47940  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47941  if test "x$has_forbidden_chars" != x; then
47942    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47943    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47944    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47945    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47946      # Going to short mode and back again did indeed matter. Since short mode is
47947      # case insensitive, let's make it lowercase to improve readability.
47948      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47949      # Now convert it back to Unix-style (cygpath)
47950      input_path=`$CYGPATH -u "$shortmode_path"`
47951      new_path="$input_path"
47952    fi
47953  fi
47954
47955  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47956  if test "x$test_cygdrive_prefix" = x; then
47957    # As a simple fix, exclude /usr/bin since it's not a real path.
47958    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47959      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47960      # a path prefixed by /cygdrive for fixpath to work.
47961      new_path="$CYGWIN_ROOT_PATH$input_path"
47962    fi
47963  fi
47964
47965
47966  if test "x$path" != "x$new_path"; then
47967    JT_HOME="$new_path"
47968    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47969$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47970  fi
47971
47972    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47973
47974  path="$JT_HOME"
47975  has_colon=`$ECHO $path | $GREP ^.:`
47976  new_path="$path"
47977  if test "x$has_colon" = x; then
47978    # Not in mixed or Windows style, start by that.
47979    new_path=`cmd //c echo $path`
47980  fi
47981
47982
47983  input_path="$new_path"
47984  # Check if we need to convert this using DOS-style short mode. If the path
47985  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47986  # take no chances and rewrite it.
47987  # Note: m4 eats our [], so we need to use [ and ] instead.
47988  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47989  if test "x$has_forbidden_chars" != x; then
47990    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47991    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47992  fi
47993
47994
47995  windows_path="$new_path"
47996  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47997    unix_path=`$CYGPATH -u "$windows_path"`
47998    new_path="$unix_path"
47999  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48000    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48001    new_path="$unix_path"
48002  fi
48003
48004  if test "x$path" != "x$new_path"; then
48005    JT_HOME="$new_path"
48006    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
48007$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
48008  fi
48009
48010  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48011  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48012
48013    else
48014      # We're on a unix platform. Hooray! :)
48015      path="$JT_HOME"
48016      has_space=`$ECHO "$path" | $GREP " "`
48017      if test "x$has_space" != x; then
48018        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
48019$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
48020        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48021      fi
48022
48023      # Use eval to expand a potential ~
48024      eval path="$path"
48025      if test ! -f "$path" && test ! -d "$path"; then
48026        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
48027      fi
48028
48029      if test -d "$path"; then
48030        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
48031      else
48032        dir="`$DIRNAME "$path"`"
48033        base="`$BASENAME "$path"`"
48034        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
48035      fi
48036    fi
48037  fi
48038
48039
48040      # jtreg win32 script works for everybody
48041      JTREGEXE="$JT_HOME/bin/jtreg"
48042
48043      if test ! -f "$JTREGEXE"; then
48044        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
48045      fi
48046
48047      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48048$as_echo "$JTREGEXE" >&6; }
48049    else
48050      # try to find jtreg on path
48051
48052
48053
48054  # Publish this variable in the help.
48055
48056
48057  if [ -z "${JTREGEXE+x}" ]; then
48058    # The variable is not set by user, try to locate tool using the code snippet
48059    for ac_prog in jtreg
48060do
48061  # Extract the first word of "$ac_prog", so it can be a program name with args.
48062set dummy $ac_prog; ac_word=$2
48063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48064$as_echo_n "checking for $ac_word... " >&6; }
48065if ${ac_cv_path_JTREGEXE+:} false; then :
48066  $as_echo_n "(cached) " >&6
48067else
48068  case $JTREGEXE in
48069  [\\/]* | ?:[\\/]*)
48070  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48071  ;;
48072  *)
48073  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48074for as_dir in $PATH
48075do
48076  IFS=$as_save_IFS
48077  test -z "$as_dir" && as_dir=.
48078    for ac_exec_ext in '' $ac_executable_extensions; do
48079  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48080    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48081    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48082    break 2
48083  fi
48084done
48085  done
48086IFS=$as_save_IFS
48087
48088  ;;
48089esac
48090fi
48091JTREGEXE=$ac_cv_path_JTREGEXE
48092if test -n "$JTREGEXE"; then
48093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48094$as_echo "$JTREGEXE" >&6; }
48095else
48096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48097$as_echo "no" >&6; }
48098fi
48099
48100
48101  test -n "$JTREGEXE" && break
48102done
48103
48104  else
48105    # The variable is set, but is it from the command line or the environment?
48106
48107    # Try to remove the string !JTREGEXE! from our list.
48108    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
48109    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48110      # If it failed, the variable was not from the command line. Ignore it,
48111      # but warn the user (except for BASH, which is always set by the calling BASH).
48112      if test "xJTREGEXE" != xBASH; then
48113        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
48114$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
48115      fi
48116      # Try to locate tool using the code snippet
48117      for ac_prog in jtreg
48118do
48119  # Extract the first word of "$ac_prog", so it can be a program name with args.
48120set dummy $ac_prog; ac_word=$2
48121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48122$as_echo_n "checking for $ac_word... " >&6; }
48123if ${ac_cv_path_JTREGEXE+:} false; then :
48124  $as_echo_n "(cached) " >&6
48125else
48126  case $JTREGEXE in
48127  [\\/]* | ?:[\\/]*)
48128  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48129  ;;
48130  *)
48131  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48132for as_dir in $PATH
48133do
48134  IFS=$as_save_IFS
48135  test -z "$as_dir" && as_dir=.
48136    for ac_exec_ext in '' $ac_executable_extensions; do
48137  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48138    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48139    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48140    break 2
48141  fi
48142done
48143  done
48144IFS=$as_save_IFS
48145
48146  ;;
48147esac
48148fi
48149JTREGEXE=$ac_cv_path_JTREGEXE
48150if test -n "$JTREGEXE"; then
48151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48152$as_echo "$JTREGEXE" >&6; }
48153else
48154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48155$as_echo "no" >&6; }
48156fi
48157
48158
48159  test -n "$JTREGEXE" && break
48160done
48161
48162    else
48163      # If it succeeded, then it was overridden by the user. We will use it
48164      # for the tool.
48165
48166      # First remove it from the list of overridden variables, so we can test
48167      # for unknown variables in the end.
48168      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48169
48170      # Check if we try to supply an empty value
48171      if test "x$JTREGEXE" = x; then
48172        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
48173$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
48174        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48175$as_echo_n "checking for JTREGEXE... " >&6; }
48176        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
48177$as_echo "disabled" >&6; }
48178      else
48179        # Check if the provided tool contains a complete path.
48180        tool_specified="$JTREGEXE"
48181        tool_basename="${tool_specified##*/}"
48182        if test "x$tool_basename" = "x$tool_specified"; then
48183          # A command without a complete path is provided, search $PATH.
48184          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
48185$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
48186          # Extract the first word of "$tool_basename", so it can be a program name with args.
48187set dummy $tool_basename; ac_word=$2
48188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48189$as_echo_n "checking for $ac_word... " >&6; }
48190if ${ac_cv_path_JTREGEXE+:} false; then :
48191  $as_echo_n "(cached) " >&6
48192else
48193  case $JTREGEXE in
48194  [\\/]* | ?:[\\/]*)
48195  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48196  ;;
48197  *)
48198  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48199for as_dir in $PATH
48200do
48201  IFS=$as_save_IFS
48202  test -z "$as_dir" && as_dir=.
48203    for ac_exec_ext in '' $ac_executable_extensions; do
48204  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48205    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48206    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48207    break 2
48208  fi
48209done
48210  done
48211IFS=$as_save_IFS
48212
48213  ;;
48214esac
48215fi
48216JTREGEXE=$ac_cv_path_JTREGEXE
48217if test -n "$JTREGEXE"; then
48218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48219$as_echo "$JTREGEXE" >&6; }
48220else
48221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48222$as_echo "no" >&6; }
48223fi
48224
48225
48226          if test "x$JTREGEXE" = x; then
48227            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
48228          fi
48229        else
48230          # Otherwise we believe it is a complete path. Use it as it is.
48231          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
48232$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
48233          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48234$as_echo_n "checking for JTREGEXE... " >&6; }
48235          if test ! -x "$tool_specified"; then
48236            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
48237$as_echo "not found" >&6; }
48238            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
48239          fi
48240          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
48241$as_echo "$tool_specified" >&6; }
48242        fi
48243      fi
48244    fi
48245
48246  fi
48247
48248
48249
48250  if test "x$JTREGEXE" = x; then
48251    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
48252  fi
48253
48254
48255      JT_HOME="`$DIRNAME $JTREGEXE`"
48256    fi
48257  fi
48258
48259
48260
48261
48262
48263
48264  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
48265  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
48266  # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
48267  #                              commands produced by the link step (currently AIX only)
48268  if test "x$TOOLCHAIN_TYPE" = xxlc; then
48269    COMPILER_TARGET_BITS_FLAG="-q"
48270    COMPILER_COMMAND_FILE_FLAG="-f"
48271    COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
48272  else
48273    COMPILER_TARGET_BITS_FLAG="-m"
48274    COMPILER_COMMAND_FILE_FLAG="@"
48275    COMPILER_BINDCMD_FILE_FLAG=""
48276
48277    # The solstudio linker does not support @-files.
48278    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48279      COMPILER_COMMAND_FILE_FLAG=
48280    fi
48281
48282    # Check if @file is supported by gcc
48283    if test "x$TOOLCHAIN_TYPE" = xgcc; then
48284      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
48285$as_echo_n "checking if @file is supported by gcc... " >&6; }
48286      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
48287      $ECHO "" "--version" > command.file
48288      if $CXX @command.file 2>&5 >&5; then
48289        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48290$as_echo "yes" >&6; }
48291        COMPILER_COMMAND_FILE_FLAG="@"
48292      else
48293        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48294$as_echo "no" >&6; }
48295        COMPILER_COMMAND_FILE_FLAG=
48296      fi
48297      $RM command.file
48298    fi
48299  fi
48300
48301
48302
48303
48304  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
48305  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48306    ARFLAGS="-r"
48307  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48308    ARFLAGS="-X64"
48309  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
48310    # lib.exe is used as AR to create static libraries.
48311    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
48312  else
48313    ARFLAGS=""
48314  fi
48315
48316
48317  ## Setup strip.
48318  # FIXME: should this really be per platform, or should it be per toolchain type?
48319  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
48320  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
48321  if test "x$OPENJDK_TARGET_OS" = xlinux; then
48322    STRIPFLAGS="-g"
48323  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
48324    STRIPFLAGS="-x"
48325  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
48326    STRIPFLAGS="-S"
48327  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48328    STRIPFLAGS="-X32_64"
48329  fi
48330
48331
48332
48333  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48334    CC_OUT_OPTION=-Fo
48335    EXE_OUT_OPTION=-out:
48336    LD_OUT_OPTION=-out:
48337    AR_OUT_OPTION=-out:
48338  else
48339    # The option used to specify the target .o,.a or .so file.
48340    # When compiling, how to specify the to be created object file.
48341    CC_OUT_OPTION='-o$(SPACE)'
48342    # When linking, how to specify the to be created executable.
48343    EXE_OUT_OPTION='-o$(SPACE)'
48344    # When linking, how to specify the to be created dynamically linkable library.
48345    LD_OUT_OPTION='-o$(SPACE)'
48346    # When archiving, how to specify the to be create static archive for object files.
48347    AR_OUT_OPTION='rcs$(SPACE)'
48348  fi
48349
48350
48351
48352
48353
48354  # On Windows, we need to set RC flags.
48355  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48356    RC_FLAGS="-nologo -l0x409"
48357    JVM_RCFLAGS="-nologo"
48358    if test "x$DEBUG_LEVEL" = xrelease; then
48359      RC_FLAGS="$RC_FLAGS -DNDEBUG"
48360      JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
48361    fi
48362
48363    # The version variables used to create RC_FLAGS may be overridden
48364    # in a custom configure script, or possibly the command line.
48365    # Let those variables be expanded at make time in spec.gmk.
48366    # The \$ are escaped to the shell, and the $(...) variables
48367    # are evaluated by make.
48368    RC_FLAGS="$RC_FLAGS \
48369        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
48370        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
48371        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
48372        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
48373        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
48374        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
48375        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
48376
48377    JVM_RCFLAGS="$JVM_RCFLAGS \
48378        -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
48379        -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
48380        -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
48381        -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
48382        -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
48383        -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
48384        -D\"HS_FNAME=jvm.dll\" \
48385        -D\"HS_INTERNAL_NAME=jvm\""
48386  fi
48387
48388
48389
48390  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48391    # silence copyright notice and other headers.
48392    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
48393  fi
48394
48395
48396# Now we can test some aspects on the target using configure macros.
48397
48398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
48399$as_echo_n "checking for ANSI C header files... " >&6; }
48400if ${ac_cv_header_stdc+:} false; then :
48401  $as_echo_n "(cached) " >&6
48402else
48403  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48404/* end confdefs.h.  */
48405#include <stdlib.h>
48406#include <stdarg.h>
48407#include <string.h>
48408#include <float.h>
48409
48410int
48411main ()
48412{
48413
48414  ;
48415  return 0;
48416}
48417_ACEOF
48418if ac_fn_cxx_try_compile "$LINENO"; then :
48419  ac_cv_header_stdc=yes
48420else
48421  ac_cv_header_stdc=no
48422fi
48423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48424
48425if test $ac_cv_header_stdc = yes; then
48426  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
48427  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48428/* end confdefs.h.  */
48429#include <string.h>
48430
48431_ACEOF
48432if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48433  $EGREP "memchr" >/dev/null 2>&1; then :
48434
48435else
48436  ac_cv_header_stdc=no
48437fi
48438rm -f conftest*
48439
48440fi
48441
48442if test $ac_cv_header_stdc = yes; then
48443  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
48444  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48445/* end confdefs.h.  */
48446#include <stdlib.h>
48447
48448_ACEOF
48449if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48450  $EGREP "free" >/dev/null 2>&1; then :
48451
48452else
48453  ac_cv_header_stdc=no
48454fi
48455rm -f conftest*
48456
48457fi
48458
48459if test $ac_cv_header_stdc = yes; then
48460  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
48461  if test "$cross_compiling" = yes; then :
48462  :
48463else
48464  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48465/* end confdefs.h.  */
48466#include <ctype.h>
48467#include <stdlib.h>
48468#if ((' ' & 0x0FF) == 0x020)
48469# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
48470# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
48471#else
48472# define ISLOWER(c) \
48473		   (('a' <= (c) && (c) <= 'i') \
48474		     || ('j' <= (c) && (c) <= 'r') \
48475		     || ('s' <= (c) && (c) <= 'z'))
48476# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
48477#endif
48478
48479#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
48480int
48481main ()
48482{
48483  int i;
48484  for (i = 0; i < 256; i++)
48485    if (XOR (islower (i), ISLOWER (i))
48486	|| toupper (i) != TOUPPER (i))
48487      return 2;
48488  return 0;
48489}
48490_ACEOF
48491if ac_fn_cxx_try_run "$LINENO"; then :
48492
48493else
48494  ac_cv_header_stdc=no
48495fi
48496rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48497  conftest.$ac_objext conftest.beam conftest.$ac_ext
48498fi
48499
48500fi
48501fi
48502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
48503$as_echo "$ac_cv_header_stdc" >&6; }
48504if test $ac_cv_header_stdc = yes; then
48505
48506$as_echo "#define STDC_HEADERS 1" >>confdefs.h
48507
48508fi
48509
48510# On IRIX 5.3, sys/types and inttypes.h are conflicting.
48511for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
48512		  inttypes.h stdint.h unistd.h
48513do :
48514  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
48515ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
48516"
48517if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
48518  cat >>confdefs.h <<_ACEOF
48519#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
48520_ACEOF
48521
48522fi
48523
48524done
48525
48526
48527
48528  ###############################################################################
48529  #
48530  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
48531  # (The JVM can use 32 or 64 bit Java pointers but that decision
48532  # is made at runtime.)
48533  #
48534
48535  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
48536    # Always specify -m flag on Solaris
48537    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
48538
48539  # When we add flags to the "official" CFLAGS etc, we need to
48540  # keep track of these additions in ADDED_CFLAGS etc. These
48541  # will later be checked to make sure only controlled additions
48542  # have been made to CFLAGS etc.
48543  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48544  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48545  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48546
48547  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48548  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48549  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48550
48551  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48552  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48553  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48554
48555  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48556  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48557  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48558
48559  elif test "x$COMPILE_TYPE" = xreduced; then
48560    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
48561      # Specify -m if running reduced on unix platforms
48562
48563  # When we add flags to the "official" CFLAGS etc, we need to
48564  # keep track of these additions in ADDED_CFLAGS etc. These
48565  # will later be checked to make sure only controlled additions
48566  # have been made to CFLAGS etc.
48567  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48568  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48569  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48570
48571  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48572  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48573  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48574
48575  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48576  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48577  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48578
48579  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48580  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48581  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48582
48583    fi
48584  fi
48585  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48586    JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48587    JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48588    JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48589  fi
48590
48591  # Make compilation sanity check
48592  for ac_header in stdio.h
48593do :
48594  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
48595if test "x$ac_cv_header_stdio_h" = xyes; then :
48596  cat >>confdefs.h <<_ACEOF
48597#define HAVE_STDIO_H 1
48598_ACEOF
48599
48600else
48601
48602    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
48603$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
48604    if test "x$COMPILE_TYPE" = xreduced; then
48605
48606  # Print a helpful message on how to acquire the necessary build dependency.
48607  # reduced is the help tag: freetype, cups, alsa etc
48608  MISSING_DEPENDENCY=reduced
48609
48610  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48611    cygwin_help $MISSING_DEPENDENCY
48612  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48613    msys_help $MISSING_DEPENDENCY
48614  else
48615    PKGHANDLER_COMMAND=
48616
48617    case $PKGHANDLER in
48618      apt-get)
48619        apt_help     $MISSING_DEPENDENCY ;;
48620      yum)
48621        yum_help     $MISSING_DEPENDENCY ;;
48622      port)
48623        port_help    $MISSING_DEPENDENCY ;;
48624      pkgutil)
48625        pkgutil_help $MISSING_DEPENDENCY ;;
48626      pkgadd)
48627        pkgadd_help  $MISSING_DEPENDENCY ;;
48628    esac
48629
48630    if test "x$PKGHANDLER_COMMAND" != x; then
48631      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48632    fi
48633  fi
48634
48635      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48636$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48637    elif test "x$COMPILE_TYPE" = xcross; then
48638      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48639$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48640    fi
48641    as_fn_error $? "Cannot continue." "$LINENO" 5
48642
48643fi
48644
48645done
48646
48647
48648  # The cast to long int works around a bug in the HP C Compiler
48649# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48650# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48651# This bug is HP SR number 8606223364.
48652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48653$as_echo_n "checking size of int *... " >&6; }
48654if ${ac_cv_sizeof_int_p+:} false; then :
48655  $as_echo_n "(cached) " >&6
48656else
48657  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48658
48659else
48660  if test "$ac_cv_type_int_p" = yes; then
48661     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48662$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48663as_fn_error 77 "cannot compute sizeof (int *)
48664See \`config.log' for more details" "$LINENO" 5; }
48665   else
48666     ac_cv_sizeof_int_p=0
48667   fi
48668fi
48669
48670fi
48671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48672$as_echo "$ac_cv_sizeof_int_p" >&6; }
48673
48674
48675
48676cat >>confdefs.h <<_ACEOF
48677#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48678_ACEOF
48679
48680
48681
48682  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
48683  if test "x$ac_cv_sizeof_int_p" = x; then
48684    # The test failed, lets stick to the assumed value.
48685    { $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
48686$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
48687  else
48688    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48689
48690    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48691      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
48692      # Let's try to implicitely set the compilers target architecture and retry the test
48693      { $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
48694$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;}
48695      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
48696$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
48697
48698  # When we add flags to the "official" CFLAGS etc, we need to
48699  # keep track of these additions in ADDED_CFLAGS etc. These
48700  # will later be checked to make sure only controlled additions
48701  # have been made to CFLAGS etc.
48702  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48703  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48704  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48705
48706  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48707  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48708  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48709
48710  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48711  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48712  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48713
48714  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48715  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48716  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48717
48718
48719      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
48720      unset ac_cv_sizeof_int_p
48721      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
48722      cat >>confdefs.h <<_ACEOF
48723#undef SIZEOF_INT_P
48724_ACEOF
48725
48726      # The cast to long int works around a bug in the HP C Compiler
48727# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48728# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48729# This bug is HP SR number 8606223364.
48730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48731$as_echo_n "checking size of int *... " >&6; }
48732if ${ac_cv_sizeof_int_p+:} false; then :
48733  $as_echo_n "(cached) " >&6
48734else
48735  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48736
48737else
48738  if test "$ac_cv_type_int_p" = yes; then
48739     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48740$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48741as_fn_error 77 "cannot compute sizeof (int *)
48742See \`config.log' for more details" "$LINENO" 5; }
48743   else
48744     ac_cv_sizeof_int_p=0
48745   fi
48746fi
48747
48748fi
48749{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48750$as_echo "$ac_cv_sizeof_int_p" >&6; }
48751
48752
48753
48754cat >>confdefs.h <<_ACEOF
48755#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48756_ACEOF
48757
48758
48759
48760      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48761
48762      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48763        { $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
48764$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;}
48765        if test "x$COMPILE_TYPE" = xreduced; then
48766
48767  # Print a helpful message on how to acquire the necessary build dependency.
48768  # reduced is the help tag: freetype, cups, alsa etc
48769  MISSING_DEPENDENCY=reduced
48770
48771  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48772    cygwin_help $MISSING_DEPENDENCY
48773  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48774    msys_help $MISSING_DEPENDENCY
48775  else
48776    PKGHANDLER_COMMAND=
48777
48778    case $PKGHANDLER in
48779      apt-get)
48780        apt_help     $MISSING_DEPENDENCY ;;
48781      yum)
48782        yum_help     $MISSING_DEPENDENCY ;;
48783      port)
48784        port_help    $MISSING_DEPENDENCY ;;
48785      pkgutil)
48786        pkgutil_help $MISSING_DEPENDENCY ;;
48787      pkgadd)
48788        pkgadd_help  $MISSING_DEPENDENCY ;;
48789    esac
48790
48791    if test "x$PKGHANDLER_COMMAND" != x; then
48792      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48793    fi
48794  fi
48795
48796          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48797$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48798        elif test "x$COMPILE_TYPE" = xcross; then
48799          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48800$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48801        fi
48802        as_fn_error $? "Cannot continue." "$LINENO" 5
48803      fi
48804    fi
48805  fi
48806
48807  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
48808$as_echo_n "checking for target address size... " >&6; }
48809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
48810$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
48811
48812
48813  ###############################################################################
48814  #
48815  # Is the target little of big endian?
48816  #
48817   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
48818$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
48819if ${ac_cv_c_bigendian+:} false; then :
48820  $as_echo_n "(cached) " >&6
48821else
48822  ac_cv_c_bigendian=unknown
48823    # See if we're dealing with a universal compiler.
48824    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48825/* end confdefs.h.  */
48826#ifndef __APPLE_CC__
48827	       not a universal capable compiler
48828	     #endif
48829	     typedef int dummy;
48830
48831_ACEOF
48832if ac_fn_cxx_try_compile "$LINENO"; then :
48833
48834	# Check for potential -arch flags.  It is not universal unless
48835	# there are at least two -arch flags with different values.
48836	ac_arch=
48837	ac_prev=
48838	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
48839	 if test -n "$ac_prev"; then
48840	   case $ac_word in
48841	     i?86 | x86_64 | ppc | ppc64)
48842	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
48843		 ac_arch=$ac_word
48844	       else
48845		 ac_cv_c_bigendian=universal
48846		 break
48847	       fi
48848	       ;;
48849	   esac
48850	   ac_prev=
48851	 elif test "x$ac_word" = "x-arch"; then
48852	   ac_prev=arch
48853	 fi
48854       done
48855fi
48856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48857    if test $ac_cv_c_bigendian = unknown; then
48858      # See if sys/param.h defines the BYTE_ORDER macro.
48859      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48860/* end confdefs.h.  */
48861#include <sys/types.h>
48862	     #include <sys/param.h>
48863
48864int
48865main ()
48866{
48867#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
48868		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
48869		     && LITTLE_ENDIAN)
48870	      bogus endian macros
48871	     #endif
48872
48873  ;
48874  return 0;
48875}
48876_ACEOF
48877if ac_fn_cxx_try_compile "$LINENO"; then :
48878  # It does; now see whether it defined to BIG_ENDIAN or not.
48879	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48880/* end confdefs.h.  */
48881#include <sys/types.h>
48882		#include <sys/param.h>
48883
48884int
48885main ()
48886{
48887#if BYTE_ORDER != BIG_ENDIAN
48888		 not big endian
48889		#endif
48890
48891  ;
48892  return 0;
48893}
48894_ACEOF
48895if ac_fn_cxx_try_compile "$LINENO"; then :
48896  ac_cv_c_bigendian=yes
48897else
48898  ac_cv_c_bigendian=no
48899fi
48900rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48901fi
48902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48903    fi
48904    if test $ac_cv_c_bigendian = unknown; then
48905      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
48906      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48907/* end confdefs.h.  */
48908#include <limits.h>
48909
48910int
48911main ()
48912{
48913#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
48914	      bogus endian macros
48915	     #endif
48916
48917  ;
48918  return 0;
48919}
48920_ACEOF
48921if ac_fn_cxx_try_compile "$LINENO"; then :
48922  # It does; now see whether it defined to _BIG_ENDIAN or not.
48923	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48924/* end confdefs.h.  */
48925#include <limits.h>
48926
48927int
48928main ()
48929{
48930#ifndef _BIG_ENDIAN
48931		 not big endian
48932		#endif
48933
48934  ;
48935  return 0;
48936}
48937_ACEOF
48938if ac_fn_cxx_try_compile "$LINENO"; then :
48939  ac_cv_c_bigendian=yes
48940else
48941  ac_cv_c_bigendian=no
48942fi
48943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48944fi
48945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48946    fi
48947    if test $ac_cv_c_bigendian = unknown; then
48948      # Compile a test program.
48949      if test "$cross_compiling" = yes; then :
48950  # Try to guess by grepping values from an object file.
48951	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48952/* end confdefs.h.  */
48953short int ascii_mm[] =
48954		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
48955		short int ascii_ii[] =
48956		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
48957		int use_ascii (int i) {
48958		  return ascii_mm[i] + ascii_ii[i];
48959		}
48960		short int ebcdic_ii[] =
48961		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
48962		short int ebcdic_mm[] =
48963		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
48964		int use_ebcdic (int i) {
48965		  return ebcdic_mm[i] + ebcdic_ii[i];
48966		}
48967		extern int foo;
48968
48969int
48970main ()
48971{
48972return use_ascii (foo) == use_ebcdic (foo);
48973  ;
48974  return 0;
48975}
48976_ACEOF
48977if ac_fn_cxx_try_compile "$LINENO"; then :
48978  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
48979	      ac_cv_c_bigendian=yes
48980	    fi
48981	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
48982	      if test "$ac_cv_c_bigendian" = unknown; then
48983		ac_cv_c_bigendian=no
48984	      else
48985		# finding both strings is unlikely to happen, but who knows?
48986		ac_cv_c_bigendian=unknown
48987	      fi
48988	    fi
48989fi
48990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48991else
48992  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48993/* end confdefs.h.  */
48994$ac_includes_default
48995int
48996main ()
48997{
48998
48999	     /* Are we little or big endian?  From Harbison&Steele.  */
49000	     union
49001	     {
49002	       long int l;
49003	       char c[sizeof (long int)];
49004	     } u;
49005	     u.l = 1;
49006	     return u.c[sizeof (long int) - 1] == 1;
49007
49008  ;
49009  return 0;
49010}
49011_ACEOF
49012if ac_fn_cxx_try_run "$LINENO"; then :
49013  ac_cv_c_bigendian=no
49014else
49015  ac_cv_c_bigendian=yes
49016fi
49017rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49018  conftest.$ac_objext conftest.beam conftest.$ac_ext
49019fi
49020
49021    fi
49022fi
49023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
49024$as_echo "$ac_cv_c_bigendian" >&6; }
49025 case $ac_cv_c_bigendian in #(
49026   yes)
49027     ENDIAN="big";; #(
49028   no)
49029     ENDIAN="little" ;; #(
49030   universal)
49031     ENDIAN="universal_endianness"
49032     ;; #(
49033   *)
49034     ENDIAN="unknown" ;;
49035 esac
49036
49037
49038  if test "x$ENDIAN" = xuniversal_endianness; then
49039    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
49040  fi
49041  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
49042    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
49043  fi
49044
49045
49046# Configure flags for the tools
49047
49048  ###############################################################################
49049  #
49050  # How to compile shared libraries.
49051  #
49052
49053  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49054    PICFLAG="-fPIC"
49055    C_FLAG_REORDER=''
49056    CXX_FLAG_REORDER=''
49057
49058    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49059      # Linking is different on MacOSX
49060      if test "x$STATIC_BUILD" = xtrue; then
49061        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
49062      else
49063        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49064        JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49065      fi
49066      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49067      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49068      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49069      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49070    else
49071      # Default works for linux, might work on other platforms as well.
49072      SHARED_LIBRARY_FLAGS='-shared'
49073      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
49074      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49075      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49076      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49077    fi
49078  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49079    C_FLAG_REORDER=''
49080    CXX_FLAG_REORDER=''
49081
49082    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49083      # Linking is different on MacOSX
49084      PICFLAG=''
49085      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49086      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49087      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49088      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49089      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49090
49091      if test "x$STATIC_BUILD" = xfalse; then
49092        JVM_CFLAGS="$JVM_CFLAGS -fPIC"
49093      fi
49094    else
49095      # Default works for linux, might work on other platforms as well.
49096      PICFLAG='-fPIC'
49097      SHARED_LIBRARY_FLAGS='-shared'
49098      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
49099      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49100      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49101      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49102    fi
49103  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49104    PICFLAG="-KPIC"
49105    C_FLAG_REORDER='-xF'
49106    CXX_FLAG_REORDER='-xF'
49107    SHARED_LIBRARY_FLAGS="-G"
49108    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
49109    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49110    SET_SHARED_LIBRARY_NAME='-h $1'
49111    SET_SHARED_LIBRARY_MAPFILE='-M$1'
49112  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49113    # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
49114    # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
49115    # will have to patch this single instruction with a call to some out-of-order code which
49116    # does the load from the TOC. This is of course slow. But in that case we also would have
49117    # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
49118    # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
49119    # can be patched directly by the linker and does not require a jump to out-of-order code.
49120    # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
49121    # instead. This creates a distinct TOC for every compilation unit (and thus requires two
49122    # loads for accessing a global variable). But there are rumors that this may be seen as a
49123    # 'performance feature' because of improved code locality of the symbols used in a
49124    # compilation unit.
49125    PICFLAG="-qpic"
49126    JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49127    C_FLAG_REORDER=''
49128    CXX_FLAG_REORDER=''
49129    SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
49130    SET_EXECUTABLE_ORIGIN=""
49131    SET_SHARED_LIBRARY_ORIGIN=''
49132    SET_SHARED_LIBRARY_NAME=''
49133    SET_SHARED_LIBRARY_MAPFILE=''
49134  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49135    PICFLAG=""
49136    C_FLAG_REORDER=''
49137    CXX_FLAG_REORDER=''
49138    SHARED_LIBRARY_FLAGS="-dll"
49139    SET_EXECUTABLE_ORIGIN=''
49140    SET_SHARED_LIBRARY_ORIGIN=''
49141    SET_SHARED_LIBRARY_NAME=''
49142    SET_SHARED_LIBRARY_MAPFILE='-def:$1'
49143  fi
49144
49145
49146
49147
49148
49149
49150
49151
49152
49153  # The (cross) compiler is now configured, we can now test capabilities
49154  # of the target platform.
49155
49156
49157
49158  ###############################################################################
49159  #
49160  # Setup the opt flags for different compilers
49161  # and different operating systems.
49162  #
49163
49164  # FIXME: this was indirectly the old default, but just inherited.
49165  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49166  #   C_FLAG_DEPS="-MMD -MF"
49167  # fi
49168
49169  # Generate make dependency files
49170  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49171    C_FLAG_DEPS="-MMD -MF"
49172  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49173    C_FLAG_DEPS="-MMD -MF"
49174  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49175    C_FLAG_DEPS="-xMMD -xMF"
49176  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49177    C_FLAG_DEPS="-qmakedep=gcc -MF"
49178  fi
49179  CXX_FLAG_DEPS="$C_FLAG_DEPS"
49180
49181
49182
49183  # Debug symbols
49184  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49185    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
49186      # reduce from default "-g2" option to save space
49187      CFLAGS_DEBUG_SYMBOLS="-g1"
49188      CXXFLAGS_DEBUG_SYMBOLS="-g1"
49189    else
49190      CFLAGS_DEBUG_SYMBOLS="-g"
49191      CXXFLAGS_DEBUG_SYMBOLS="-g"
49192    fi
49193  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49194    CFLAGS_DEBUG_SYMBOLS="-g"
49195    CXXFLAGS_DEBUG_SYMBOLS="-g"
49196  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49197    CFLAGS_DEBUG_SYMBOLS="-g -xs"
49198    # -g0 enables debug symbols without disabling inlining.
49199    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
49200  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49201    CFLAGS_DEBUG_SYMBOLS="-g"
49202    CXXFLAGS_DEBUG_SYMBOLS="-g"
49203  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49204    CFLAGS_DEBUG_SYMBOLS="-Zi"
49205    CXXFLAGS_DEBUG_SYMBOLS="-Zi"
49206  fi
49207
49208
49209
49210  # Debug symbols for JVM_CFLAGS
49211  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49212    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
49213    if test "x$DEBUG_LEVEL" = xslowdebug; then
49214      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49215    else
49216      # -g0 does not disable inlining, which -g does.
49217      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
49218    fi
49219  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49220    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
49221  else
49222    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49223  fi
49224
49225
49226  # bounds, memory and behavior checking options
49227  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49228    case $DEBUG_LEVEL in
49229    release )
49230      # no adjustment
49231      ;;
49232    fastdebug )
49233      # no adjustment
49234      ;;
49235    slowdebug )
49236      # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
49237      # get's added conditionally on whether we produce debug symbols or not.
49238      # This is most likely not really correct.
49239
49240      # Add runtime stack smashing and undefined behavior checks.
49241      # Not all versions of gcc support -fstack-protector
49242      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
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
49284
49285    # Execute function body
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
49333
49334    # Execute function body
49335
49336  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49337$as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49338  supports=yes
49339
49340  saved_cflags="$CFLAGS"
49341  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
49342  ac_ext=c
49343ac_cpp='$CPP $CPPFLAGS'
49344ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49345ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49346ac_compiler_gnu=$ac_cv_c_compiler_gnu
49347
49348  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49349/* end confdefs.h.  */
49350int i;
49351_ACEOF
49352if ac_fn_c_try_compile "$LINENO"; then :
49353
49354else
49355  supports=no
49356fi
49357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49358  ac_ext=cpp
49359ac_cpp='$CXXCPP $CPPFLAGS'
49360ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49361ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49362ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49363
49364  CFLAGS="$saved_cflags"
49365
49366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49367$as_echo "$supports" >&6; }
49368  if test "x$supports" = "xyes" ; then
49369    :
49370    C_COMP_SUPPORTS="yes"
49371  else
49372    :
49373    C_COMP_SUPPORTS="no"
49374  fi
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
49433
49434    # Execute function body
49435
49436  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49437$as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49438  supports=yes
49439
49440  saved_cxxflags="$CXXFLAGS"
49441  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
49442  ac_ext=cpp
49443ac_cpp='$CXXCPP $CPPFLAGS'
49444ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49445ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49446ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49447
49448  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49449/* end confdefs.h.  */
49450int i;
49451_ACEOF
49452if ac_fn_cxx_try_compile "$LINENO"; then :
49453
49454else
49455  supports=no
49456fi
49457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49458  ac_ext=cpp
49459ac_cpp='$CXXCPP $CPPFLAGS'
49460ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49461ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49462ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49463
49464  CXXFLAGS="$saved_cxxflags"
49465
49466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49467$as_echo "$supports" >&6; }
49468  if test "x$supports" = "xyes" ; then
49469    :
49470    CXX_COMP_SUPPORTS="yes"
49471  else
49472    :
49473    CXX_COMP_SUPPORTS="no"
49474  fi
49475
49476
49477
49478
49479
49480
49481
49482
49483
49484
49485
49486
49487
49488  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49489$as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49490  supports=no
49491  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49492
49493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49494$as_echo "$supports" >&6; }
49495  if test "x$supports" = "xyes" ; then
49496    :
49497
49498  else
49499    :
49500    STACK_PROTECTOR_CFLAG=""
49501  fi
49502
49503
49504
49505
49506
49507
49508
49509      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49510      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49511      if test "x$STACK_PROTECTOR_CFLAG" != x; then
49512        JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49513      fi
49514      ;;
49515    esac
49516  fi
49517
49518  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49519    if test "x$DEBUG_LEVEL" != xrelease; then
49520      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
49521        JVM_CFLAGS="$JVM_CFLAGS -homeparams"
49522      fi
49523    fi
49524  fi
49525
49526  # Optimization levels
49527  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49528    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
49529
49530    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
49531      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
49532      C_O_FLAG_HIGHEST_JVM="-xO4"
49533      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
49534      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
49535      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
49536      C_O_FLAG_DEBUG="-xregs=no%frameptr"
49537      C_O_FLAG_DEBUG_JVM=""
49538      C_O_FLAG_NONE="-xregs=no%frameptr"
49539      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49540      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
49541      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
49542      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
49543      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
49544      CXX_O_FLAG_DEBUG_JVM=""
49545      CXX_O_FLAG_NONE="-xregs=no%frameptr"
49546      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
49547        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
49548        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
49549      fi
49550    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49551      C_O_FLAG_HIGHEST_JVM="-xO4"
49552      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
49553      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49554      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49555      C_O_FLAG_DEBUG=""
49556      C_O_FLAG_DEBUG_JVM=""
49557      C_O_FLAG_NONE=""
49558      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49559      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
49560      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49561      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49562      CXX_O_FLAG_DEBUG=""
49563      CXX_O_FLAG_DEBUG_JVM=""
49564      CXX_O_FLAG_NONE=""
49565    fi
49566  else
49567    # The remaining toolchains share opt flags between CC and CXX;
49568    # setup for C and duplicate afterwards.
49569    if test "x$TOOLCHAIN_TYPE" = xgcc; then
49570      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49571        # On MacOSX we optimize for size, something
49572        # we should do for all platforms?
49573        C_O_FLAG_HIGHEST_JVM="-Os"
49574        C_O_FLAG_HIGHEST="-Os"
49575        C_O_FLAG_HI="-Os"
49576        C_O_FLAG_NORM="-Os"
49577        C_O_FLAG_SIZE="-Os"
49578      else
49579        C_O_FLAG_HIGHEST_JVM="-O3"
49580        C_O_FLAG_HIGHEST="-O3"
49581        C_O_FLAG_HI="-O3"
49582        C_O_FLAG_NORM="-O2"
49583        C_O_FLAG_SIZE="-Os"
49584      fi
49585      C_O_FLAG_DEBUG="-O0"
49586      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49587        C_O_FLAG_DEBUG_JVM=""
49588      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49589        C_O_FLAG_DEBUG_JVM="-O0"
49590      fi
49591      C_O_FLAG_NONE="-O0"
49592    elif test "x$TOOLCHAIN_TYPE" = xclang; then
49593      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49594        # On MacOSX we optimize for size, something
49595        # we should do for all platforms?
49596        C_O_FLAG_HIGHEST_JVM="-Os"
49597        C_O_FLAG_HIGHEST="-Os"
49598        C_O_FLAG_HI="-Os"
49599        C_O_FLAG_NORM="-Os"
49600        C_O_FLAG_SIZE="-Os"
49601      else
49602        C_O_FLAG_HIGHEST_JVM="-O3"
49603        C_O_FLAG_HIGHEST="-O3"
49604        C_O_FLAG_HI="-O3"
49605        C_O_FLAG_NORM="-O2"
49606        C_O_FLAG_SIZE="-Os"
49607      fi
49608      C_O_FLAG_DEBUG="-O0"
49609      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49610        C_O_FLAG_DEBUG_JVM=""
49611      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49612        C_O_FLAG_DEBUG_JVM="-O0"
49613      fi
49614      C_O_FLAG_NONE="-O0"
49615    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49616      C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
49617      C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
49618      C_O_FLAG_HI="-O3 -qinline -qinlglue"
49619      C_O_FLAG_NORM="-O2"
49620      C_O_FLAG_DEBUG="-qnoopt"
49621      # FIXME: Value below not verified.
49622      C_O_FLAG_DEBUG_JVM=""
49623      C_O_FLAG_NONE="-qnoopt"
49624    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49625      C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
49626      C_O_FLAG_HIGHEST="-O2"
49627      C_O_FLAG_HI="-O1"
49628      C_O_FLAG_NORM="-O1"
49629      C_O_FLAG_DEBUG="-Od"
49630      C_O_FLAG_DEBUG_JVM=""
49631      C_O_FLAG_NONE="-Od"
49632      C_O_FLAG_SIZE="-Os"
49633    fi
49634    CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
49635    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
49636    CXX_O_FLAG_HI="$C_O_FLAG_HI"
49637    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
49638    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
49639    CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
49640    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
49641    CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
49642  fi
49643
49644  # Adjust optimization flags according to debug level.
49645  case $DEBUG_LEVEL in
49646    release )
49647      # no adjustment
49648      ;;
49649    fastdebug )
49650      # Not quite so much optimization
49651      C_O_FLAG_HI="$C_O_FLAG_NORM"
49652      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
49653      ;;
49654    slowdebug )
49655      # Disable optimization
49656      C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
49657      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
49658      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
49659      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
49660      C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
49661      CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
49662      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
49663      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
49664      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
49665      CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
49666      ;;
49667  esac
49668
49669
49670
49671
49672
49673
49674
49675
49676
49677
49678
49679
49680
49681
49682
49683
49684
49685
49686
49687  # Special extras...
49688  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49689    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49690      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49691      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49692    fi
49693    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49694    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49695  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49696    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49697    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49698  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
49699    CXXSTD_CXXFLAG="-std=gnu++98"
49700
49701
49702
49703
49704
49705
49706
49707
49708
49709
49710
49711
49712
49713
49714
49715
49716
49717
49718
49719
49720
49721
49722
49723
49724
49725
49726
49727
49728
49729
49730
49731
49732
49733
49734
49735
49736
49737
49738
49739
49740
49741
49742    # Execute function body
49743
49744  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
49745$as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
49746  supports=yes
49747
49748  saved_cxxflags="$CXXFLAGS"
49749  CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
49750  ac_ext=cpp
49751ac_cpp='$CXXCPP $CPPFLAGS'
49752ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49753ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49754ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49755
49756  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49757/* end confdefs.h.  */
49758int i;
49759_ACEOF
49760if ac_fn_cxx_try_compile "$LINENO"; then :
49761
49762else
49763  supports=no
49764fi
49765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49766  ac_ext=cpp
49767ac_cpp='$CXXCPP $CPPFLAGS'
49768ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49769ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49770ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49771
49772  CXXFLAGS="$saved_cxxflags"
49773
49774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49775$as_echo "$supports" >&6; }
49776  if test "x$supports" = "xyes" ; then
49777    :
49778
49779  else
49780    :
49781    CXXSTD_CXXFLAG=""
49782  fi
49783
49784
49785
49786
49787
49788
49789
49790
49791
49792
49793
49794
49795    CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
49796    JVM_CFLAGS="${JVM_CFLAGS} ${CXXSTD_CXXFLAG}"
49797
49798  fi
49799  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49800    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49801    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49802  fi
49803
49804  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49805    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49806    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49807  fi
49808
49809  CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
49810  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
49811  LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
49812
49813  ###############################################################################
49814  #
49815  # Now setup the CFLAGS and LDFLAGS for the JDK build.
49816  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
49817  #
49818
49819  # Setup compiler/platform specific flags into
49820  #    CFLAGS_JDK    - C Compiler flags
49821  #    CXXFLAGS_JDK  - C++ Compiler flags
49822  #    COMMON_CCXXFLAGS_JDK - common to C and C++
49823  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49824    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49825    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
49826    JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
49827    if test "x$OPENJDK_TARGET_CPU" = xx86; then
49828      # Force compatibility with i586 on 32 bit intel platforms.
49829      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49830      JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49831    fi
49832    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49833        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49834    case $OPENJDK_TARGET_CPU_ARCH in
49835      arm )
49836        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49837        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49838        ;;
49839      ppc )
49840        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49841        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49842        ;;
49843      * )
49844        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49845        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49846        ;;
49847    esac
49848
49849
49850
49851
49852
49853
49854
49855
49856
49857
49858
49859
49860
49861
49862
49863
49864
49865
49866
49867
49868
49869
49870
49871
49872
49873
49874
49875
49876
49877
49878
49879
49880
49881
49882
49883
49884
49885
49886
49887
49888
49889
49890
49891
49892
49893
49894
49895
49896
49897
49898
49899
49900
49901
49902    # Execute function body
49903
49904  # Need to assign to a variable since m4 is blocked from modifying parts in [].
49905  REFERENCE_VERSION=6
49906
49907  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
49908    as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
49909  fi
49910
49911  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
49912    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
49913  fi
49914
49915  # Version comparison method inspired by http://stackoverflow.com/a/24067243
49916  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
49917
49918  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
49919    :
49920
49921  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
49922  # runs afoul of the more aggressive versions of these optimisations.
49923  # Notably, value range propagation now assumes that the this pointer of C++
49924  # member functions is non-null.
49925  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
49926        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
49927        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
49928$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
49929  CFLAGS_JDK="$CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
49930  JVM_CFLAGS="$JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
49931
49932  else
49933    :
49934
49935  fi
49936
49937
49938
49939
49940
49941
49942
49943
49944
49945
49946
49947
49948
49949
49950  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49951    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49952
49953    # Restrict the debug information created by Clang to avoid
49954    # too big object files and speed the build up a little bit
49955    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
49956    JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
49957    if test "x$OPENJDK_TARGET_OS" = xlinux; then
49958      if test "x$OPENJDK_TARGET_CPU" = xx86; then
49959        # Force compatibility with i586 on 32 bit intel platforms.
49960        COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49961        JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49962      fi
49963      JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
49964      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49965          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49966      case $OPENJDK_TARGET_CPU_ARCH in
49967        ppc )
49968          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49969          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49970          ;;
49971        * )
49972          COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49973          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49974          ;;
49975      esac
49976    fi
49977  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49978    JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
49979    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
49980    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
49981      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
49982    fi
49983
49984    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
49985    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
49986  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49987    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
49988    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
49989    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
49990  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49991    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
49992        -MD -Zc:wchar_t- -W3 -wd4800 \
49993        -DWIN32_LEAN_AND_MEAN \
49994        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
49995        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
49996        -DWIN32 -DIAL"
49997    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
49998      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
49999    else
50000      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50001    fi
50002    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50003    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50004    # studio.
50005    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50006      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50007      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50008      JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50009    fi
50010  fi
50011
50012  ###############################################################################
50013
50014  # Adjust flags according to debug level.
50015  case $DEBUG_LEVEL in
50016    fastdebug | slowdebug )
50017      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50018      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50019      JAVAC_FLAGS="$JAVAC_FLAGS -g"
50020      ;;
50021    release )
50022      ;;
50023    * )
50024      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50025      ;;
50026  esac
50027
50028  # Set some common defines. These works for all compilers, but assume
50029  # -D is universally accepted.
50030
50031  # Setup endianness
50032  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50033    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50034    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50035    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50036    #   Note: -Dmacro         is the same as    #define macro 1
50037    #         -Dmacro=        is the same as    #define macro
50038    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50039      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50040    else
50041      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50042    fi
50043  else
50044    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50045    # are defined in the system?
50046    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50047      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50048    else
50049      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50050    fi
50051  fi
50052
50053  # Setup target OS define. Use OS target name but in upper case.
50054  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50055  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
50056
50057  # Setup target CPU
50058  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50059      $OPENJDK_TARGET_ADD_LP64 \
50060      -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
50061
50062  # Setup debug/release defines
50063  if test "x$DEBUG_LEVEL" = xrelease; then
50064    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
50065    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50066      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
50067    fi
50068  else
50069    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
50070  fi
50071
50072  # Set some additional per-OS defines.
50073  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50074    JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
50075    JVM_CFLAGS="$JVM_CFLAGS -pipe -fPIC -fno-rtti -fno-exceptions \
50076        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50077  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50078    JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
50079    JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
50080        -D_Crun_inline_placement -library=%none -KPIC -mt -features=no%except"
50081  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50082    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50083    JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
50084    JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50085    JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50086        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50087        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50088        -fno-omit-frame-pointer"
50089  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50090    JVM_CFLAGS="$JVM_CFLAGS -DAIX"
50091    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50092    JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced \
50093        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50094        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50095  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50096    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50097  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50098    JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50099    JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
50100  fi
50101
50102  # Set some additional per-CPU defines.
50103  if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
50104    JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
50105  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50106    JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
50107  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
50108    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50109      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50110      # fixes `relocation truncated to fit' error for gcc 4.1.
50111      JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
50112      # Use ppc64 instructions, but schedule for power5
50113      JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50114    elif test "x$OPENJDK_TARGET_OS" = xaix; then
50115      JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
50116    fi
50117  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
50118    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50119      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50120      # Little endian machine uses ELFv2 ABI.
50121      JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
50122      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50123      JVM_CFLAGS="$JVM_CFLAGS -mcpu=power7 -mtune=power8"
50124    fi
50125  fi
50126
50127  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50128    JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50129  fi
50130
50131  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50132    if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
50133      # Solaris does not have _LP64=1 in the old build.
50134      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50135      JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
50136    fi
50137  fi
50138
50139  # Set JVM_CFLAGS warning handling
50140  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50141    JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50142        -Wunused-value -Woverloaded-virtual"
50143
50144    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50145
50146
50147
50148
50149
50150
50151
50152
50153
50154
50155
50156
50157
50158
50159
50160
50161
50162
50163
50164
50165
50166
50167
50168
50169
50170
50171
50172
50173
50174
50175
50176
50177
50178
50179
50180
50181
50182
50183
50184
50185
50186
50187
50188
50189
50190
50191
50192
50193
50194
50195
50196
50197
50198
50199    # Execute function body
50200
50201  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50202  REFERENCE_VERSION=4.8
50203
50204  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
50205    as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
50206  fi
50207
50208  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50209    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
50210  fi
50211
50212  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50213  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
50214
50215  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50216    :
50217
50218            # These flags either do not work or give spurious warnings prior to gcc 4.8.
50219            JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
50220
50221
50222  else
50223    :
50224
50225  fi
50226
50227
50228
50229
50230
50231
50232
50233
50234
50235
50236
50237
50238
50239
50240    fi
50241    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
50242      # Non-zero builds have stricter warnings
50243      JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
50244    else
50245      if test "x$TOOLCHAIN_TYPE" = xclang; then
50246        # Some versions of llvm do not like -Wundef
50247        JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
50248      fi
50249    fi
50250  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50251    JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
50252        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
50253  fi
50254
50255  # Additional macosx handling
50256  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50257    # Setting these parameters makes it an error to link to macosx APIs that are
50258    # newer than the given OS version and makes the linked binaries compatible
50259    # even if built on a newer version of the OS.
50260    # The expected format is X.Y.Z
50261    MACOSX_VERSION_MIN=10.7.0
50262
50263
50264    # The macro takes the version with no dots, ex: 1070
50265    # Let the flags variables get resolved in make for easier override on make
50266    # command line.
50267    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50268    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50269  fi
50270
50271  # Setup some hard coded includes
50272  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50273      -I${JDK_TOPDIR}/src/java.base/share/native/include \
50274      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
50275      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
50276      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
50277      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
50278
50279  # The shared libraries are compiled using the picflag.
50280  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50281      $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
50282  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50283      $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
50284
50285  # Executable flags
50286  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
50287  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
50288
50289
50290
50291
50292
50293
50294  # Setup LDFLAGS et al.
50295  #
50296
50297  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50298    LDFLAGS_MICROSOFT="-nologo -opt:ref"
50299    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
50300    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
50301    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50302      LDFLAGS_SAFESH="-safeseh"
50303      LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
50304      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
50305      # NOTE: Old build added -machine. Probably not needed.
50306      JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
50307    else
50308      JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
50309    fi
50310  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50311      JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
50312      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50313        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
50314        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50315    fi
50316  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50317    # If this is a --hash-style=gnu system, use --hash-style=both, why?
50318    # We have previously set HAS_GNU_HASH if this is the case
50319    if test -n "$HAS_GNU_HASH"; then
50320      LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
50321      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
50322      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
50323    fi
50324      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50325        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50326    fi
50327    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50328      # And since we now know that the linker is gnu, then add -z defs, to forbid
50329      # undefined symbols in object files.
50330      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
50331      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
50332      JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
50333      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
50334      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
50335      if test "x$OPENJDK_TARGET_CPU" = xx86; then
50336        JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
50337      fi
50338      case $DEBUG_LEVEL in
50339        release )
50340          # tell linker to optimize libraries.
50341          # Should this be supplied to the OSS linker as well?
50342          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
50343          LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
50344          JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
50345          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50346            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50347          fi
50348          ;;
50349        slowdebug )
50350          # Hotspot always let the linker optimize
50351          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50352          if test "x$HAS_LINKER_NOW" = "xtrue"; then
50353            # do relocations at load
50354            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
50355            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
50356            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
50357          fi
50358          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50359            # mark relocations read only
50360            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50361            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50362            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50363          fi
50364          ;;
50365        fastdebug )
50366          # Hotspot always let the linker optimize
50367          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50368          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50369            # mark relocations read only
50370            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50371            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50372            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50373          fi
50374          ;;
50375        * )
50376          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50377          ;;
50378        esac
50379    fi
50380  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50381    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
50382    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
50383    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
50384    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
50385    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
50386    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50387      JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
50388    fi
50389  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50390    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
50391    LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
50392    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
50393  fi
50394
50395  # Customize LDFLAGS for executables
50396
50397  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
50398
50399  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50400    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
50401      LDFLAGS_STACK_SIZE=1048576
50402    else
50403      LDFLAGS_STACK_SIZE=327680
50404    fi
50405    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
50406  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50407    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
50408  fi
50409
50410  LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
50411
50412  # Customize LDFLAGS for libs
50413  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
50414
50415  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
50416  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50417    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50418        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
50419    JDKLIB_LIBS=""
50420  else
50421    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50422        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)"
50423
50424    if test "xTARGET" = "xTARGET"; then
50425    # On some platforms (mac) the linker warns about non existing -L dirs.
50426    # Add server first if available. Linking aginst client does not always produce the same results.
50427      # Only add client/minimal dir if client/minimal is being built.
50428    # Default to server for other variants.
50429      if   [[ " $JVM_VARIANTS " =~ " server " ]]  ; then
50430        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50431      elif   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
50432        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/client"
50433      elif   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
50434        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/minimal"
50435    else
50436        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50437    fi
50438    elif test "xTARGET" = "xBUILD"; then
50439      # When building a buildjdk, it's always only the server variant
50440      JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50441          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50442    fi
50443
50444    JDKLIB_LIBS="-ljava -ljvm"
50445    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50446      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
50447    fi
50448
50449  fi
50450
50451LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${JAVA_BASE_LDFLAGS}"
50452
50453  # Set JVM_LIBS (per os)
50454  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50455    JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
50456  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50457    # FIXME: This hard-coded path is not really proper.
50458    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50459      SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
50460    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50461      SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
50462    fi
50463    JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
50464        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
50465  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50466    JVM_LIBS="$JVM_LIBS -lm"
50467  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50468    JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
50469  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50470    JVM_LIBS="$JVM_LIBS -lm"
50471  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50472    JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
50473        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
50474        wsock32.lib winmm.lib version.lib psapi.lib"
50475    fi
50476
50477  # Set JVM_ASFLAGS
50478  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50479    if test "x$OPENJDK_TARGET_CPU" = xx86; then
50480      JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
50481    fi
50482  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50483    JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
50484  fi
50485
50486  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
50487
50488
50489
50490
50491
50492
50493
50494
50495
50496
50497
50498
50499
50500
50501
50502  # Special extras...
50503  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50504    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
50505      OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50506      OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50507    fi
50508    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50509    OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50510  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50511    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50512    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50513  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50514    OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
50515
50516
50517
50518
50519
50520
50521
50522
50523
50524
50525
50526
50527
50528
50529
50530
50531
50532
50533
50534
50535
50536
50537
50538
50539
50540
50541
50542
50543
50544
50545
50546
50547
50548
50549
50550
50551
50552
50553
50554
50555
50556
50557    # Execute function body
50558
50559  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
50560$as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
50561  supports=yes
50562
50563  saved_cxxflags="$CXXFLAGS"
50564  CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
50565  ac_ext=cpp
50566ac_cpp='$CXXCPP $CPPFLAGS'
50567ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50568ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50569ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50570
50571  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50572/* end confdefs.h.  */
50573int i;
50574_ACEOF
50575if ac_fn_cxx_try_compile "$LINENO"; then :
50576
50577else
50578  supports=no
50579fi
50580rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50581  ac_ext=cpp
50582ac_cpp='$CXXCPP $CPPFLAGS'
50583ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50584ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50585ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50586
50587  CXXFLAGS="$saved_cxxflags"
50588
50589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50590$as_echo "$supports" >&6; }
50591  if test "x$supports" = "xyes" ; then
50592    :
50593
50594  else
50595    :
50596    OPENJDK_BUILD_CXXSTD_CXXFLAG=""
50597  fi
50598
50599
50600
50601
50602
50603
50604
50605
50606
50607
50608
50609
50610    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50611    OPENJDK_BUILD_JVM_CFLAGS="${OPENJDK_BUILD_JVM_CFLAGS} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50612
50613  fi
50614  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50615    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50616    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50617  fi
50618
50619  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50620    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50621    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50622  fi
50623
50624  OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
50625  OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
50626  OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
50627
50628  ###############################################################################
50629  #
50630  # Now setup the CFLAGS and LDFLAGS for the JDK build.
50631  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
50632  #
50633
50634  # Setup compiler/platform specific flags into
50635  #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
50636  #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
50637  #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
50638  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50639    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50640    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
50641    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
50642    if test "x$OPENJDK_BUILD_CPU" = xx86; then
50643      # Force compatibility with i586 on 32 bit intel platforms.
50644      OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50645      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50646    fi
50647    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50648        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50649    case $OPENJDK_BUILD_CPU_ARCH in
50650      arm )
50651        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50652        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50653        ;;
50654      ppc )
50655        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50656        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50657        ;;
50658      * )
50659        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50660        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50661        ;;
50662    esac
50663
50664
50665
50666
50667
50668
50669
50670
50671
50672
50673
50674
50675
50676
50677
50678
50679
50680
50681
50682
50683
50684
50685
50686
50687
50688
50689
50690
50691
50692
50693
50694
50695
50696
50697
50698
50699
50700
50701
50702
50703
50704
50705
50706
50707
50708
50709
50710
50711
50712
50713
50714
50715
50716
50717    # Execute function body
50718
50719  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50720  REFERENCE_VERSION=6
50721
50722  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
50723    as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
50724  fi
50725
50726  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50727    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50728  fi
50729
50730  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50731  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
50732
50733  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50734    :
50735
50736  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
50737  # runs afoul of the more aggressive versions of these optimisations.
50738  # Notably, value range propagation now assumes that the this pointer of C++
50739  # member functions is non-null.
50740  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
50741        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
50742        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
50743$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
50744  OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50745  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50746
50747  else
50748    :
50749
50750  fi
50751
50752
50753
50754
50755
50756
50757
50758
50759
50760
50761
50762
50763
50764
50765  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50766    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50767
50768    # Restrict the debug information created by Clang to avoid
50769    # too big object files and speed the build up a little bit
50770    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50771    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
50772    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50773      if test "x$OPENJDK_BUILD_CPU" = xx86; then
50774        # Force compatibility with i586 on 32 bit intel platforms.
50775        OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50776        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50777      fi
50778      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
50779      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50780          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50781      case $OPENJDK_BUILD_CPU_ARCH in
50782        ppc )
50783          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50784          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50785          ;;
50786        * )
50787          OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50788          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50789          ;;
50790      esac
50791    fi
50792  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50793    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
50794    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50795    if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
50796      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
50797    fi
50798
50799    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50800    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50801  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50802    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50803    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50804    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50805  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50806    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50807        -MD -Zc:wchar_t- -W3 -wd4800 \
50808        -DWIN32_LEAN_AND_MEAN \
50809        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50810        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50811        -DWIN32 -DIAL"
50812    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
50813      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50814    else
50815      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50816    fi
50817    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50818    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50819    # studio.
50820    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50821      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50822      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50823      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50824    fi
50825  fi
50826
50827  ###############################################################################
50828
50829  # Adjust flags according to debug level.
50830  case $DEBUG_LEVEL in
50831    fastdebug | slowdebug )
50832      OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50833      OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50834      JAVAC_FLAGS="$JAVAC_FLAGS -g"
50835      ;;
50836    release )
50837      ;;
50838    * )
50839      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50840      ;;
50841  esac
50842
50843  # Set some common defines. These works for all compilers, but assume
50844  # -D is universally accepted.
50845
50846  # Setup endianness
50847  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50848    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50849    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50850    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50851    #   Note: -Dmacro         is the same as    #define macro 1
50852    #         -Dmacro=        is the same as    #define macro
50853    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50854      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50855    else
50856      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50857    fi
50858  else
50859    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50860    # are defined in the system?
50861    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50862      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50863    else
50864      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50865    fi
50866  fi
50867
50868  # Setup target OS define. Use OS target name but in upper case.
50869  OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50870  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
50871
50872  # Setup target CPU
50873  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50874      $OPENJDK_BUILD_ADD_LP64 \
50875      -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
50876
50877  # Setup debug/release defines
50878  if test "x$DEBUG_LEVEL" = xrelease; then
50879    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
50880    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50881      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
50882    fi
50883  else
50884    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
50885  fi
50886
50887  # Set some additional per-OS defines.
50888  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50889    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
50890    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe -fPIC -fno-rtti -fno-exceptions \
50891        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50892  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
50893    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
50894    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
50895        -D_Crun_inline_placement -library=%none -KPIC -mt -features=no%except"
50896  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
50897    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50898    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
50899    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50900    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50901        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50902        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50903        -fno-omit-frame-pointer"
50904  elif test "x$OPENJDK_BUILD_OS" = xaix; then
50905    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
50906    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50907    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced \
50908        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50909        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50910  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
50911    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50912  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
50913    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50914    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
50915  fi
50916
50917  # Set some additional per-CPU defines.
50918  if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
50919    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
50920  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
50921    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
50922  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
50923    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50924      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50925      # fixes `relocation truncated to fit' error for gcc 4.1.
50926      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
50927      # Use ppc64 instructions, but schedule for power5
50928      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50929    elif test "x$OPENJDK_BUILD_OS" = xaix; then
50930      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
50931    fi
50932  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
50933    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50934      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50935      # Little endian machine uses ELFv2 ABI.
50936      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
50937      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50938      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power7 -mtune=power8"
50939    fi
50940  fi
50941
50942  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50943    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50944  fi
50945
50946  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
50947    if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
50948      # Solaris does not have _LP64=1 in the old build.
50949      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50950      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
50951    fi
50952  fi
50953
50954  # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
50955  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50956    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50957        -Wunused-value -Woverloaded-virtual"
50958
50959    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50960
50961
50962
50963
50964
50965
50966
50967
50968
50969
50970
50971
50972
50973
50974
50975
50976
50977
50978
50979
50980
50981
50982
50983
50984
50985
50986
50987
50988
50989
50990
50991
50992
50993
50994
50995
50996
50997
50998
50999
51000
51001
51002
51003
51004
51005
51006
51007
51008
51009
51010
51011
51012
51013
51014    # Execute function body
51015
51016  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51017  REFERENCE_VERSION=4.8
51018
51019  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
51020    as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
51021  fi
51022
51023  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51024    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
51025  fi
51026
51027  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51028  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
51029
51030  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51031    :
51032
51033            # These flags either do not work or give spurious warnings prior to gcc 4.8.
51034            OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
51035
51036
51037  else
51038    :
51039
51040  fi
51041
51042
51043
51044
51045
51046
51047
51048
51049
51050
51051
51052
51053
51054
51055    fi
51056    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
51057      # Non-zero builds have stricter warnings
51058      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51059    else
51060      if test "x$TOOLCHAIN_TYPE" = xclang; then
51061        # Some versions of llvm do not like -Wundef
51062        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
51063      fi
51064    fi
51065  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51066    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51067        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51068  fi
51069
51070  # Additional macosx handling
51071  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51072    # Setting these parameters makes it an error to link to macosx APIs that are
51073    # newer than the given OS version and makes the linked binaries compatible
51074    # even if built on a newer version of the OS.
51075    # The expected format is X.Y.Z
51076    MACOSX_VERSION_MIN=10.7.0
51077
51078
51079    # The macro takes the version with no dots, ex: 1070
51080    # Let the flags variables get resolved in make for easier override on make
51081    # command line.
51082    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)"
51083    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51084  fi
51085
51086  # Setup some hard coded includes
51087  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51088      -I${JDK_TOPDIR}/src/java.base/share/native/include \
51089      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
51090      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
51091      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51092      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
51093
51094  # The shared libraries are compiled using the picflag.
51095  OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51096      $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
51097  OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51098      $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
51099
51100  # Executable flags
51101  OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
51102  OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
51103
51104
51105
51106
51107
51108
51109  # Setup LDFLAGS et al.
51110  #
51111
51112  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51113    LDFLAGS_MICROSOFT="-nologo -opt:ref"
51114    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51115    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51116    if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
51117      LDFLAGS_SAFESH="-safeseh"
51118      OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
51119      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
51120      # NOTE: Old build added -machine. Probably not needed.
51121      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
51122    else
51123      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
51124    fi
51125  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51126      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51127      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51128        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51129        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51130    fi
51131  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51132    # If this is a --hash-style=gnu system, use --hash-style=both, why?
51133    # We have previously set HAS_GNU_HASH if this is the case
51134    if test -n "$HAS_GNU_HASH"; then
51135      OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51136      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51137      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51138    fi
51139      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51140        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51141    fi
51142    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51143      # And since we now know that the linker is gnu, then add -z defs, to forbid
51144      # undefined symbols in object files.
51145      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51146      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51147      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51148      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51149      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51150      if test "x$OPENJDK_BUILD_CPU" = xx86; then
51151        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
51152      fi
51153      case $DEBUG_LEVEL in
51154        release )
51155          # tell linker to optimize libraries.
51156          # Should this be supplied to the OSS linker as well?
51157          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51158          OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51159          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51160          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51161            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51162          fi
51163          ;;
51164        slowdebug )
51165          # Hotspot always let the linker optimize
51166          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51167          if test "x$HAS_LINKER_NOW" = "xtrue"; then
51168            # do relocations at load
51169            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
51170            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51171            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
51172          fi
51173          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51174            # mark relocations read only
51175            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51176            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51177            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51178          fi
51179          ;;
51180        fastdebug )
51181          # Hotspot always let the linker optimize
51182          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51183          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51184            # mark relocations read only
51185            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51186            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51187            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51188          fi
51189          ;;
51190        * )
51191          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51192          ;;
51193        esac
51194    fi
51195  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51196    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
51197    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
51198    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
51199    OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
51200    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
51201    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
51202      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
51203    fi
51204  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51205    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
51206    OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
51207    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
51208  fi
51209
51210  # Customize LDFLAGS for executables
51211
51212  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
51213
51214  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51215    if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
51216      LDFLAGS_STACK_SIZE=1048576
51217    else
51218      LDFLAGS_STACK_SIZE=327680
51219    fi
51220    OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
51221  elif test "x$OPENJDK_BUILD_OS" = xlinux; then
51222    OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
51223  fi
51224
51225  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51226
51227  # Customize LDFLAGS for libs
51228  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
51229
51230  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
51231  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51232    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51233        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
51234    OPENJDK_BUILD_JDKLIB_LIBS=""
51235  else
51236    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51237        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)"
51238
51239    if test "xBUILD" = "xTARGET"; then
51240    # On some platforms (mac) the linker warns about non existing -L dirs.
51241    # Add server first if available. Linking aginst client does not always produce the same results.
51242      # Only add client/minimal dir if client/minimal is being built.
51243    # Default to server for other variants.
51244      if   [[ " $JVM_VARIANTS " =~ " server " ]]  ; then
51245        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51246      elif   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
51247        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/client"
51248      elif   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
51249        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/minimal"
51250    else
51251        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51252    fi
51253    elif test "xBUILD" = "xBUILD"; then
51254      # When building a buildjdk, it's always only the server variant
51255      OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51256          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51257    fi
51258
51259    OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
51260    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51261      OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
51262    fi
51263
51264  fi
51265
51266OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_JAVA_BASE_LDFLAGS}"
51267
51268  # Set OPENJDK_BUILD_JVM_LIBS (per os)
51269  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51270    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
51271  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51272    # FIXME: This hard-coded path is not really proper.
51273    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
51274      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
51275    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51276      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
51277    fi
51278    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
51279        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
51280  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51281    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51282  elif test "x$OPENJDK_BUILD_OS" = xaix; then
51283    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
51284  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51285    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51286  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51287    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
51288        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
51289        wsock32.lib winmm.lib version.lib psapi.lib"
51290    fi
51291
51292  # Set OPENJDK_BUILD_JVM_ASFLAGS
51293  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51294    if test "x$OPENJDK_BUILD_CPU" = xx86; then
51295      OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
51296    fi
51297  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51298    OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
51299  fi
51300
51301  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51302
51303
51304
51305
51306
51307
51308
51309
51310
51311
51312
51313
51314
51315
51316
51317  # Tests are only ever compiled for TARGET
51318  # Flags for compiling test libraries
51319  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51320  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51321
51322  # Flags for compiling test executables
51323  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
51324  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
51325
51326
51327
51328
51329
51330
51331  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
51332  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE $JAVA_BASE_LDFLAGS"
51333
51334
51335
51336
51337
51338
51339  # Some Zero and Shark settings.
51340  # ZERO_ARCHFLAG tells the compiler which mode to build for
51341  case "${OPENJDK_TARGET_CPU}" in
51342    s390)
51343      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
51344      ;;
51345    *)
51346      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51347  esac
51348
51349
51350
51351
51352
51353
51354
51355
51356
51357
51358
51359
51360
51361
51362
51363
51364
51365
51366
51367
51368
51369
51370
51371
51372
51373
51374
51375
51376
51377
51378
51379
51380
51381
51382
51383
51384
51385
51386
51387
51388
51389
51390    # Execute function body
51391
51392
51393
51394
51395
51396
51397
51398
51399
51400
51401
51402
51403
51404
51405
51406
51407
51408
51409
51410
51411
51412
51413
51414
51415
51416
51417
51418
51419
51420
51421
51422
51423
51424
51425
51426
51427
51428
51429
51430
51431
51432
51433
51434
51435
51436
51437
51438
51439    # Execute function body
51440
51441  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$ZERO_ARCHFLAG\"" >&5
51442$as_echo_n "checking if the C compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51443  supports=yes
51444
51445  saved_cflags="$CFLAGS"
51446  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
51447  ac_ext=c
51448ac_cpp='$CPP $CPPFLAGS'
51449ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51450ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51451ac_compiler_gnu=$ac_cv_c_compiler_gnu
51452
51453  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51454/* end confdefs.h.  */
51455int i;
51456_ACEOF
51457if ac_fn_c_try_compile "$LINENO"; then :
51458
51459else
51460  supports=no
51461fi
51462rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51463  ac_ext=cpp
51464ac_cpp='$CXXCPP $CPPFLAGS'
51465ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51466ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51467ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51468
51469  CFLAGS="$saved_cflags"
51470
51471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51472$as_echo "$supports" >&6; }
51473  if test "x$supports" = "xyes" ; then
51474    :
51475    C_COMP_SUPPORTS="yes"
51476  else
51477    :
51478    C_COMP_SUPPORTS="no"
51479  fi
51480
51481
51482
51483
51484
51485
51486
51487
51488
51489
51490
51491
51492
51493
51494
51495
51496
51497
51498
51499
51500
51501
51502
51503
51504
51505
51506
51507
51508
51509
51510
51511
51512
51513
51514
51515
51516
51517
51518
51519
51520
51521
51522
51523
51524
51525
51526
51527
51528
51529
51530
51531
51532
51533
51534
51535
51536
51537
51538
51539    # Execute function body
51540
51541  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"" >&5
51542$as_echo_n "checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51543  supports=yes
51544
51545  saved_cxxflags="$CXXFLAGS"
51546  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
51547  ac_ext=cpp
51548ac_cpp='$CXXCPP $CPPFLAGS'
51549ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51550ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51551ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51552
51553  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51554/* end confdefs.h.  */
51555int i;
51556_ACEOF
51557if ac_fn_cxx_try_compile "$LINENO"; then :
51558
51559else
51560  supports=no
51561fi
51562rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51563  ac_ext=cpp
51564ac_cpp='$CXXCPP $CPPFLAGS'
51565ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51566ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51567ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51568
51569  CXXFLAGS="$saved_cxxflags"
51570
51571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51572$as_echo "$supports" >&6; }
51573  if test "x$supports" = "xyes" ; then
51574    :
51575    CXX_COMP_SUPPORTS="yes"
51576  else
51577    :
51578    CXX_COMP_SUPPORTS="no"
51579  fi
51580
51581
51582
51583
51584
51585
51586
51587
51588
51589
51590
51591
51592
51593  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$ZERO_ARCHFLAG\"" >&5
51594$as_echo_n "checking if both compilers support \"$ZERO_ARCHFLAG\"... " >&6; }
51595  supports=no
51596  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51597
51598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51599$as_echo "$supports" >&6; }
51600  if test "x$supports" = "xyes" ; then
51601    :
51602
51603  else
51604    :
51605    ZERO_ARCHFLAG=""
51606  fi
51607
51608
51609
51610
51611
51612
51613
51614
51615  # Check that the compiler supports -mX (or -qX on AIX) flags
51616  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
51617
51618
51619
51620
51621
51622
51623
51624
51625
51626
51627
51628
51629
51630
51631
51632
51633
51634
51635
51636
51637
51638
51639
51640
51641
51642
51643
51644
51645
51646
51647
51648
51649
51650
51651
51652
51653
51654
51655
51656
51657
51658
51659
51660
51661
51662
51663
51664    # Execute function body
51665
51666
51667
51668
51669
51670
51671
51672
51673
51674
51675
51676
51677
51678
51679
51680
51681
51682
51683
51684
51685
51686
51687
51688
51689
51690
51691
51692
51693
51694
51695
51696
51697
51698
51699
51700
51701
51702
51703
51704
51705
51706
51707
51708
51709
51710
51711
51712
51713    # Execute function body
51714
51715  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51716$as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51717  supports=yes
51718
51719  saved_cflags="$CFLAGS"
51720  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51721  ac_ext=c
51722ac_cpp='$CPP $CPPFLAGS'
51723ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51724ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51725ac_compiler_gnu=$ac_cv_c_compiler_gnu
51726
51727  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51728/* end confdefs.h.  */
51729int i;
51730_ACEOF
51731if ac_fn_c_try_compile "$LINENO"; then :
51732
51733else
51734  supports=no
51735fi
51736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51737  ac_ext=cpp
51738ac_cpp='$CXXCPP $CPPFLAGS'
51739ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51740ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51741ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51742
51743  CFLAGS="$saved_cflags"
51744
51745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51746$as_echo "$supports" >&6; }
51747  if test "x$supports" = "xyes" ; then
51748    :
51749    C_COMP_SUPPORTS="yes"
51750  else
51751    :
51752    C_COMP_SUPPORTS="no"
51753  fi
51754
51755
51756
51757
51758
51759
51760
51761
51762
51763
51764
51765
51766
51767
51768
51769
51770
51771
51772
51773
51774
51775
51776
51777
51778
51779
51780
51781
51782
51783
51784
51785
51786
51787
51788
51789
51790
51791
51792
51793
51794
51795
51796
51797
51798
51799
51800
51801
51802
51803
51804
51805
51806
51807
51808
51809
51810
51811
51812
51813    # Execute function body
51814
51815  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51816$as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51817  supports=yes
51818
51819  saved_cxxflags="$CXXFLAGS"
51820  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51821  ac_ext=cpp
51822ac_cpp='$CXXCPP $CPPFLAGS'
51823ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51824ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51825ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51826
51827  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51828/* end confdefs.h.  */
51829int i;
51830_ACEOF
51831if ac_fn_cxx_try_compile "$LINENO"; then :
51832
51833else
51834  supports=no
51835fi
51836rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51837  ac_ext=cpp
51838ac_cpp='$CXXCPP $CPPFLAGS'
51839ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51840ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51841ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51842
51843  CXXFLAGS="$saved_cxxflags"
51844
51845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51846$as_echo "$supports" >&6; }
51847  if test "x$supports" = "xyes" ; then
51848    :
51849    CXX_COMP_SUPPORTS="yes"
51850  else
51851    :
51852    CXX_COMP_SUPPORTS="no"
51853  fi
51854
51855
51856
51857
51858
51859
51860
51861
51862
51863
51864
51865
51866
51867  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51868$as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51869  supports=no
51870  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51871
51872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51873$as_echo "$supports" >&6; }
51874  if test "x$supports" = "xyes" ; then
51875    :
51876    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
51877  else
51878    :
51879    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
51880  fi
51881
51882
51883
51884
51885
51886
51887
51888
51889  # Check whether --enable-warnings-as-errors was given.
51890if test "${enable_warnings_as_errors+set}" = set; then :
51891  enableval=$enable_warnings_as_errors;
51892fi
51893
51894
51895  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
51896$as_echo_n "checking if native warnings are errors... " >&6; }
51897  if test "x$enable_warnings_as_errors" = "xyes"; then
51898    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
51899$as_echo "yes (explicitely set)" >&6; }
51900    WARNINGS_AS_ERRORS=true
51901  elif test "x$enable_warnings_as_errors" = "xno"; then
51902    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51903$as_echo "no" >&6; }
51904    WARNINGS_AS_ERRORS=false
51905  elif test "x$enable_warnings_as_errors" = "x"; then
51906    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
51907$as_echo "yes (default)" >&6; }
51908    WARNINGS_AS_ERRORS=true
51909  else
51910    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
51911  fi
51912
51913  if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
51914    # Set legacy hotspot variable
51915    HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
51916  else
51917    HOTSPOT_SET_WARNINGS_AS_ERRORS=""
51918  fi
51919
51920
51921
51922
51923  case "${TOOLCHAIN_TYPE}" in
51924    microsoft)
51925      DISABLE_WARNING_PREFIX="-wd"
51926      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
51927      ;;
51928    solstudio)
51929      DISABLE_WARNING_PREFIX="-erroff="
51930      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
51931      ;;
51932    gcc)
51933      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
51934
51935
51936
51937
51938
51939
51940
51941
51942
51943
51944
51945
51946
51947
51948
51949
51950
51951
51952
51953
51954
51955
51956
51957
51958
51959
51960
51961
51962
51963
51964
51965
51966
51967
51968
51969
51970
51971
51972
51973
51974
51975
51976
51977
51978
51979
51980
51981    # Execute function body
51982
51983
51984
51985
51986
51987
51988
51989
51990
51991
51992
51993
51994
51995
51996
51997
51998
51999
52000
52001
52002
52003
52004
52005
52006
52007
52008
52009
52010
52011
52012
52013
52014
52015
52016
52017
52018
52019
52020
52021
52022
52023
52024
52025
52026
52027
52028
52029
52030    # Execute function body
52031
52032  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52033$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52034  supports=yes
52035
52036  saved_cflags="$CFLAGS"
52037  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52038  ac_ext=c
52039ac_cpp='$CPP $CPPFLAGS'
52040ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52041ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52042ac_compiler_gnu=$ac_cv_c_compiler_gnu
52043
52044  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52045/* end confdefs.h.  */
52046int i;
52047_ACEOF
52048if ac_fn_c_try_compile "$LINENO"; then :
52049
52050else
52051  supports=no
52052fi
52053rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52054  ac_ext=cpp
52055ac_cpp='$CXXCPP $CPPFLAGS'
52056ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52057ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52058ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52059
52060  CFLAGS="$saved_cflags"
52061
52062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52063$as_echo "$supports" >&6; }
52064  if test "x$supports" = "xyes" ; then
52065    :
52066    C_COMP_SUPPORTS="yes"
52067  else
52068    :
52069    C_COMP_SUPPORTS="no"
52070  fi
52071
52072
52073
52074
52075
52076
52077
52078
52079
52080
52081
52082
52083
52084
52085
52086
52087
52088
52089
52090
52091
52092
52093
52094
52095
52096
52097
52098
52099
52100
52101
52102
52103
52104
52105
52106
52107
52108
52109
52110
52111
52112
52113
52114
52115
52116
52117
52118
52119
52120
52121
52122
52123
52124
52125
52126
52127
52128
52129
52130    # Execute function body
52131
52132  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52133$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52134  supports=yes
52135
52136  saved_cxxflags="$CXXFLAGS"
52137  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52138  ac_ext=cpp
52139ac_cpp='$CXXCPP $CPPFLAGS'
52140ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52141ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52142ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52143
52144  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52145/* end confdefs.h.  */
52146int i;
52147_ACEOF
52148if ac_fn_cxx_try_compile "$LINENO"; then :
52149
52150else
52151  supports=no
52152fi
52153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52154  ac_ext=cpp
52155ac_cpp='$CXXCPP $CPPFLAGS'
52156ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52157ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52158ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52159
52160  CXXFLAGS="$saved_cxxflags"
52161
52162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52163$as_echo "$supports" >&6; }
52164  if test "x$supports" = "xyes" ; then
52165    :
52166    CXX_COMP_SUPPORTS="yes"
52167  else
52168    :
52169    CXX_COMP_SUPPORTS="no"
52170  fi
52171
52172
52173
52174
52175
52176
52177
52178
52179
52180
52181
52182
52183
52184  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52185$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52186  supports=no
52187  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52188
52189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52190$as_echo "$supports" >&6; }
52191  if test "x$supports" = "xyes" ; then
52192    :
52193    GCC_CAN_DISABLE_WARNINGS=true
52194  else
52195    :
52196    GCC_CAN_DISABLE_WARNINGS=false
52197
52198  fi
52199
52200
52201
52202
52203
52204
52205      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52206        DISABLE_WARNING_PREFIX="-Wno-"
52207      else
52208        DISABLE_WARNING_PREFIX=
52209      fi
52210      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52211      # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
52212      # CFLAGS since any target specific flags will likely not work with the
52213      # build compiler
52214      CC_OLD="$CC"
52215      CXX_OLD="$CXX"
52216      CC="$BUILD_CC"
52217      CXX="$BUILD_CXX"
52218      CFLAGS_OLD="$CFLAGS"
52219      CFLAGS=""
52220
52221
52222
52223
52224
52225
52226
52227
52228
52229
52230
52231
52232
52233
52234
52235
52236
52237
52238
52239
52240
52241
52242
52243
52244
52245
52246
52247
52248
52249
52250
52251
52252
52253
52254
52255
52256
52257
52258
52259
52260
52261
52262
52263
52264
52265
52266
52267    # Execute function body
52268
52269
52270
52271
52272
52273
52274
52275
52276
52277
52278
52279
52280
52281
52282
52283
52284
52285
52286
52287
52288
52289
52290
52291
52292
52293
52294
52295
52296
52297
52298
52299
52300
52301
52302
52303
52304
52305
52306
52307
52308
52309
52310
52311
52312
52313
52314
52315
52316    # Execute function body
52317
52318  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52319$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52320  supports=yes
52321
52322  saved_cflags="$CFLAGS"
52323  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52324  ac_ext=c
52325ac_cpp='$CPP $CPPFLAGS'
52326ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52327ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52328ac_compiler_gnu=$ac_cv_c_compiler_gnu
52329
52330  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52331/* end confdefs.h.  */
52332int i;
52333_ACEOF
52334if ac_fn_c_try_compile "$LINENO"; then :
52335
52336else
52337  supports=no
52338fi
52339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52340  ac_ext=cpp
52341ac_cpp='$CXXCPP $CPPFLAGS'
52342ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52343ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52344ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52345
52346  CFLAGS="$saved_cflags"
52347
52348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52349$as_echo "$supports" >&6; }
52350  if test "x$supports" = "xyes" ; then
52351    :
52352    C_COMP_SUPPORTS="yes"
52353  else
52354    :
52355    C_COMP_SUPPORTS="no"
52356  fi
52357
52358
52359
52360
52361
52362
52363
52364
52365
52366
52367
52368
52369
52370
52371
52372
52373
52374
52375
52376
52377
52378
52379
52380
52381
52382
52383
52384
52385
52386
52387
52388
52389
52390
52391
52392
52393
52394
52395
52396
52397
52398
52399
52400
52401
52402
52403
52404
52405
52406
52407
52408
52409
52410
52411
52412
52413
52414
52415
52416    # Execute function body
52417
52418  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52419$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52420  supports=yes
52421
52422  saved_cxxflags="$CXXFLAGS"
52423  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52424  ac_ext=cpp
52425ac_cpp='$CXXCPP $CPPFLAGS'
52426ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52427ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52428ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52429
52430  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52431/* end confdefs.h.  */
52432int i;
52433_ACEOF
52434if ac_fn_cxx_try_compile "$LINENO"; then :
52435
52436else
52437  supports=no
52438fi
52439rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52440  ac_ext=cpp
52441ac_cpp='$CXXCPP $CPPFLAGS'
52442ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52443ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52444ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52445
52446  CXXFLAGS="$saved_cxxflags"
52447
52448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52449$as_echo "$supports" >&6; }
52450  if test "x$supports" = "xyes" ; then
52451    :
52452    CXX_COMP_SUPPORTS="yes"
52453  else
52454    :
52455    CXX_COMP_SUPPORTS="no"
52456  fi
52457
52458
52459
52460
52461
52462
52463
52464
52465
52466
52467
52468
52469
52470  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52471$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52472  supports=no
52473  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52474
52475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52476$as_echo "$supports" >&6; }
52477  if test "x$supports" = "xyes" ; then
52478    :
52479    BUILD_CC_CAN_DISABLE_WARNINGS=true
52480  else
52481    :
52482    BUILD_CC_CAN_DISABLE_WARNINGS=false
52483
52484  fi
52485
52486
52487
52488
52489
52490
52491      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52492        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
52493      else
52494        BUILD_CC_DISABLE_WARNING_PREFIX=
52495      fi
52496      CC="$CC_OLD"
52497      CXX="$CXX_OLD"
52498      CFLAGS="$CFLAGS_OLD"
52499      ;;
52500    clang)
52501      DISABLE_WARNING_PREFIX="-Wno-"
52502      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52503      ;;
52504    xlc)
52505      DISABLE_WARNING_PREFIX="-qsuppress="
52506      CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
52507      ;;
52508  esac
52509
52510
52511
52512
52513
52514# Setup debug symbols (need objcopy from the toolchain for that)
52515
52516  #
52517  # NATIVE_DEBUG_SYMBOLS
52518  # This must be done after the toolchain is setup, since we're looking at objcopy.
52519  #
52520  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
52521$as_echo_n "checking what type of native debug symbols to use... " >&6; }
52522
52523# Check whether --with-native-debug-symbols was given.
52524if test "${with_native_debug_symbols+set}" = set; then :
52525  withval=$with_native_debug_symbols;
52526        if test "x$OPENJDK_TARGET_OS" = xaix; then
52527          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
52528            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
52529          fi
52530        fi
52531
52532else
52533
52534        if test "x$OPENJDK_TARGET_OS" = xaix; then
52535          # AIX doesn't support 'zipped' so use 'internal' as default
52536          with_native_debug_symbols="internal"
52537        else
52538          if test "x$STATIC_BUILD" = xtrue; then
52539            with_native_debug_symbols="none"
52540          else
52541            with_native_debug_symbols="zipped"
52542          fi
52543        fi
52544
52545fi
52546
52547  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
52548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
52549$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
52550
52551  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
52552
52553    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52554      if test "x$OBJCOPY" = x; then
52555        # enabling of enable-debug-symbols and can't find objcopy
52556        # this is an error
52557        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52558      fi
52559    fi
52560
52561    COMPILE_WITH_DEBUG_SYMBOLS=true
52562    COPY_DEBUG_SYMBOLS=true
52563    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
52564
52565    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
52566    DEBUG_BINARIES=false
52567    STRIP_POLICY=min_strip
52568
52569  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
52570    COMPILE_WITH_DEBUG_SYMBOLS=false
52571    COPY_DEBUG_SYMBOLS=false
52572    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52573
52574    DEBUG_BINARIES=false
52575    STRIP_POLICY=no_strip
52576  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
52577    COMPILE_WITH_DEBUG_SYMBOLS=true
52578    COPY_DEBUG_SYMBOLS=false
52579    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52580
52581    # Hotspot legacy support, will turn on -g when COPY_DEBUG_SYMBOLS=false
52582    DEBUG_BINARIES=true
52583    STRIP_POLICY=no_strip
52584    STRIP=""
52585
52586  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
52587
52588    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52589      if test "x$OBJCOPY" = x; then
52590        # enabling of enable-debug-symbols and can't find objcopy
52591        # this is an error
52592        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52593      fi
52594    fi
52595
52596    COMPILE_WITH_DEBUG_SYMBOLS=true
52597    COPY_DEBUG_SYMBOLS=true
52598    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52599
52600    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
52601    DEBUG_BINARIES=false
52602    STRIP_POLICY=min_strip
52603  else
52604    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
52605  fi
52606
52607  # --enable-debug-symbols is deprecated.
52608  # Please use --with-native-debug-symbols=[internal,external,zipped] .
52609
52610  # Check whether --enable-debug-symbols was given.
52611if test "${enable_debug_symbols+set}" = set; then :
52612  enableval=$enable_debug_symbols;
52613fi
52614
52615  if test "x$enable_debug_symbols" != x; then
52616    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
52617$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
52618
52619    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
52620      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
52621$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
52622    fi
52623
52624  fi
52625
52626
52627  # --enable-zip-debug-info is deprecated.
52628  # Please use --with-native-debug-symbols=zipped .
52629
52630  # Check whether --enable-zip-debug-info was given.
52631if test "${enable_zip_debug_info+set}" = set; then :
52632  enableval=$enable_zip_debug_info;
52633fi
52634
52635  if test "x$enable_zip_debug_info" != x; then
52636    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
52637$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
52638
52639    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
52640      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
52641$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
52642    fi
52643
52644  fi
52645
52646
52647
52648
52649
52650
52651  # Legacy values
52652
52653
52654
52655
52656  # Check whether --enable-native-coverage was given.
52657if test "${enable_native_coverage+set}" = set; then :
52658  enableval=$enable_native_coverage;
52659fi
52660
52661  GCOV_ENABLED="false"
52662  if test "x$enable_native_coverage" = "xyes"; then
52663    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
52664      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52665$as_echo_n "checking if native coverage is enabled... " >&6; }
52666      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52667$as_echo "yes" >&6; }
52668      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
52669      GCOV_LDFLAGS="-fprofile-arcs"
52670      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
52671      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
52672      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
52673      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
52674      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
52675      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
52676      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
52677      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
52678      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
52679      GCOV_ENABLED="true"
52680    else
52681      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
52682    fi
52683  elif test "x$enable_native_coverage" = "xno"; then
52684    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52685$as_echo_n "checking if native coverage is enabled... " >&6; }
52686    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52687$as_echo "no" >&6; }
52688  elif test "x$enable_native_coverage" != "x"; then
52689    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
52690  fi
52691
52692
52693
52694
52695# Need toolchain to setup dtrace
52696
52697  # Test for dtrace dependencies
52698  # Check whether --enable-dtrace was given.
52699if test "${enable_dtrace+set}" = set; then :
52700  enableval=$enable_dtrace;
52701fi
52702
52703
52704  DTRACE_DEP_MISSING=false
52705
52706  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
52707$as_echo_n "checking for dtrace tool... " >&6; }
52708  if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
52709    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
52710$as_echo "$DTRACE" >&6; }
52711  else
52712    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
52713$as_echo "not found, cannot build dtrace" >&6; }
52714    DTRACE_DEP_MISSING=true
52715  fi
52716
52717  for ac_header in sys/sdt.h
52718do :
52719  ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
52720if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
52721  cat >>confdefs.h <<_ACEOF
52722#define HAVE_SYS_SDT_H 1
52723_ACEOF
52724 DTRACE_HEADERS_OK=yes
52725else
52726  DTRACE_HEADERS_OK=no
52727fi
52728
52729done
52730
52731  if test "x$DTRACE_HEADERS_OK" != "xyes"; then
52732    DTRACE_DEP_MISSING=true
52733  fi
52734
52735  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
52736$as_echo_n "checking if dtrace should be built... " >&6; }
52737  if test "x$enable_dtrace" = "xyes"; then
52738    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52739      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52740$as_echo "no, missing dependencies" >&6; }
52741
52742  # Print a helpful message on how to acquire the necessary build dependency.
52743  # dtrace is the help tag: freetype, cups, alsa etc
52744  MISSING_DEPENDENCY=dtrace
52745
52746  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52747    cygwin_help $MISSING_DEPENDENCY
52748  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52749    msys_help $MISSING_DEPENDENCY
52750  else
52751    PKGHANDLER_COMMAND=
52752
52753    case $PKGHANDLER in
52754      apt-get)
52755        apt_help     $MISSING_DEPENDENCY ;;
52756      yum)
52757        yum_help     $MISSING_DEPENDENCY ;;
52758      port)
52759        port_help    $MISSING_DEPENDENCY ;;
52760      pkgutil)
52761        pkgutil_help $MISSING_DEPENDENCY ;;
52762      pkgadd)
52763        pkgadd_help  $MISSING_DEPENDENCY ;;
52764    esac
52765
52766    if test "x$PKGHANDLER_COMMAND" != x; then
52767      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
52768    fi
52769  fi
52770
52771      as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
52772    else
52773      INCLUDE_DTRACE=true
52774      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52775$as_echo "yes, forced" >&6; }
52776    fi
52777  elif test "x$enable_dtrace" = "xno"; then
52778    INCLUDE_DTRACE=false
52779    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52780$as_echo "no, forced" >&6; }
52781  elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
52782    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52783      INCLUDE_DTRACE=false
52784      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52785$as_echo "no, missing dependencies" >&6; }
52786    else
52787      INCLUDE_DTRACE=true
52788      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
52789$as_echo "yes, dependencies present" >&6; }
52790    fi
52791  else
52792    as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
52793  fi
52794
52795
52796
52797  # The user can in some cases supply additional jvm features. For the custom
52798  # variant, this defines the entire variant.
52799
52800# Check whether --with-jvm-features was given.
52801if test "${with_jvm_features+set}" = set; then :
52802  withval=$with_jvm_features;
52803fi
52804
52805  if test "x$with_jvm_features" != x; then
52806    { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
52807$as_echo_n "checking additional JVM features... " >&6; }
52808    JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
52809    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
52810$as_echo "$JVM_FEATURES" >&6; }
52811  fi
52812
52813  # Verify that dependencies are met for explicitly set features.
52814  if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
52815    as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
52816  fi
52817
52818  if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
52819    as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
52820  fi
52821
52822  if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && ! (  [[ " $JVM_FEATURES " =~ " compiler1 " ]]   ||   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ); then
52823    as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'" "$LINENO" 5
52824  fi
52825
52826  if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
52827    as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
52828  fi
52829
52830  if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
52831    as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
52832  fi
52833
52834  # Turn on additional features based on other parts of configure
52835  if test "x$INCLUDE_DTRACE" = "xtrue"; then
52836    JVM_FEATURES="$JVM_FEATURES dtrace"
52837  else
52838    if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
52839      as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
52840    fi
52841  fi
52842
52843  if test "x$STATIC_BUILD" = "xtrue"; then
52844    JVM_FEATURES="$JVM_FEATURES static-build"
52845  else
52846    if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
52847      as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
52848    fi
52849  fi
52850
52851  if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52852    if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
52853      as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
52854    fi
52855  fi
52856
52857  if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52858    if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
52859      as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
52860    fi
52861  fi
52862
52863  # Only enable jvmci on x86_64, sparcv9 and aarch64.
52864  if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
52865      test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
52866      test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
52867    JVM_FEATURES_jvmci="jvmci"
52868  else
52869    JVM_FEATURES_jvmci=""
52870  fi
52871
52872  # All variants but minimal (and custom) get these features
52873  NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
52874
52875  # Enable features depending on variant.
52876  JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
52877  JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
52878  JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
52879  JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES"
52880  JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
52881  JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
52882  JVM_FEATURES_custom="$JVM_FEATURES"
52883
52884
52885
52886
52887
52888
52889
52890
52891
52892  # Used for verification of Makefiles by check-jvm-feature
52893
52894
52895  # We don't support --with-jvm-interpreter anymore, use zero instead.
52896
52897
52898# Check whether --with-jvm-interpreter was given.
52899if test "${with_jvm_interpreter+set}" = set; then :
52900  withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
52901$as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
52902fi
52903
52904
52905
52906
52907  # Check whether --enable-hotspot-gtest was given.
52908if test "${enable_hotspot_gtest+set}" = set; then :
52909  enableval=$enable_hotspot_gtest;
52910fi
52911
52912
52913  if test -e "$HOTSPOT_TOPDIR/test/native"; then
52914    GTEST_DIR_EXISTS="true"
52915  else
52916    GTEST_DIR_EXISTS="false"
52917  fi
52918
52919  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Hotspot gtest unit tests should be built" >&5
52920$as_echo_n "checking if Hotspot gtest unit tests should be built... " >&6; }
52921  if test "x$enable_hotspot_gtest" = "xyes"; then
52922    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
52923      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52924$as_echo "yes, forced" >&6; }
52925      BUILD_GTEST="true"
52926    else
52927      as_fn_error $? "Cannot build gtest without the test source" "$LINENO" 5
52928    fi
52929  elif test "x$enable_hotspot_gtest" = "xno"; then
52930    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52931$as_echo "no, forced" >&6; }
52932    BUILD_GTEST="false"
52933  elif test "x$enable_hotspot_gtest" = "x"; then
52934    if test "x$GTEST_DIR_EXISTS" = "xtrue" && test "x$OPENJDK_TARGET_OS" != "xaix"; then
52935      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52936$as_echo "yes" >&6; }
52937      BUILD_GTEST="true"
52938    else
52939      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52940$as_echo "no" >&6; }
52941      BUILD_GTEST="false"
52942    fi
52943  else
52944    as_fn_error $? "--enable-gtest must be either yes or no" "$LINENO" 5
52945  fi
52946
52947
52948
52949
52950###############################################################################
52951#
52952# Check dependencies for external and internal libraries.
52953#
52954###############################################################################
52955
52956# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
52957
52958  # When using cygwin or msys, we need a wrapper binary that renames
52959  # /cygdrive/c/ arguments into c:/ arguments and peeks into
52960  # @files and rewrites these too! This wrapper binary is
52961  # called fixpath.
52962  FIXPATH=
52963  if test "x$OPENJDK_BUILD_OS" = xwindows; then
52964    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
52965$as_echo_n "checking if fixpath can be created... " >&6; }
52966    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
52967    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
52968    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
52969    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
52970      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
52971      FIXPATH="$FIXPATH_BIN -c"
52972    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
52973      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
52974      # @ was chosen as separator to minimize risk of other tools messing around with it
52975      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
52976          | tr ' ' '\n' | $GREP '^/./' | $SORT | $UNIQ`
52977      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
52978      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
52979    fi
52980    FIXPATH_SRC_W="$FIXPATH_SRC"
52981    FIXPATH_BIN_W="$FIXPATH_BIN"
52982
52983  unix_path="$FIXPATH_SRC_W"
52984  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52985    windows_path=`$CYGPATH -m "$unix_path"`
52986    FIXPATH_SRC_W="$windows_path"
52987  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52988    windows_path=`cmd //c echo $unix_path`
52989    FIXPATH_SRC_W="$windows_path"
52990  fi
52991
52992
52993  unix_path="$FIXPATH_BIN_W"
52994  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52995    windows_path=`$CYGPATH -m "$unix_path"`
52996    FIXPATH_BIN_W="$windows_path"
52997  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52998    windows_path=`cmd //c echo $unix_path`
52999    FIXPATH_BIN_W="$windows_path"
53000  fi
53001
53002    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
53003    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
53004    cd $FIXPATH_DIR
53005    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
53006    cd $CURDIR
53007
53008    if test ! -x $FIXPATH_BIN; then
53009      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53010$as_echo "no" >&6; }
53011      cat $FIXPATH_DIR/fixpath1.log
53012      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
53013    fi
53014    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53015$as_echo "yes" >&6; }
53016    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
53017$as_echo_n "checking if fixpath.exe works... " >&6; }
53018    cd $FIXPATH_DIR
53019    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
53020        > $FIXPATH_DIR/fixpath2.log 2>&1
53021    cd $CURDIR
53022    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
53023      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53024$as_echo "no" >&6; }
53025      cat $FIXPATH_DIR/fixpath2.log
53026      as_fn_error $? "fixpath did not work!" "$LINENO" 5
53027    fi
53028    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53029$as_echo "yes" >&6; }
53030
53031    FIXPATH_DETACH_FLAG="--detach"
53032  fi
53033
53034
53035
53036
53037
53038
53039  # Check if X11 is needed
53040  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
53041    # No X11 support on windows or macosx
53042    NEEDS_LIB_X11=false
53043  else
53044    # All other instances need X11, even if building headless only, libawt still
53045    # needs X11 headers.
53046    NEEDS_LIB_X11=true
53047  fi
53048
53049  # Check if cups is needed
53050  if test "x$OPENJDK_TARGET_OS" = xwindows; then
53051    # Windows have a separate print system
53052    NEEDS_LIB_CUPS=false
53053  else
53054    NEEDS_LIB_CUPS=true
53055  fi
53056
53057  # A custom hook may have set this already
53058  if test "x$NEEDS_LIB_FREETYPE" = "x"; then
53059    NEEDS_LIB_FREETYPE=true
53060  fi
53061
53062  # Check if alsa is needed
53063  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53064    NEEDS_LIB_ALSA=true
53065  else
53066    NEEDS_LIB_ALSA=false
53067  fi
53068
53069  # Check if ffi is needed
53070  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53071    NEEDS_LIB_FFI=true
53072  else
53073    NEEDS_LIB_FFI=false
53074  fi
53075
53076
53077  # statically link libstdc++ before C++ ABI is stablized on Linux unless
53078  # dynamic build is configured on command line.
53079
53080# Check whether --with-stdc++lib was given.
53081if test "${with_stdc__lib+set}" = set; then :
53082  withval=$with_stdc__lib;
53083        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
53084                && test "x$with_stdc__lib" != xdefault; then
53085          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
53086        fi
53087
53088else
53089  with_stdc__lib=default
53090
53091fi
53092
53093
53094  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53095    # Test if stdc++ can be linked statically.
53096    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
53097$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
53098    STATIC_STDCXX_FLAGS="-static-libstdc++ -static-libgcc"
53099    ac_ext=cpp
53100ac_cpp='$CXXCPP $CPPFLAGS'
53101ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53102ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53103ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53104
53105    OLD_LIBS="$LIBS"
53106    LIBS="$STATIC_STDCXX_FLAGS"
53107    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53108/* end confdefs.h.  */
53109
53110int
53111main ()
53112{
53113return 0;
53114  ;
53115  return 0;
53116}
53117_ACEOF
53118if ac_fn_cxx_try_link "$LINENO"; then :
53119  has_static_libstdcxx=yes
53120else
53121  has_static_libstdcxx=no
53122fi
53123rm -f core conftest.err conftest.$ac_objext \
53124    conftest$ac_exeext conftest.$ac_ext
53125    LIBS="$OLD_LIBS"
53126    ac_ext=cpp
53127ac_cpp='$CXXCPP $CPPFLAGS'
53128ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53129ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53130ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53131
53132    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
53133$as_echo "$has_static_libstdcxx" >&6; }
53134
53135    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
53136      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
53137    fi
53138
53139    # If dynamic was requested, it's available since it would fail above otherwise.
53140    # If dynamic wasn't requested, go with static unless it isn't available.
53141    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
53142$as_echo_n "checking how to link with libstdc++... " >&6; }
53143    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno \
53144        ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53145      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
53146$as_echo "dynamic" >&6; }
53147    else
53148      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
53149      JVM_LDFLAGS="$JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53150      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
53151      # just use the same setting as for the TARGET toolchain.
53152      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53153      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
53154$as_echo "static" >&6; }
53155    fi
53156  fi
53157
53158  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
53159  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
53160    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
53161  fi
53162
53163
53164
53165  # Setup Windows runtime dlls
53166  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
53167
53168
53169# Check whether --with-msvcr-dll was given.
53170if test "${with_msvcr_dll+set}" = set; then :
53171  withval=$with_msvcr_dll;
53172fi
53173
53174
53175  if test "x$with_msvcr_dll" != x; then
53176    # If given explicitely by user, do not probe. If not present, fail directly.
53177
53178  DLL_NAME="$MSVCR_NAME"
53179  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
53180  METHOD="--with-msvcr-dll"
53181  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53182    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53183$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53184
53185    # Need to check if the found msvcr is correct architecture
53186    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53187$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53188    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53189    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53190      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53191      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53192      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53193        CORRECT_MSVCR_ARCH="PE32 executable"
53194      else
53195        CORRECT_MSVCR_ARCH="PE32+ executable"
53196      fi
53197    else
53198      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53199        CORRECT_MSVCR_ARCH=386
53200      else
53201        CORRECT_MSVCR_ARCH=x86-64
53202      fi
53203    fi
53204    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53205      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53206$as_echo "ok" >&6; }
53207      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53208
53209  # Only process if variable expands to non-empty
53210
53211  if test "x$MSVC_DLL" != x; then
53212    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53213
53214  # Input might be given as Windows format, start by converting to
53215  # unix format.
53216  path="$MSVC_DLL"
53217  new_path=`$CYGPATH -u "$path"`
53218
53219  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53220  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53221  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53222  # "foo.exe" is OK but "foo" is an error.
53223  #
53224  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53225  # It is also a way to make sure we got the proper file name for the real test later on.
53226  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53227  if test "x$test_shortpath" = x; then
53228    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53229$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53230    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53231  fi
53232
53233  # Call helper function which possibly converts this using DOS-style short mode.
53234  # If so, the updated path is stored in $new_path.
53235
53236  input_path="$new_path"
53237  # Check if we need to convert this using DOS-style short mode. If the path
53238  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53239  # take no chances and rewrite it.
53240  # Note: m4 eats our [], so we need to use [ and ] instead.
53241  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53242  if test "x$has_forbidden_chars" != x; then
53243    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53244    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53245    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53246    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53247      # Going to short mode and back again did indeed matter. Since short mode is
53248      # case insensitive, let's make it lowercase to improve readability.
53249      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53250      # Now convert it back to Unix-style (cygpath)
53251      input_path=`$CYGPATH -u "$shortmode_path"`
53252      new_path="$input_path"
53253    fi
53254  fi
53255
53256  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53257  if test "x$test_cygdrive_prefix" = x; then
53258    # As a simple fix, exclude /usr/bin since it's not a real path.
53259    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53260      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53261      # a path prefixed by /cygdrive for fixpath to work.
53262      new_path="$CYGWIN_ROOT_PATH$input_path"
53263    fi
53264  fi
53265
53266
53267  if test "x$path" != "x$new_path"; then
53268    MSVC_DLL="$new_path"
53269    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53270$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53271  fi
53272
53273    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53274
53275  path="$MSVC_DLL"
53276  has_colon=`$ECHO $path | $GREP ^.:`
53277  new_path="$path"
53278  if test "x$has_colon" = x; then
53279    # Not in mixed or Windows style, start by that.
53280    new_path=`cmd //c echo $path`
53281  fi
53282
53283
53284  input_path="$new_path"
53285  # Check if we need to convert this using DOS-style short mode. If the path
53286  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53287  # take no chances and rewrite it.
53288  # Note: m4 eats our [], so we need to use [ and ] instead.
53289  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53290  if test "x$has_forbidden_chars" != x; then
53291    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53292    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53293  fi
53294
53295
53296  windows_path="$new_path"
53297  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53298    unix_path=`$CYGPATH -u "$windows_path"`
53299    new_path="$unix_path"
53300  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53301    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53302    new_path="$unix_path"
53303  fi
53304
53305  if test "x$path" != "x$new_path"; then
53306    MSVC_DLL="$new_path"
53307    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53308$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53309  fi
53310
53311  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53312  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53313
53314    else
53315      # We're on a unix platform. Hooray! :)
53316      path="$MSVC_DLL"
53317      has_space=`$ECHO "$path" | $GREP " "`
53318      if test "x$has_space" != x; then
53319        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53320$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53321        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53322      fi
53323
53324      # Use eval to expand a potential ~
53325      eval path="$path"
53326      if test ! -f "$path" && test ! -d "$path"; then
53327        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53328      fi
53329
53330      if test -d "$path"; then
53331        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53332      else
53333        dir="`$DIRNAME "$path"`"
53334        base="`$BASENAME "$path"`"
53335        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53336      fi
53337    fi
53338  fi
53339
53340      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53341$as_echo_n "checking for $DLL_NAME... " >&6; }
53342      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53343$as_echo "$MSVC_DLL" >&6; }
53344    else
53345      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53346$as_echo "incorrect, ignoring" >&6; }
53347      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53348$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53349    fi
53350  fi
53351
53352    if test "x$MSVC_DLL" = x; then
53353      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
53354    fi
53355    MSVCR_DLL="$MSVC_DLL"
53356  elif test "x$DEVKIT_MSVCR_DLL" != x; then
53357
53358  DLL_NAME="$MSVCR_NAME"
53359  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
53360  METHOD="devkit"
53361  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53362    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53363$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53364
53365    # Need to check if the found msvcr is correct architecture
53366    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53367$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53368    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53369    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53370      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53371      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53372      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53373        CORRECT_MSVCR_ARCH="PE32 executable"
53374      else
53375        CORRECT_MSVCR_ARCH="PE32+ executable"
53376      fi
53377    else
53378      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53379        CORRECT_MSVCR_ARCH=386
53380      else
53381        CORRECT_MSVCR_ARCH=x86-64
53382      fi
53383    fi
53384    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53385      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53386$as_echo "ok" >&6; }
53387      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53388
53389  # Only process if variable expands to non-empty
53390
53391  if test "x$MSVC_DLL" != x; then
53392    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53393
53394  # Input might be given as Windows format, start by converting to
53395  # unix format.
53396  path="$MSVC_DLL"
53397  new_path=`$CYGPATH -u "$path"`
53398
53399  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53400  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53401  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53402  # "foo.exe" is OK but "foo" is an error.
53403  #
53404  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53405  # It is also a way to make sure we got the proper file name for the real test later on.
53406  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53407  if test "x$test_shortpath" = x; then
53408    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53409$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53410    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53411  fi
53412
53413  # Call helper function which possibly converts this using DOS-style short mode.
53414  # If so, the updated path is stored in $new_path.
53415
53416  input_path="$new_path"
53417  # Check if we need to convert this using DOS-style short mode. If the path
53418  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53419  # take no chances and rewrite it.
53420  # Note: m4 eats our [], so we need to use [ and ] instead.
53421  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53422  if test "x$has_forbidden_chars" != x; then
53423    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53424    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53425    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53426    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53427      # Going to short mode and back again did indeed matter. Since short mode is
53428      # case insensitive, let's make it lowercase to improve readability.
53429      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53430      # Now convert it back to Unix-style (cygpath)
53431      input_path=`$CYGPATH -u "$shortmode_path"`
53432      new_path="$input_path"
53433    fi
53434  fi
53435
53436  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53437  if test "x$test_cygdrive_prefix" = x; then
53438    # As a simple fix, exclude /usr/bin since it's not a real path.
53439    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53440      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53441      # a path prefixed by /cygdrive for fixpath to work.
53442      new_path="$CYGWIN_ROOT_PATH$input_path"
53443    fi
53444  fi
53445
53446
53447  if test "x$path" != "x$new_path"; then
53448    MSVC_DLL="$new_path"
53449    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53450$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53451  fi
53452
53453    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53454
53455  path="$MSVC_DLL"
53456  has_colon=`$ECHO $path | $GREP ^.:`
53457  new_path="$path"
53458  if test "x$has_colon" = x; then
53459    # Not in mixed or Windows style, start by that.
53460    new_path=`cmd //c echo $path`
53461  fi
53462
53463
53464  input_path="$new_path"
53465  # Check if we need to convert this using DOS-style short mode. If the path
53466  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53467  # take no chances and rewrite it.
53468  # Note: m4 eats our [], so we need to use [ and ] instead.
53469  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53470  if test "x$has_forbidden_chars" != x; then
53471    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53472    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53473  fi
53474
53475
53476  windows_path="$new_path"
53477  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53478    unix_path=`$CYGPATH -u "$windows_path"`
53479    new_path="$unix_path"
53480  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53481    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53482    new_path="$unix_path"
53483  fi
53484
53485  if test "x$path" != "x$new_path"; then
53486    MSVC_DLL="$new_path"
53487    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53488$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53489  fi
53490
53491  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53492  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53493
53494    else
53495      # We're on a unix platform. Hooray! :)
53496      path="$MSVC_DLL"
53497      has_space=`$ECHO "$path" | $GREP " "`
53498      if test "x$has_space" != x; then
53499        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53500$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53501        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53502      fi
53503
53504      # Use eval to expand a potential ~
53505      eval path="$path"
53506      if test ! -f "$path" && test ! -d "$path"; then
53507        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53508      fi
53509
53510      if test -d "$path"; then
53511        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53512      else
53513        dir="`$DIRNAME "$path"`"
53514        base="`$BASENAME "$path"`"
53515        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53516      fi
53517    fi
53518  fi
53519
53520      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53521$as_echo_n "checking for $DLL_NAME... " >&6; }
53522      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53523$as_echo "$MSVC_DLL" >&6; }
53524    else
53525      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53526$as_echo "incorrect, ignoring" >&6; }
53527      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53528$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53529    fi
53530  fi
53531
53532    if test "x$MSVC_DLL" = x; then
53533      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
53534    fi
53535    MSVCR_DLL="$MSVC_DLL"
53536  else
53537
53538  DLL_NAME="${MSVCR_NAME}"
53539  MSVC_DLL=
53540
53541  if test "x$MSVC_DLL" = x; then
53542    # Probe: Using well-known location from Visual Studio 10.0
53543    if test "x$VCINSTALLDIR" != x; then
53544      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
53545
53546  windows_path="$CYGWIN_VC_INSTALL_DIR"
53547  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53548    unix_path=`$CYGPATH -u "$windows_path"`
53549    CYGWIN_VC_INSTALL_DIR="$unix_path"
53550  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53551    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53552    CYGWIN_VC_INSTALL_DIR="$unix_path"
53553  fi
53554
53555      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53556        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53557      else
53558        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53559      fi
53560      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
53561
53562  DLL_NAME="$DLL_NAME"
53563  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53564  METHOD="well-known location in VCINSTALLDIR"
53565  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53566    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53567$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53568
53569    # Need to check if the found msvcr is correct architecture
53570    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53571$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53572    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53573    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53574      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53575      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53576      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53577        CORRECT_MSVCR_ARCH="PE32 executable"
53578      else
53579        CORRECT_MSVCR_ARCH="PE32+ executable"
53580      fi
53581    else
53582      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53583        CORRECT_MSVCR_ARCH=386
53584      else
53585        CORRECT_MSVCR_ARCH=x86-64
53586      fi
53587    fi
53588    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53589      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53590$as_echo "ok" >&6; }
53591      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53592
53593  # Only process if variable expands to non-empty
53594
53595  if test "x$MSVC_DLL" != x; then
53596    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53597
53598  # Input might be given as Windows format, start by converting to
53599  # unix format.
53600  path="$MSVC_DLL"
53601  new_path=`$CYGPATH -u "$path"`
53602
53603  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53604  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53605  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53606  # "foo.exe" is OK but "foo" is an error.
53607  #
53608  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53609  # It is also a way to make sure we got the proper file name for the real test later on.
53610  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53611  if test "x$test_shortpath" = x; then
53612    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53613$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53614    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53615  fi
53616
53617  # Call helper function which possibly converts this using DOS-style short mode.
53618  # If so, the updated path is stored in $new_path.
53619
53620  input_path="$new_path"
53621  # Check if we need to convert this using DOS-style short mode. If the path
53622  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53623  # take no chances and rewrite it.
53624  # Note: m4 eats our [], so we need to use [ and ] instead.
53625  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53626  if test "x$has_forbidden_chars" != x; then
53627    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53628    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53629    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53630    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53631      # Going to short mode and back again did indeed matter. Since short mode is
53632      # case insensitive, let's make it lowercase to improve readability.
53633      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53634      # Now convert it back to Unix-style (cygpath)
53635      input_path=`$CYGPATH -u "$shortmode_path"`
53636      new_path="$input_path"
53637    fi
53638  fi
53639
53640  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53641  if test "x$test_cygdrive_prefix" = x; then
53642    # As a simple fix, exclude /usr/bin since it's not a real path.
53643    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53644      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53645      # a path prefixed by /cygdrive for fixpath to work.
53646      new_path="$CYGWIN_ROOT_PATH$input_path"
53647    fi
53648  fi
53649
53650
53651  if test "x$path" != "x$new_path"; then
53652    MSVC_DLL="$new_path"
53653    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53654$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53655  fi
53656
53657    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53658
53659  path="$MSVC_DLL"
53660  has_colon=`$ECHO $path | $GREP ^.:`
53661  new_path="$path"
53662  if test "x$has_colon" = x; then
53663    # Not in mixed or Windows style, start by that.
53664    new_path=`cmd //c echo $path`
53665  fi
53666
53667
53668  input_path="$new_path"
53669  # Check if we need to convert this using DOS-style short mode. If the path
53670  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53671  # take no chances and rewrite it.
53672  # Note: m4 eats our [], so we need to use [ and ] instead.
53673  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53674  if test "x$has_forbidden_chars" != x; then
53675    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53676    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53677  fi
53678
53679
53680  windows_path="$new_path"
53681  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53682    unix_path=`$CYGPATH -u "$windows_path"`
53683    new_path="$unix_path"
53684  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53685    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53686    new_path="$unix_path"
53687  fi
53688
53689  if test "x$path" != "x$new_path"; then
53690    MSVC_DLL="$new_path"
53691    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53692$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53693  fi
53694
53695  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53696  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53697
53698    else
53699      # We're on a unix platform. Hooray! :)
53700      path="$MSVC_DLL"
53701      has_space=`$ECHO "$path" | $GREP " "`
53702      if test "x$has_space" != x; then
53703        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53704$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53705        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53706      fi
53707
53708      # Use eval to expand a potential ~
53709      eval path="$path"
53710      if test ! -f "$path" && test ! -d "$path"; then
53711        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53712      fi
53713
53714      if test -d "$path"; then
53715        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53716      else
53717        dir="`$DIRNAME "$path"`"
53718        base="`$BASENAME "$path"`"
53719        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53720      fi
53721    fi
53722  fi
53723
53724      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53725$as_echo_n "checking for $DLL_NAME... " >&6; }
53726      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53727$as_echo "$MSVC_DLL" >&6; }
53728    else
53729      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53730$as_echo "incorrect, ignoring" >&6; }
53731      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53732$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53733    fi
53734  fi
53735
53736    fi
53737  fi
53738
53739  if test "x$MSVC_DLL" = x; then
53740    # Probe: Check in the Boot JDK directory.
53741    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
53742
53743  DLL_NAME="$DLL_NAME"
53744  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53745  METHOD="well-known location in Boot JDK"
53746  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53747    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53748$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53749
53750    # Need to check if the found msvcr is correct architecture
53751    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53752$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53753    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53754    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53755      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53756      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53757      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53758        CORRECT_MSVCR_ARCH="PE32 executable"
53759      else
53760        CORRECT_MSVCR_ARCH="PE32+ executable"
53761      fi
53762    else
53763      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53764        CORRECT_MSVCR_ARCH=386
53765      else
53766        CORRECT_MSVCR_ARCH=x86-64
53767      fi
53768    fi
53769    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53770      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53771$as_echo "ok" >&6; }
53772      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53773
53774  # Only process if variable expands to non-empty
53775
53776  if test "x$MSVC_DLL" != x; then
53777    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53778
53779  # Input might be given as Windows format, start by converting to
53780  # unix format.
53781  path="$MSVC_DLL"
53782  new_path=`$CYGPATH -u "$path"`
53783
53784  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53785  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53786  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53787  # "foo.exe" is OK but "foo" is an error.
53788  #
53789  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53790  # It is also a way to make sure we got the proper file name for the real test later on.
53791  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53792  if test "x$test_shortpath" = x; then
53793    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53794$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53795    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53796  fi
53797
53798  # Call helper function which possibly converts this using DOS-style short mode.
53799  # If so, the updated path is stored in $new_path.
53800
53801  input_path="$new_path"
53802  # Check if we need to convert this using DOS-style short mode. If the path
53803  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53804  # take no chances and rewrite it.
53805  # Note: m4 eats our [], so we need to use [ and ] instead.
53806  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53807  if test "x$has_forbidden_chars" != x; then
53808    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53809    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53810    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53811    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53812      # Going to short mode and back again did indeed matter. Since short mode is
53813      # case insensitive, let's make it lowercase to improve readability.
53814      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53815      # Now convert it back to Unix-style (cygpath)
53816      input_path=`$CYGPATH -u "$shortmode_path"`
53817      new_path="$input_path"
53818    fi
53819  fi
53820
53821  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53822  if test "x$test_cygdrive_prefix" = x; then
53823    # As a simple fix, exclude /usr/bin since it's not a real path.
53824    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53825      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53826      # a path prefixed by /cygdrive for fixpath to work.
53827      new_path="$CYGWIN_ROOT_PATH$input_path"
53828    fi
53829  fi
53830
53831
53832  if test "x$path" != "x$new_path"; then
53833    MSVC_DLL="$new_path"
53834    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53835$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53836  fi
53837
53838    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53839
53840  path="$MSVC_DLL"
53841  has_colon=`$ECHO $path | $GREP ^.:`
53842  new_path="$path"
53843  if test "x$has_colon" = x; then
53844    # Not in mixed or Windows style, start by that.
53845    new_path=`cmd //c echo $path`
53846  fi
53847
53848
53849  input_path="$new_path"
53850  # Check if we need to convert this using DOS-style short mode. If the path
53851  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53852  # take no chances and rewrite it.
53853  # Note: m4 eats our [], so we need to use [ and ] instead.
53854  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53855  if test "x$has_forbidden_chars" != x; then
53856    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53857    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53858  fi
53859
53860
53861  windows_path="$new_path"
53862  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53863    unix_path=`$CYGPATH -u "$windows_path"`
53864    new_path="$unix_path"
53865  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53866    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53867    new_path="$unix_path"
53868  fi
53869
53870  if test "x$path" != "x$new_path"; then
53871    MSVC_DLL="$new_path"
53872    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53873$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53874  fi
53875
53876  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53877  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53878
53879    else
53880      # We're on a unix platform. Hooray! :)
53881      path="$MSVC_DLL"
53882      has_space=`$ECHO "$path" | $GREP " "`
53883      if test "x$has_space" != x; then
53884        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53885$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53886        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53887      fi
53888
53889      # Use eval to expand a potential ~
53890      eval path="$path"
53891      if test ! -f "$path" && test ! -d "$path"; then
53892        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53893      fi
53894
53895      if test -d "$path"; then
53896        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53897      else
53898        dir="`$DIRNAME "$path"`"
53899        base="`$BASENAME "$path"`"
53900        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53901      fi
53902    fi
53903  fi
53904
53905      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53906$as_echo_n "checking for $DLL_NAME... " >&6; }
53907      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53908$as_echo "$MSVC_DLL" >&6; }
53909    else
53910      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53911$as_echo "incorrect, ignoring" >&6; }
53912      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53913$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53914    fi
53915  fi
53916
53917  fi
53918
53919  if test "x$MSVC_DLL" = x; then
53920    # Probe: Look in the Windows system32 directory
53921    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
53922
53923  windows_path="$CYGWIN_SYSTEMROOT"
53924  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53925    unix_path=`$CYGPATH -u "$windows_path"`
53926    CYGWIN_SYSTEMROOT="$unix_path"
53927  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53928    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53929    CYGWIN_SYSTEMROOT="$unix_path"
53930  fi
53931
53932    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
53933
53934  DLL_NAME="$DLL_NAME"
53935  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53936  METHOD="well-known location in SYSTEMROOT"
53937  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53938    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53939$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53940
53941    # Need to check if the found msvcr is correct architecture
53942    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53943$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53944    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53945    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53946      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53947      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53948      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53949        CORRECT_MSVCR_ARCH="PE32 executable"
53950      else
53951        CORRECT_MSVCR_ARCH="PE32+ executable"
53952      fi
53953    else
53954      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53955        CORRECT_MSVCR_ARCH=386
53956      else
53957        CORRECT_MSVCR_ARCH=x86-64
53958      fi
53959    fi
53960    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53961      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53962$as_echo "ok" >&6; }
53963      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53964
53965  # Only process if variable expands to non-empty
53966
53967  if test "x$MSVC_DLL" != x; then
53968    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53969
53970  # Input might be given as Windows format, start by converting to
53971  # unix format.
53972  path="$MSVC_DLL"
53973  new_path=`$CYGPATH -u "$path"`
53974
53975  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53976  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53977  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53978  # "foo.exe" is OK but "foo" is an error.
53979  #
53980  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53981  # It is also a way to make sure we got the proper file name for the real test later on.
53982  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53983  if test "x$test_shortpath" = x; then
53984    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53985$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53986    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53987  fi
53988
53989  # Call helper function which possibly converts this using DOS-style short mode.
53990  # If so, the updated path is stored in $new_path.
53991
53992  input_path="$new_path"
53993  # Check if we need to convert this using DOS-style short mode. If the path
53994  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53995  # take no chances and rewrite it.
53996  # Note: m4 eats our [], so we need to use [ and ] instead.
53997  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53998  if test "x$has_forbidden_chars" != x; then
53999    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54000    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54001    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54002    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54003      # Going to short mode and back again did indeed matter. Since short mode is
54004      # case insensitive, let's make it lowercase to improve readability.
54005      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54006      # Now convert it back to Unix-style (cygpath)
54007      input_path=`$CYGPATH -u "$shortmode_path"`
54008      new_path="$input_path"
54009    fi
54010  fi
54011
54012  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54013  if test "x$test_cygdrive_prefix" = x; then
54014    # As a simple fix, exclude /usr/bin since it's not a real path.
54015    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54016      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54017      # a path prefixed by /cygdrive for fixpath to work.
54018      new_path="$CYGWIN_ROOT_PATH$input_path"
54019    fi
54020  fi
54021
54022
54023  if test "x$path" != "x$new_path"; then
54024    MSVC_DLL="$new_path"
54025    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54026$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54027  fi
54028
54029    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54030
54031  path="$MSVC_DLL"
54032  has_colon=`$ECHO $path | $GREP ^.:`
54033  new_path="$path"
54034  if test "x$has_colon" = x; then
54035    # Not in mixed or Windows style, start by that.
54036    new_path=`cmd //c echo $path`
54037  fi
54038
54039
54040  input_path="$new_path"
54041  # Check if we need to convert this using DOS-style short mode. If the path
54042  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54043  # take no chances and rewrite it.
54044  # Note: m4 eats our [], so we need to use [ and ] instead.
54045  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54046  if test "x$has_forbidden_chars" != x; then
54047    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54048    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54049  fi
54050
54051
54052  windows_path="$new_path"
54053  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54054    unix_path=`$CYGPATH -u "$windows_path"`
54055    new_path="$unix_path"
54056  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54057    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54058    new_path="$unix_path"
54059  fi
54060
54061  if test "x$path" != "x$new_path"; then
54062    MSVC_DLL="$new_path"
54063    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54064$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54065  fi
54066
54067  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54068  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54069
54070    else
54071      # We're on a unix platform. Hooray! :)
54072      path="$MSVC_DLL"
54073      has_space=`$ECHO "$path" | $GREP " "`
54074      if test "x$has_space" != x; then
54075        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54076$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54077        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54078      fi
54079
54080      # Use eval to expand a potential ~
54081      eval path="$path"
54082      if test ! -f "$path" && test ! -d "$path"; then
54083        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54084      fi
54085
54086      if test -d "$path"; then
54087        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54088      else
54089        dir="`$DIRNAME "$path"`"
54090        base="`$BASENAME "$path"`"
54091        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54092      fi
54093    fi
54094  fi
54095
54096      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54097$as_echo_n "checking for $DLL_NAME... " >&6; }
54098      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54099$as_echo "$MSVC_DLL" >&6; }
54100    else
54101      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54102$as_echo "incorrect, ignoring" >&6; }
54103      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54104$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54105    fi
54106  fi
54107
54108  fi
54109
54110  if test "x$MSVC_DLL" = x; then
54111    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
54112    if test "x$VS100COMNTOOLS" != x; then
54113      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
54114
54115  windows_path="$CYGWIN_VS_TOOLS_DIR"
54116  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54117    unix_path=`$CYGPATH -u "$windows_path"`
54118    CYGWIN_VS_TOOLS_DIR="$unix_path"
54119  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54120    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54121    CYGWIN_VS_TOOLS_DIR="$unix_path"
54122  fi
54123
54124      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54125        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54126	    | $GREP -i /x64/ | $HEAD --lines 1`
54127      else
54128        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54129	    | $GREP -i /x86/ | $HEAD --lines 1`
54130      fi
54131
54132  DLL_NAME="$DLL_NAME"
54133  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54134  METHOD="search of VS100COMNTOOLS"
54135  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54136    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54137$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54138
54139    # Need to check if the found msvcr is correct architecture
54140    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54141$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54142    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54143    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54144      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54145      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54146      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54147        CORRECT_MSVCR_ARCH="PE32 executable"
54148      else
54149        CORRECT_MSVCR_ARCH="PE32+ executable"
54150      fi
54151    else
54152      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54153        CORRECT_MSVCR_ARCH=386
54154      else
54155        CORRECT_MSVCR_ARCH=x86-64
54156      fi
54157    fi
54158    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54159      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54160$as_echo "ok" >&6; }
54161      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54162
54163  # Only process if variable expands to non-empty
54164
54165  if test "x$MSVC_DLL" != x; then
54166    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54167
54168  # Input might be given as Windows format, start by converting to
54169  # unix format.
54170  path="$MSVC_DLL"
54171  new_path=`$CYGPATH -u "$path"`
54172
54173  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54174  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54175  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54176  # "foo.exe" is OK but "foo" is an error.
54177  #
54178  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54179  # It is also a way to make sure we got the proper file name for the real test later on.
54180  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54181  if test "x$test_shortpath" = x; then
54182    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54183$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54184    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54185  fi
54186
54187  # Call helper function which possibly converts this using DOS-style short mode.
54188  # If so, the updated path is stored in $new_path.
54189
54190  input_path="$new_path"
54191  # Check if we need to convert this using DOS-style short mode. If the path
54192  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54193  # take no chances and rewrite it.
54194  # Note: m4 eats our [], so we need to use [ and ] instead.
54195  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54196  if test "x$has_forbidden_chars" != x; then
54197    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54198    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54199    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54200    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54201      # Going to short mode and back again did indeed matter. Since short mode is
54202      # case insensitive, let's make it lowercase to improve readability.
54203      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54204      # Now convert it back to Unix-style (cygpath)
54205      input_path=`$CYGPATH -u "$shortmode_path"`
54206      new_path="$input_path"
54207    fi
54208  fi
54209
54210  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54211  if test "x$test_cygdrive_prefix" = x; then
54212    # As a simple fix, exclude /usr/bin since it's not a real path.
54213    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54214      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54215      # a path prefixed by /cygdrive for fixpath to work.
54216      new_path="$CYGWIN_ROOT_PATH$input_path"
54217    fi
54218  fi
54219
54220
54221  if test "x$path" != "x$new_path"; then
54222    MSVC_DLL="$new_path"
54223    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54224$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54225  fi
54226
54227    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54228
54229  path="$MSVC_DLL"
54230  has_colon=`$ECHO $path | $GREP ^.:`
54231  new_path="$path"
54232  if test "x$has_colon" = x; then
54233    # Not in mixed or Windows style, start by that.
54234    new_path=`cmd //c echo $path`
54235  fi
54236
54237
54238  input_path="$new_path"
54239  # Check if we need to convert this using DOS-style short mode. If the path
54240  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54241  # take no chances and rewrite it.
54242  # Note: m4 eats our [], so we need to use [ and ] instead.
54243  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54244  if test "x$has_forbidden_chars" != x; then
54245    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54246    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54247  fi
54248
54249
54250  windows_path="$new_path"
54251  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54252    unix_path=`$CYGPATH -u "$windows_path"`
54253    new_path="$unix_path"
54254  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54255    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54256    new_path="$unix_path"
54257  fi
54258
54259  if test "x$path" != "x$new_path"; then
54260    MSVC_DLL="$new_path"
54261    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54262$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54263  fi
54264
54265  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54266  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54267
54268    else
54269      # We're on a unix platform. Hooray! :)
54270      path="$MSVC_DLL"
54271      has_space=`$ECHO "$path" | $GREP " "`
54272      if test "x$has_space" != x; then
54273        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54274$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54275        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54276      fi
54277
54278      # Use eval to expand a potential ~
54279      eval path="$path"
54280      if test ! -f "$path" && test ! -d "$path"; then
54281        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54282      fi
54283
54284      if test -d "$path"; then
54285        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54286      else
54287        dir="`$DIRNAME "$path"`"
54288        base="`$BASENAME "$path"`"
54289        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54290      fi
54291    fi
54292  fi
54293
54294      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54295$as_echo_n "checking for $DLL_NAME... " >&6; }
54296      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54297$as_echo "$MSVC_DLL" >&6; }
54298    else
54299      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54300$as_echo "incorrect, ignoring" >&6; }
54301      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54302$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54303    fi
54304  fi
54305
54306    fi
54307  fi
54308
54309  if test "x$MSVC_DLL" = x; then
54310    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
54311    # (This was the original behaviour; kept since it might turn something up)
54312    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
54313      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54314        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54315	    | $GREP x64 | $HEAD --lines 1`
54316      else
54317        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54318	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
54319        if test "x$POSSIBLE_MSVC_DLL" = x; then
54320          # We're grasping at straws now...
54321          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54322	      | $HEAD --lines 1`
54323        fi
54324      fi
54325
54326
54327  DLL_NAME="$DLL_NAME"
54328  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54329  METHOD="search of VCINSTALLDIR"
54330  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54331    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54332$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54333
54334    # Need to check if the found msvcr is correct architecture
54335    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54336$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54337    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54338    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54339      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54340      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54341      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54342        CORRECT_MSVCR_ARCH="PE32 executable"
54343      else
54344        CORRECT_MSVCR_ARCH="PE32+ executable"
54345      fi
54346    else
54347      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54348        CORRECT_MSVCR_ARCH=386
54349      else
54350        CORRECT_MSVCR_ARCH=x86-64
54351      fi
54352    fi
54353    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54354      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54355$as_echo "ok" >&6; }
54356      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54357
54358  # Only process if variable expands to non-empty
54359
54360  if test "x$MSVC_DLL" != x; then
54361    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54362
54363  # Input might be given as Windows format, start by converting to
54364  # unix format.
54365  path="$MSVC_DLL"
54366  new_path=`$CYGPATH -u "$path"`
54367
54368  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54369  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54370  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54371  # "foo.exe" is OK but "foo" is an error.
54372  #
54373  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54374  # It is also a way to make sure we got the proper file name for the real test later on.
54375  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54376  if test "x$test_shortpath" = x; then
54377    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54378$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54379    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54380  fi
54381
54382  # Call helper function which possibly converts this using DOS-style short mode.
54383  # If so, the updated path is stored in $new_path.
54384
54385  input_path="$new_path"
54386  # Check if we need to convert this using DOS-style short mode. If the path
54387  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54388  # take no chances and rewrite it.
54389  # Note: m4 eats our [], so we need to use [ and ] instead.
54390  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54391  if test "x$has_forbidden_chars" != x; then
54392    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54393    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54394    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54395    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54396      # Going to short mode and back again did indeed matter. Since short mode is
54397      # case insensitive, let's make it lowercase to improve readability.
54398      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54399      # Now convert it back to Unix-style (cygpath)
54400      input_path=`$CYGPATH -u "$shortmode_path"`
54401      new_path="$input_path"
54402    fi
54403  fi
54404
54405  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54406  if test "x$test_cygdrive_prefix" = x; then
54407    # As a simple fix, exclude /usr/bin since it's not a real path.
54408    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54409      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54410      # a path prefixed by /cygdrive for fixpath to work.
54411      new_path="$CYGWIN_ROOT_PATH$input_path"
54412    fi
54413  fi
54414
54415
54416  if test "x$path" != "x$new_path"; then
54417    MSVC_DLL="$new_path"
54418    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54419$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54420  fi
54421
54422    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54423
54424  path="$MSVC_DLL"
54425  has_colon=`$ECHO $path | $GREP ^.:`
54426  new_path="$path"
54427  if test "x$has_colon" = x; then
54428    # Not in mixed or Windows style, start by that.
54429    new_path=`cmd //c echo $path`
54430  fi
54431
54432
54433  input_path="$new_path"
54434  # Check if we need to convert this using DOS-style short mode. If the path
54435  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54436  # take no chances and rewrite it.
54437  # Note: m4 eats our [], so we need to use [ and ] instead.
54438  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54439  if test "x$has_forbidden_chars" != x; then
54440    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54441    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54442  fi
54443
54444
54445  windows_path="$new_path"
54446  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54447    unix_path=`$CYGPATH -u "$windows_path"`
54448    new_path="$unix_path"
54449  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54450    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54451    new_path="$unix_path"
54452  fi
54453
54454  if test "x$path" != "x$new_path"; then
54455    MSVC_DLL="$new_path"
54456    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54457$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54458  fi
54459
54460  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54461  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54462
54463    else
54464      # We're on a unix platform. Hooray! :)
54465      path="$MSVC_DLL"
54466      has_space=`$ECHO "$path" | $GREP " "`
54467      if test "x$has_space" != x; then
54468        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54469$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54470        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54471      fi
54472
54473      # Use eval to expand a potential ~
54474      eval path="$path"
54475      if test ! -f "$path" && test ! -d "$path"; then
54476        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54477      fi
54478
54479      if test -d "$path"; then
54480        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54481      else
54482        dir="`$DIRNAME "$path"`"
54483        base="`$BASENAME "$path"`"
54484        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54485      fi
54486    fi
54487  fi
54488
54489      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54490$as_echo_n "checking for $DLL_NAME... " >&6; }
54491      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54492$as_echo "$MSVC_DLL" >&6; }
54493    else
54494      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54495$as_echo "incorrect, ignoring" >&6; }
54496      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54497$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54498    fi
54499  fi
54500
54501    fi
54502  fi
54503
54504  if test "x$MSVC_DLL" = x; then
54505    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54506$as_echo_n "checking for $DLL_NAME... " >&6; }
54507    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54508$as_echo "no" >&6; }
54509    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
54510  fi
54511
54512    MSVCR_DLL="$MSVC_DLL"
54513  fi
54514
54515
54516
54517# Check whether --with-msvcp-dll was given.
54518if test "${with_msvcp_dll+set}" = set; then :
54519  withval=$with_msvcp_dll;
54520fi
54521
54522
54523  if test "x$MSVCP_NAME" != "x"; then
54524    if test "x$with_msvcp_dll" != x; then
54525      # If given explicitely by user, do not probe. If not present, fail directly.
54526
54527  DLL_NAME="$MSVCP_NAME"
54528  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
54529  METHOD="--with-msvcp-dll"
54530  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54531    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54532$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54533
54534    # Need to check if the found msvcr is correct architecture
54535    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54536$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54537    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54538    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54539      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54540      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54541      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54542        CORRECT_MSVCR_ARCH="PE32 executable"
54543      else
54544        CORRECT_MSVCR_ARCH="PE32+ executable"
54545      fi
54546    else
54547      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54548        CORRECT_MSVCR_ARCH=386
54549      else
54550        CORRECT_MSVCR_ARCH=x86-64
54551      fi
54552    fi
54553    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54554      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54555$as_echo "ok" >&6; }
54556      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54557
54558  # Only process if variable expands to non-empty
54559
54560  if test "x$MSVC_DLL" != x; then
54561    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54562
54563  # Input might be given as Windows format, start by converting to
54564  # unix format.
54565  path="$MSVC_DLL"
54566  new_path=`$CYGPATH -u "$path"`
54567
54568  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54569  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54570  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54571  # "foo.exe" is OK but "foo" is an error.
54572  #
54573  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54574  # It is also a way to make sure we got the proper file name for the real test later on.
54575  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54576  if test "x$test_shortpath" = x; then
54577    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54578$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54579    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54580  fi
54581
54582  # Call helper function which possibly converts this using DOS-style short mode.
54583  # If so, the updated path is stored in $new_path.
54584
54585  input_path="$new_path"
54586  # Check if we need to convert this using DOS-style short mode. If the path
54587  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54588  # take no chances and rewrite it.
54589  # Note: m4 eats our [], so we need to use [ and ] instead.
54590  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54591  if test "x$has_forbidden_chars" != x; then
54592    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54593    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54594    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54595    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54596      # Going to short mode and back again did indeed matter. Since short mode is
54597      # case insensitive, let's make it lowercase to improve readability.
54598      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54599      # Now convert it back to Unix-style (cygpath)
54600      input_path=`$CYGPATH -u "$shortmode_path"`
54601      new_path="$input_path"
54602    fi
54603  fi
54604
54605  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54606  if test "x$test_cygdrive_prefix" = x; then
54607    # As a simple fix, exclude /usr/bin since it's not a real path.
54608    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54609      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54610      # a path prefixed by /cygdrive for fixpath to work.
54611      new_path="$CYGWIN_ROOT_PATH$input_path"
54612    fi
54613  fi
54614
54615
54616  if test "x$path" != "x$new_path"; then
54617    MSVC_DLL="$new_path"
54618    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54619$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54620  fi
54621
54622    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54623
54624  path="$MSVC_DLL"
54625  has_colon=`$ECHO $path | $GREP ^.:`
54626  new_path="$path"
54627  if test "x$has_colon" = x; then
54628    # Not in mixed or Windows style, start by that.
54629    new_path=`cmd //c echo $path`
54630  fi
54631
54632
54633  input_path="$new_path"
54634  # Check if we need to convert this using DOS-style short mode. If the path
54635  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54636  # take no chances and rewrite it.
54637  # Note: m4 eats our [], so we need to use [ and ] instead.
54638  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54639  if test "x$has_forbidden_chars" != x; then
54640    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54641    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54642  fi
54643
54644
54645  windows_path="$new_path"
54646  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54647    unix_path=`$CYGPATH -u "$windows_path"`
54648    new_path="$unix_path"
54649  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54650    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54651    new_path="$unix_path"
54652  fi
54653
54654  if test "x$path" != "x$new_path"; then
54655    MSVC_DLL="$new_path"
54656    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54657$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54658  fi
54659
54660  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54661  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54662
54663    else
54664      # We're on a unix platform. Hooray! :)
54665      path="$MSVC_DLL"
54666      has_space=`$ECHO "$path" | $GREP " "`
54667      if test "x$has_space" != x; then
54668        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54669$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54670        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54671      fi
54672
54673      # Use eval to expand a potential ~
54674      eval path="$path"
54675      if test ! -f "$path" && test ! -d "$path"; then
54676        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54677      fi
54678
54679      if test -d "$path"; then
54680        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54681      else
54682        dir="`$DIRNAME "$path"`"
54683        base="`$BASENAME "$path"`"
54684        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54685      fi
54686    fi
54687  fi
54688
54689      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54690$as_echo_n "checking for $DLL_NAME... " >&6; }
54691      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54692$as_echo "$MSVC_DLL" >&6; }
54693    else
54694      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54695$as_echo "incorrect, ignoring" >&6; }
54696      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54697$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54698    fi
54699  fi
54700
54701      if test "x$MSVC_DLL" = x; then
54702        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
54703      fi
54704      MSVCP_DLL="$MSVC_DLL"
54705    elif test "x$DEVKIT_MSVCP_DLL" != x; then
54706
54707  DLL_NAME="$MSVCP_NAME"
54708  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
54709  METHOD="devkit"
54710  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54711    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54712$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54713
54714    # Need to check if the found msvcr is correct architecture
54715    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54716$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54717    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54718    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54719      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54720      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54721      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54722        CORRECT_MSVCR_ARCH="PE32 executable"
54723      else
54724        CORRECT_MSVCR_ARCH="PE32+ executable"
54725      fi
54726    else
54727      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54728        CORRECT_MSVCR_ARCH=386
54729      else
54730        CORRECT_MSVCR_ARCH=x86-64
54731      fi
54732    fi
54733    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54734      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54735$as_echo "ok" >&6; }
54736      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54737
54738  # Only process if variable expands to non-empty
54739
54740  if test "x$MSVC_DLL" != x; then
54741    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54742
54743  # Input might be given as Windows format, start by converting to
54744  # unix format.
54745  path="$MSVC_DLL"
54746  new_path=`$CYGPATH -u "$path"`
54747
54748  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54749  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54750  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54751  # "foo.exe" is OK but "foo" is an error.
54752  #
54753  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54754  # It is also a way to make sure we got the proper file name for the real test later on.
54755  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54756  if test "x$test_shortpath" = x; then
54757    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54758$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54759    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54760  fi
54761
54762  # Call helper function which possibly converts this using DOS-style short mode.
54763  # If so, the updated path is stored in $new_path.
54764
54765  input_path="$new_path"
54766  # Check if we need to convert this using DOS-style short mode. If the path
54767  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54768  # take no chances and rewrite it.
54769  # Note: m4 eats our [], so we need to use [ and ] instead.
54770  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54771  if test "x$has_forbidden_chars" != x; then
54772    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54773    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54774    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54775    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54776      # Going to short mode and back again did indeed matter. Since short mode is
54777      # case insensitive, let's make it lowercase to improve readability.
54778      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54779      # Now convert it back to Unix-style (cygpath)
54780      input_path=`$CYGPATH -u "$shortmode_path"`
54781      new_path="$input_path"
54782    fi
54783  fi
54784
54785  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54786  if test "x$test_cygdrive_prefix" = x; then
54787    # As a simple fix, exclude /usr/bin since it's not a real path.
54788    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54789      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54790      # a path prefixed by /cygdrive for fixpath to work.
54791      new_path="$CYGWIN_ROOT_PATH$input_path"
54792    fi
54793  fi
54794
54795
54796  if test "x$path" != "x$new_path"; then
54797    MSVC_DLL="$new_path"
54798    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54799$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54800  fi
54801
54802    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54803
54804  path="$MSVC_DLL"
54805  has_colon=`$ECHO $path | $GREP ^.:`
54806  new_path="$path"
54807  if test "x$has_colon" = x; then
54808    # Not in mixed or Windows style, start by that.
54809    new_path=`cmd //c echo $path`
54810  fi
54811
54812
54813  input_path="$new_path"
54814  # Check if we need to convert this using DOS-style short mode. If the path
54815  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54816  # take no chances and rewrite it.
54817  # Note: m4 eats our [], so we need to use [ and ] instead.
54818  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54819  if test "x$has_forbidden_chars" != x; then
54820    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54821    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54822  fi
54823
54824
54825  windows_path="$new_path"
54826  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54827    unix_path=`$CYGPATH -u "$windows_path"`
54828    new_path="$unix_path"
54829  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54830    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54831    new_path="$unix_path"
54832  fi
54833
54834  if test "x$path" != "x$new_path"; then
54835    MSVC_DLL="$new_path"
54836    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54837$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54838  fi
54839
54840  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54841  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54842
54843    else
54844      # We're on a unix platform. Hooray! :)
54845      path="$MSVC_DLL"
54846      has_space=`$ECHO "$path" | $GREP " "`
54847      if test "x$has_space" != x; then
54848        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54849$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54850        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54851      fi
54852
54853      # Use eval to expand a potential ~
54854      eval path="$path"
54855      if test ! -f "$path" && test ! -d "$path"; then
54856        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54857      fi
54858
54859      if test -d "$path"; then
54860        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54861      else
54862        dir="`$DIRNAME "$path"`"
54863        base="`$BASENAME "$path"`"
54864        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54865      fi
54866    fi
54867  fi
54868
54869      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54870$as_echo_n "checking for $DLL_NAME... " >&6; }
54871      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54872$as_echo "$MSVC_DLL" >&6; }
54873    else
54874      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54875$as_echo "incorrect, ignoring" >&6; }
54876      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54877$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54878    fi
54879  fi
54880
54881      if test "x$MSVC_DLL" = x; then
54882        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
54883      fi
54884      MSVCP_DLL="$MSVC_DLL"
54885    else
54886
54887  DLL_NAME="${MSVCP_NAME}"
54888  MSVC_DLL=
54889
54890  if test "x$MSVC_DLL" = x; then
54891    # Probe: Using well-known location from Visual Studio 10.0
54892    if test "x$VCINSTALLDIR" != x; then
54893      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
54894
54895  windows_path="$CYGWIN_VC_INSTALL_DIR"
54896  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54897    unix_path=`$CYGPATH -u "$windows_path"`
54898    CYGWIN_VC_INSTALL_DIR="$unix_path"
54899  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54900    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54901    CYGWIN_VC_INSTALL_DIR="$unix_path"
54902  fi
54903
54904      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54905        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54906      else
54907        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54908      fi
54909      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
54910
54911  DLL_NAME="$DLL_NAME"
54912  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54913  METHOD="well-known location in VCINSTALLDIR"
54914  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54915    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54916$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54917
54918    # Need to check if the found msvcr is correct architecture
54919    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54920$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54921    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54922    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54923      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54924      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54925      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54926        CORRECT_MSVCR_ARCH="PE32 executable"
54927      else
54928        CORRECT_MSVCR_ARCH="PE32+ executable"
54929      fi
54930    else
54931      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54932        CORRECT_MSVCR_ARCH=386
54933      else
54934        CORRECT_MSVCR_ARCH=x86-64
54935      fi
54936    fi
54937    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54938      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54939$as_echo "ok" >&6; }
54940      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54941
54942  # Only process if variable expands to non-empty
54943
54944  if test "x$MSVC_DLL" != x; then
54945    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54946
54947  # Input might be given as Windows format, start by converting to
54948  # unix format.
54949  path="$MSVC_DLL"
54950  new_path=`$CYGPATH -u "$path"`
54951
54952  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54953  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54954  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54955  # "foo.exe" is OK but "foo" is an error.
54956  #
54957  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54958  # It is also a way to make sure we got the proper file name for the real test later on.
54959  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54960  if test "x$test_shortpath" = x; then
54961    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54962$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54963    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54964  fi
54965
54966  # Call helper function which possibly converts this using DOS-style short mode.
54967  # If so, the updated path is stored in $new_path.
54968
54969  input_path="$new_path"
54970  # Check if we need to convert this using DOS-style short mode. If the path
54971  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54972  # take no chances and rewrite it.
54973  # Note: m4 eats our [], so we need to use [ and ] instead.
54974  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54975  if test "x$has_forbidden_chars" != x; then
54976    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54977    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54978    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54979    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54980      # Going to short mode and back again did indeed matter. Since short mode is
54981      # case insensitive, let's make it lowercase to improve readability.
54982      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54983      # Now convert it back to Unix-style (cygpath)
54984      input_path=`$CYGPATH -u "$shortmode_path"`
54985      new_path="$input_path"
54986    fi
54987  fi
54988
54989  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54990  if test "x$test_cygdrive_prefix" = x; then
54991    # As a simple fix, exclude /usr/bin since it's not a real path.
54992    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54993      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54994      # a path prefixed by /cygdrive for fixpath to work.
54995      new_path="$CYGWIN_ROOT_PATH$input_path"
54996    fi
54997  fi
54998
54999
55000  if test "x$path" != "x$new_path"; then
55001    MSVC_DLL="$new_path"
55002    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55003$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55004  fi
55005
55006    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55007
55008  path="$MSVC_DLL"
55009  has_colon=`$ECHO $path | $GREP ^.:`
55010  new_path="$path"
55011  if test "x$has_colon" = x; then
55012    # Not in mixed or Windows style, start by that.
55013    new_path=`cmd //c echo $path`
55014  fi
55015
55016
55017  input_path="$new_path"
55018  # Check if we need to convert this using DOS-style short mode. If the path
55019  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55020  # take no chances and rewrite it.
55021  # Note: m4 eats our [], so we need to use [ and ] instead.
55022  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55023  if test "x$has_forbidden_chars" != x; then
55024    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55025    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55026  fi
55027
55028
55029  windows_path="$new_path"
55030  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55031    unix_path=`$CYGPATH -u "$windows_path"`
55032    new_path="$unix_path"
55033  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55034    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55035    new_path="$unix_path"
55036  fi
55037
55038  if test "x$path" != "x$new_path"; then
55039    MSVC_DLL="$new_path"
55040    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55041$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55042  fi
55043
55044  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55045  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55046
55047    else
55048      # We're on a unix platform. Hooray! :)
55049      path="$MSVC_DLL"
55050      has_space=`$ECHO "$path" | $GREP " "`
55051      if test "x$has_space" != x; then
55052        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55053$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55054        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55055      fi
55056
55057      # Use eval to expand a potential ~
55058      eval path="$path"
55059      if test ! -f "$path" && test ! -d "$path"; then
55060        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55061      fi
55062
55063      if test -d "$path"; then
55064        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55065      else
55066        dir="`$DIRNAME "$path"`"
55067        base="`$BASENAME "$path"`"
55068        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55069      fi
55070    fi
55071  fi
55072
55073      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55074$as_echo_n "checking for $DLL_NAME... " >&6; }
55075      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55076$as_echo "$MSVC_DLL" >&6; }
55077    else
55078      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55079$as_echo "incorrect, ignoring" >&6; }
55080      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55081$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55082    fi
55083  fi
55084
55085    fi
55086  fi
55087
55088  if test "x$MSVC_DLL" = x; then
55089    # Probe: Check in the Boot JDK directory.
55090    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
55091
55092  DLL_NAME="$DLL_NAME"
55093  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55094  METHOD="well-known location in Boot JDK"
55095  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55096    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55097$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55098
55099    # Need to check if the found msvcr is correct architecture
55100    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55101$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55102    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55103    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55104      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55105      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55106      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55107        CORRECT_MSVCR_ARCH="PE32 executable"
55108      else
55109        CORRECT_MSVCR_ARCH="PE32+ executable"
55110      fi
55111    else
55112      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55113        CORRECT_MSVCR_ARCH=386
55114      else
55115        CORRECT_MSVCR_ARCH=x86-64
55116      fi
55117    fi
55118    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55119      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55120$as_echo "ok" >&6; }
55121      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55122
55123  # Only process if variable expands to non-empty
55124
55125  if test "x$MSVC_DLL" != x; then
55126    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55127
55128  # Input might be given as Windows format, start by converting to
55129  # unix format.
55130  path="$MSVC_DLL"
55131  new_path=`$CYGPATH -u "$path"`
55132
55133  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55134  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55135  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55136  # "foo.exe" is OK but "foo" is an error.
55137  #
55138  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55139  # It is also a way to make sure we got the proper file name for the real test later on.
55140  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55141  if test "x$test_shortpath" = x; then
55142    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55143$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55144    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55145  fi
55146
55147  # Call helper function which possibly converts this using DOS-style short mode.
55148  # If so, the updated path is stored in $new_path.
55149
55150  input_path="$new_path"
55151  # Check if we need to convert this using DOS-style short mode. If the path
55152  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55153  # take no chances and rewrite it.
55154  # Note: m4 eats our [], so we need to use [ and ] instead.
55155  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55156  if test "x$has_forbidden_chars" != x; then
55157    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55158    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55159    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55160    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55161      # Going to short mode and back again did indeed matter. Since short mode is
55162      # case insensitive, let's make it lowercase to improve readability.
55163      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55164      # Now convert it back to Unix-style (cygpath)
55165      input_path=`$CYGPATH -u "$shortmode_path"`
55166      new_path="$input_path"
55167    fi
55168  fi
55169
55170  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55171  if test "x$test_cygdrive_prefix" = x; then
55172    # As a simple fix, exclude /usr/bin since it's not a real path.
55173    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55174      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55175      # a path prefixed by /cygdrive for fixpath to work.
55176      new_path="$CYGWIN_ROOT_PATH$input_path"
55177    fi
55178  fi
55179
55180
55181  if test "x$path" != "x$new_path"; then
55182    MSVC_DLL="$new_path"
55183    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55184$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55185  fi
55186
55187    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55188
55189  path="$MSVC_DLL"
55190  has_colon=`$ECHO $path | $GREP ^.:`
55191  new_path="$path"
55192  if test "x$has_colon" = x; then
55193    # Not in mixed or Windows style, start by that.
55194    new_path=`cmd //c echo $path`
55195  fi
55196
55197
55198  input_path="$new_path"
55199  # Check if we need to convert this using DOS-style short mode. If the path
55200  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55201  # take no chances and rewrite it.
55202  # Note: m4 eats our [], so we need to use [ and ] instead.
55203  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55204  if test "x$has_forbidden_chars" != x; then
55205    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55206    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55207  fi
55208
55209
55210  windows_path="$new_path"
55211  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55212    unix_path=`$CYGPATH -u "$windows_path"`
55213    new_path="$unix_path"
55214  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55215    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55216    new_path="$unix_path"
55217  fi
55218
55219  if test "x$path" != "x$new_path"; then
55220    MSVC_DLL="$new_path"
55221    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55222$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55223  fi
55224
55225  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55226  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55227
55228    else
55229      # We're on a unix platform. Hooray! :)
55230      path="$MSVC_DLL"
55231      has_space=`$ECHO "$path" | $GREP " "`
55232      if test "x$has_space" != x; then
55233        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55234$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55235        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55236      fi
55237
55238      # Use eval to expand a potential ~
55239      eval path="$path"
55240      if test ! -f "$path" && test ! -d "$path"; then
55241        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55242      fi
55243
55244      if test -d "$path"; then
55245        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55246      else
55247        dir="`$DIRNAME "$path"`"
55248        base="`$BASENAME "$path"`"
55249        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55250      fi
55251    fi
55252  fi
55253
55254      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55255$as_echo_n "checking for $DLL_NAME... " >&6; }
55256      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55257$as_echo "$MSVC_DLL" >&6; }
55258    else
55259      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55260$as_echo "incorrect, ignoring" >&6; }
55261      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55262$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55263    fi
55264  fi
55265
55266  fi
55267
55268  if test "x$MSVC_DLL" = x; then
55269    # Probe: Look in the Windows system32 directory
55270    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
55271
55272  windows_path="$CYGWIN_SYSTEMROOT"
55273  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55274    unix_path=`$CYGPATH -u "$windows_path"`
55275    CYGWIN_SYSTEMROOT="$unix_path"
55276  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55277    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55278    CYGWIN_SYSTEMROOT="$unix_path"
55279  fi
55280
55281    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
55282
55283  DLL_NAME="$DLL_NAME"
55284  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55285  METHOD="well-known location in SYSTEMROOT"
55286  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55287    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55288$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55289
55290    # Need to check if the found msvcr is correct architecture
55291    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55292$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55293    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55294    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55295      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55296      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55297      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55298        CORRECT_MSVCR_ARCH="PE32 executable"
55299      else
55300        CORRECT_MSVCR_ARCH="PE32+ executable"
55301      fi
55302    else
55303      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55304        CORRECT_MSVCR_ARCH=386
55305      else
55306        CORRECT_MSVCR_ARCH=x86-64
55307      fi
55308    fi
55309    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55310      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55311$as_echo "ok" >&6; }
55312      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55313
55314  # Only process if variable expands to non-empty
55315
55316  if test "x$MSVC_DLL" != x; then
55317    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55318
55319  # Input might be given as Windows format, start by converting to
55320  # unix format.
55321  path="$MSVC_DLL"
55322  new_path=`$CYGPATH -u "$path"`
55323
55324  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55325  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55326  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55327  # "foo.exe" is OK but "foo" is an error.
55328  #
55329  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55330  # It is also a way to make sure we got the proper file name for the real test later on.
55331  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55332  if test "x$test_shortpath" = x; then
55333    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55334$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55335    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55336  fi
55337
55338  # Call helper function which possibly converts this using DOS-style short mode.
55339  # If so, the updated path is stored in $new_path.
55340
55341  input_path="$new_path"
55342  # Check if we need to convert this using DOS-style short mode. If the path
55343  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55344  # take no chances and rewrite it.
55345  # Note: m4 eats our [], so we need to use [ and ] instead.
55346  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55347  if test "x$has_forbidden_chars" != x; then
55348    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55349    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55350    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55351    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55352      # Going to short mode and back again did indeed matter. Since short mode is
55353      # case insensitive, let's make it lowercase to improve readability.
55354      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55355      # Now convert it back to Unix-style (cygpath)
55356      input_path=`$CYGPATH -u "$shortmode_path"`
55357      new_path="$input_path"
55358    fi
55359  fi
55360
55361  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55362  if test "x$test_cygdrive_prefix" = x; then
55363    # As a simple fix, exclude /usr/bin since it's not a real path.
55364    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55365      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55366      # a path prefixed by /cygdrive for fixpath to work.
55367      new_path="$CYGWIN_ROOT_PATH$input_path"
55368    fi
55369  fi
55370
55371
55372  if test "x$path" != "x$new_path"; then
55373    MSVC_DLL="$new_path"
55374    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55375$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55376  fi
55377
55378    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55379
55380  path="$MSVC_DLL"
55381  has_colon=`$ECHO $path | $GREP ^.:`
55382  new_path="$path"
55383  if test "x$has_colon" = x; then
55384    # Not in mixed or Windows style, start by that.
55385    new_path=`cmd //c echo $path`
55386  fi
55387
55388
55389  input_path="$new_path"
55390  # Check if we need to convert this using DOS-style short mode. If the path
55391  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55392  # take no chances and rewrite it.
55393  # Note: m4 eats our [], so we need to use [ and ] instead.
55394  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55395  if test "x$has_forbidden_chars" != x; then
55396    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55397    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55398  fi
55399
55400
55401  windows_path="$new_path"
55402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55403    unix_path=`$CYGPATH -u "$windows_path"`
55404    new_path="$unix_path"
55405  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55406    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55407    new_path="$unix_path"
55408  fi
55409
55410  if test "x$path" != "x$new_path"; then
55411    MSVC_DLL="$new_path"
55412    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55413$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55414  fi
55415
55416  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55417  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55418
55419    else
55420      # We're on a unix platform. Hooray! :)
55421      path="$MSVC_DLL"
55422      has_space=`$ECHO "$path" | $GREP " "`
55423      if test "x$has_space" != x; then
55424        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55425$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55426        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55427      fi
55428
55429      # Use eval to expand a potential ~
55430      eval path="$path"
55431      if test ! -f "$path" && test ! -d "$path"; then
55432        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55433      fi
55434
55435      if test -d "$path"; then
55436        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55437      else
55438        dir="`$DIRNAME "$path"`"
55439        base="`$BASENAME "$path"`"
55440        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55441      fi
55442    fi
55443  fi
55444
55445      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55446$as_echo_n "checking for $DLL_NAME... " >&6; }
55447      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55448$as_echo "$MSVC_DLL" >&6; }
55449    else
55450      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55451$as_echo "incorrect, ignoring" >&6; }
55452      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55453$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55454    fi
55455  fi
55456
55457  fi
55458
55459  if test "x$MSVC_DLL" = x; then
55460    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
55461    if test "x$VS100COMNTOOLS" != x; then
55462      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
55463
55464  windows_path="$CYGWIN_VS_TOOLS_DIR"
55465  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55466    unix_path=`$CYGPATH -u "$windows_path"`
55467    CYGWIN_VS_TOOLS_DIR="$unix_path"
55468  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55469    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55470    CYGWIN_VS_TOOLS_DIR="$unix_path"
55471  fi
55472
55473      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55474        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55475	    | $GREP -i /x64/ | $HEAD --lines 1`
55476      else
55477        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55478	    | $GREP -i /x86/ | $HEAD --lines 1`
55479      fi
55480
55481  DLL_NAME="$DLL_NAME"
55482  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55483  METHOD="search of VS100COMNTOOLS"
55484  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55485    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55486$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55487
55488    # Need to check if the found msvcr is correct architecture
55489    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55490$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55491    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55492    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55493      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55494      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55495      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55496        CORRECT_MSVCR_ARCH="PE32 executable"
55497      else
55498        CORRECT_MSVCR_ARCH="PE32+ executable"
55499      fi
55500    else
55501      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55502        CORRECT_MSVCR_ARCH=386
55503      else
55504        CORRECT_MSVCR_ARCH=x86-64
55505      fi
55506    fi
55507    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55508      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55509$as_echo "ok" >&6; }
55510      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55511
55512  # Only process if variable expands to non-empty
55513
55514  if test "x$MSVC_DLL" != x; then
55515    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55516
55517  # Input might be given as Windows format, start by converting to
55518  # unix format.
55519  path="$MSVC_DLL"
55520  new_path=`$CYGPATH -u "$path"`
55521
55522  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55523  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55524  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55525  # "foo.exe" is OK but "foo" is an error.
55526  #
55527  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55528  # It is also a way to make sure we got the proper file name for the real test later on.
55529  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55530  if test "x$test_shortpath" = x; then
55531    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55532$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55533    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55534  fi
55535
55536  # Call helper function which possibly converts this using DOS-style short mode.
55537  # If so, the updated path is stored in $new_path.
55538
55539  input_path="$new_path"
55540  # Check if we need to convert this using DOS-style short mode. If the path
55541  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55542  # take no chances and rewrite it.
55543  # Note: m4 eats our [], so we need to use [ and ] instead.
55544  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55545  if test "x$has_forbidden_chars" != x; then
55546    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55547    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55548    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55549    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55550      # Going to short mode and back again did indeed matter. Since short mode is
55551      # case insensitive, let's make it lowercase to improve readability.
55552      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55553      # Now convert it back to Unix-style (cygpath)
55554      input_path=`$CYGPATH -u "$shortmode_path"`
55555      new_path="$input_path"
55556    fi
55557  fi
55558
55559  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55560  if test "x$test_cygdrive_prefix" = x; then
55561    # As a simple fix, exclude /usr/bin since it's not a real path.
55562    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55563      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55564      # a path prefixed by /cygdrive for fixpath to work.
55565      new_path="$CYGWIN_ROOT_PATH$input_path"
55566    fi
55567  fi
55568
55569
55570  if test "x$path" != "x$new_path"; then
55571    MSVC_DLL="$new_path"
55572    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55573$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55574  fi
55575
55576    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55577
55578  path="$MSVC_DLL"
55579  has_colon=`$ECHO $path | $GREP ^.:`
55580  new_path="$path"
55581  if test "x$has_colon" = x; then
55582    # Not in mixed or Windows style, start by that.
55583    new_path=`cmd //c echo $path`
55584  fi
55585
55586
55587  input_path="$new_path"
55588  # Check if we need to convert this using DOS-style short mode. If the path
55589  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55590  # take no chances and rewrite it.
55591  # Note: m4 eats our [], so we need to use [ and ] instead.
55592  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55593  if test "x$has_forbidden_chars" != x; then
55594    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55595    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55596  fi
55597
55598
55599  windows_path="$new_path"
55600  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55601    unix_path=`$CYGPATH -u "$windows_path"`
55602    new_path="$unix_path"
55603  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55604    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55605    new_path="$unix_path"
55606  fi
55607
55608  if test "x$path" != "x$new_path"; then
55609    MSVC_DLL="$new_path"
55610    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55611$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55612  fi
55613
55614  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55615  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55616
55617    else
55618      # We're on a unix platform. Hooray! :)
55619      path="$MSVC_DLL"
55620      has_space=`$ECHO "$path" | $GREP " "`
55621      if test "x$has_space" != x; then
55622        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55623$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55624        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55625      fi
55626
55627      # Use eval to expand a potential ~
55628      eval path="$path"
55629      if test ! -f "$path" && test ! -d "$path"; then
55630        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55631      fi
55632
55633      if test -d "$path"; then
55634        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55635      else
55636        dir="`$DIRNAME "$path"`"
55637        base="`$BASENAME "$path"`"
55638        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55639      fi
55640    fi
55641  fi
55642
55643      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55644$as_echo_n "checking for $DLL_NAME... " >&6; }
55645      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55646$as_echo "$MSVC_DLL" >&6; }
55647    else
55648      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55649$as_echo "incorrect, ignoring" >&6; }
55650      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55651$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55652    fi
55653  fi
55654
55655    fi
55656  fi
55657
55658  if test "x$MSVC_DLL" = x; then
55659    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
55660    # (This was the original behaviour; kept since it might turn something up)
55661    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
55662      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55663        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55664	    | $GREP x64 | $HEAD --lines 1`
55665      else
55666        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55667	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
55668        if test "x$POSSIBLE_MSVC_DLL" = x; then
55669          # We're grasping at straws now...
55670          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55671	      | $HEAD --lines 1`
55672        fi
55673      fi
55674
55675
55676  DLL_NAME="$DLL_NAME"
55677  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55678  METHOD="search of VCINSTALLDIR"
55679  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55680    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55681$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55682
55683    # Need to check if the found msvcr is correct architecture
55684    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55685$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55686    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55687    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55688      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55689      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55690      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55691        CORRECT_MSVCR_ARCH="PE32 executable"
55692      else
55693        CORRECT_MSVCR_ARCH="PE32+ executable"
55694      fi
55695    else
55696      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55697        CORRECT_MSVCR_ARCH=386
55698      else
55699        CORRECT_MSVCR_ARCH=x86-64
55700      fi
55701    fi
55702    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55703      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55704$as_echo "ok" >&6; }
55705      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55706
55707  # Only process if variable expands to non-empty
55708
55709  if test "x$MSVC_DLL" != x; then
55710    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55711
55712  # Input might be given as Windows format, start by converting to
55713  # unix format.
55714  path="$MSVC_DLL"
55715  new_path=`$CYGPATH -u "$path"`
55716
55717  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55718  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55719  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55720  # "foo.exe" is OK but "foo" is an error.
55721  #
55722  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55723  # It is also a way to make sure we got the proper file name for the real test later on.
55724  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55725  if test "x$test_shortpath" = x; then
55726    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55727$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55728    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55729  fi
55730
55731  # Call helper function which possibly converts this using DOS-style short mode.
55732  # If so, the updated path is stored in $new_path.
55733
55734  input_path="$new_path"
55735  # Check if we need to convert this using DOS-style short mode. If the path
55736  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55737  # take no chances and rewrite it.
55738  # Note: m4 eats our [], so we need to use [ and ] instead.
55739  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55740  if test "x$has_forbidden_chars" != x; then
55741    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55742    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55743    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55744    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55745      # Going to short mode and back again did indeed matter. Since short mode is
55746      # case insensitive, let's make it lowercase to improve readability.
55747      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55748      # Now convert it back to Unix-style (cygpath)
55749      input_path=`$CYGPATH -u "$shortmode_path"`
55750      new_path="$input_path"
55751    fi
55752  fi
55753
55754  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55755  if test "x$test_cygdrive_prefix" = x; then
55756    # As a simple fix, exclude /usr/bin since it's not a real path.
55757    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55758      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55759      # a path prefixed by /cygdrive for fixpath to work.
55760      new_path="$CYGWIN_ROOT_PATH$input_path"
55761    fi
55762  fi
55763
55764
55765  if test "x$path" != "x$new_path"; then
55766    MSVC_DLL="$new_path"
55767    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55768$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55769  fi
55770
55771    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55772
55773  path="$MSVC_DLL"
55774  has_colon=`$ECHO $path | $GREP ^.:`
55775  new_path="$path"
55776  if test "x$has_colon" = x; then
55777    # Not in mixed or Windows style, start by that.
55778    new_path=`cmd //c echo $path`
55779  fi
55780
55781
55782  input_path="$new_path"
55783  # Check if we need to convert this using DOS-style short mode. If the path
55784  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55785  # take no chances and rewrite it.
55786  # Note: m4 eats our [], so we need to use [ and ] instead.
55787  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55788  if test "x$has_forbidden_chars" != x; then
55789    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55790    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55791  fi
55792
55793
55794  windows_path="$new_path"
55795  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55796    unix_path=`$CYGPATH -u "$windows_path"`
55797    new_path="$unix_path"
55798  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55799    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55800    new_path="$unix_path"
55801  fi
55802
55803  if test "x$path" != "x$new_path"; then
55804    MSVC_DLL="$new_path"
55805    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55806$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55807  fi
55808
55809  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55810  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55811
55812    else
55813      # We're on a unix platform. Hooray! :)
55814      path="$MSVC_DLL"
55815      has_space=`$ECHO "$path" | $GREP " "`
55816      if test "x$has_space" != x; then
55817        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55818$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55819        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55820      fi
55821
55822      # Use eval to expand a potential ~
55823      eval path="$path"
55824      if test ! -f "$path" && test ! -d "$path"; then
55825        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55826      fi
55827
55828      if test -d "$path"; then
55829        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55830      else
55831        dir="`$DIRNAME "$path"`"
55832        base="`$BASENAME "$path"`"
55833        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55834      fi
55835    fi
55836  fi
55837
55838      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55839$as_echo_n "checking for $DLL_NAME... " >&6; }
55840      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55841$as_echo "$MSVC_DLL" >&6; }
55842    else
55843      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55844$as_echo "incorrect, ignoring" >&6; }
55845      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55846$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55847    fi
55848  fi
55849
55850    fi
55851  fi
55852
55853  if test "x$MSVC_DLL" = x; then
55854    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55855$as_echo_n "checking for $DLL_NAME... " >&6; }
55856    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55857$as_echo "no" >&6; }
55858    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
55859  fi
55860
55861      MSVCP_DLL="$MSVC_DLL"
55862    fi
55863
55864  fi
55865
55866  fi
55867
55868
55869  if test "x$NEEDS_LIB_X11" = xfalse; then
55870    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
55871      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
55872$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
55873    fi
55874    X_CFLAGS=
55875    X_LIBS=
55876  else
55877
55878    if test "x${with_x}" = xno; then
55879      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
55880    fi
55881
55882    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
55883      # The user has specified a X11 base directory. Use it for includes and
55884      # libraries, unless explicitely overridden.
55885      if test "x$x_includes" = xNONE; then
55886        x_includes="${with_x}/include"
55887      fi
55888      if test "x$x_libraries" = xNONE; then
55889        x_libraries="${with_x}/lib"
55890      fi
55891    else
55892      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
55893      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
55894      # --x-libraries for the sysroot, if that seems to be correct.
55895      if test "x$SYSROOT" != "x"; then
55896        if test "x$x_includes" = xNONE; then
55897          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
55898            x_includes="$SYSROOT/usr/X11R6/include"
55899          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
55900            x_includes="$SYSROOT/usr/include"
55901          fi
55902        fi
55903        if test "x$x_libraries" = xNONE; then
55904          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
55905            x_libraries="$SYSROOT/usr/X11R6/lib"
55906          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55907            x_libraries="$SYSROOT/usr/lib64"
55908          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
55909            x_libraries="$SYSROOT/usr/lib"
55910          fi
55911        fi
55912      fi
55913    fi
55914
55915    # Now let autoconf do it's magic
55916    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
55917$as_echo_n "checking for X... " >&6; }
55918
55919
55920# Check whether --with-x was given.
55921if test "${with_x+set}" = set; then :
55922  withval=$with_x;
55923fi
55924
55925# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
55926if test "x$with_x" = xno; then
55927  # The user explicitly disabled X.
55928  have_x=disabled
55929else
55930  case $x_includes,$x_libraries in #(
55931    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
55932    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
55933  $as_echo_n "(cached) " >&6
55934else
55935  # One or both of the vars are not set, and there is no cached value.
55936ac_x_includes=no ac_x_libraries=no
55937rm -f -r conftest.dir
55938if mkdir conftest.dir; then
55939  cd conftest.dir
55940  cat >Imakefile <<'_ACEOF'
55941incroot:
55942	@echo incroot='${INCROOT}'
55943usrlibdir:
55944	@echo usrlibdir='${USRLIBDIR}'
55945libdir:
55946	@echo libdir='${LIBDIR}'
55947_ACEOF
55948  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
55949    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
55950    for ac_var in incroot usrlibdir libdir; do
55951      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
55952    done
55953    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
55954    for ac_extension in a so sl dylib la dll; do
55955      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
55956	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
55957	ac_im_usrlibdir=$ac_im_libdir; break
55958      fi
55959    done
55960    # Screen out bogus values from the imake configuration.  They are
55961    # bogus both because they are the default anyway, and because
55962    # using them would break gcc on systems where it needs fixed includes.
55963    case $ac_im_incroot in
55964	/usr/include) ac_x_includes= ;;
55965	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
55966    esac
55967    case $ac_im_usrlibdir in
55968	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
55969	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
55970    esac
55971  fi
55972  cd ..
55973  rm -f -r conftest.dir
55974fi
55975
55976# Standard set of common directories for X headers.
55977# Check X11 before X11Rn because it is often a symlink to the current release.
55978ac_x_header_dirs='
55979/usr/X11/include
55980/usr/X11R7/include
55981/usr/X11R6/include
55982/usr/X11R5/include
55983/usr/X11R4/include
55984
55985/usr/include/X11
55986/usr/include/X11R7
55987/usr/include/X11R6
55988/usr/include/X11R5
55989/usr/include/X11R4
55990
55991/usr/local/X11/include
55992/usr/local/X11R7/include
55993/usr/local/X11R6/include
55994/usr/local/X11R5/include
55995/usr/local/X11R4/include
55996
55997/usr/local/include/X11
55998/usr/local/include/X11R7
55999/usr/local/include/X11R6
56000/usr/local/include/X11R5
56001/usr/local/include/X11R4
56002
56003/usr/X386/include
56004/usr/x386/include
56005/usr/XFree86/include/X11
56006
56007/usr/include
56008/usr/local/include
56009/usr/unsupported/include
56010/usr/athena/include
56011/usr/local/x11r5/include
56012/usr/lpp/Xamples/include
56013
56014/usr/openwin/include
56015/usr/openwin/share/include'
56016
56017if test "$ac_x_includes" = no; then
56018  # Guess where to find include files, by looking for Xlib.h.
56019  # First, try using that file with no special directory specified.
56020  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56021/* end confdefs.h.  */
56022#include <X11/Xlib.h>
56023_ACEOF
56024if ac_fn_cxx_try_cpp "$LINENO"; then :
56025  # We can compile using X headers with no special include directory.
56026ac_x_includes=
56027else
56028  for ac_dir in $ac_x_header_dirs; do
56029  if test -r "$ac_dir/X11/Xlib.h"; then
56030    ac_x_includes=$ac_dir
56031    break
56032  fi
56033done
56034fi
56035rm -f conftest.err conftest.i conftest.$ac_ext
56036fi # $ac_x_includes = no
56037
56038if test "$ac_x_libraries" = no; then
56039  # Check for the libraries.
56040  # See if we find them without any special options.
56041  # Don't add to $LIBS permanently.
56042  ac_save_LIBS=$LIBS
56043  LIBS="-lX11 $LIBS"
56044  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56045/* end confdefs.h.  */
56046#include <X11/Xlib.h>
56047int
56048main ()
56049{
56050XrmInitialize ()
56051  ;
56052  return 0;
56053}
56054_ACEOF
56055if ac_fn_cxx_try_link "$LINENO"; then :
56056  LIBS=$ac_save_LIBS
56057# We can link X programs with no special library path.
56058ac_x_libraries=
56059else
56060  LIBS=$ac_save_LIBS
56061for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
56062do
56063  # Don't even attempt the hair of trying to link an X program!
56064  for ac_extension in a so sl dylib la dll; do
56065    if test -r "$ac_dir/libX11.$ac_extension"; then
56066      ac_x_libraries=$ac_dir
56067      break 2
56068    fi
56069  done
56070done
56071fi
56072rm -f core conftest.err conftest.$ac_objext \
56073    conftest$ac_exeext conftest.$ac_ext
56074fi # $ac_x_libraries = no
56075
56076case $ac_x_includes,$ac_x_libraries in #(
56077  no,* | *,no | *\'*)
56078    # Didn't find X, or a directory has "'" in its name.
56079    ac_cv_have_x="have_x=no";; #(
56080  *)
56081    # Record where we found X for the cache.
56082    ac_cv_have_x="have_x=yes\
56083	ac_x_includes='$ac_x_includes'\
56084	ac_x_libraries='$ac_x_libraries'"
56085esac
56086fi
56087;; #(
56088    *) have_x=yes;;
56089  esac
56090  eval "$ac_cv_have_x"
56091fi # $with_x != no
56092
56093if test "$have_x" != yes; then
56094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
56095$as_echo "$have_x" >&6; }
56096  no_x=yes
56097else
56098  # If each of the values was on the command line, it overrides each guess.
56099  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
56100  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
56101  # Update the cache value to reflect the command line values.
56102  ac_cv_have_x="have_x=yes\
56103	ac_x_includes='$x_includes'\
56104	ac_x_libraries='$x_libraries'"
56105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
56106$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
56107fi
56108
56109    if test "$no_x" = yes; then
56110  # Not all programs may use this symbol, but it does not hurt to define it.
56111
56112$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
56113
56114  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
56115else
56116  if test -n "$x_includes"; then
56117    X_CFLAGS="$X_CFLAGS -I$x_includes"
56118  fi
56119
56120  # It would also be nice to do this for all -L options, not just this one.
56121  if test -n "$x_libraries"; then
56122    X_LIBS="$X_LIBS -L$x_libraries"
56123    # For Solaris; some versions of Sun CC require a space after -R and
56124    # others require no space.  Words are not sufficient . . . .
56125    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
56126$as_echo_n "checking whether -R must be followed by a space... " >&6; }
56127    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
56128    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
56129    ac_cxx_werror_flag=yes
56130    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56131/* end confdefs.h.  */
56132
56133int
56134main ()
56135{
56136
56137  ;
56138  return 0;
56139}
56140_ACEOF
56141if ac_fn_cxx_try_link "$LINENO"; then :
56142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56143$as_echo "no" >&6; }
56144       X_LIBS="$X_LIBS -R$x_libraries"
56145else
56146  LIBS="$ac_xsave_LIBS -R $x_libraries"
56147       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56148/* end confdefs.h.  */
56149
56150int
56151main ()
56152{
56153
56154  ;
56155  return 0;
56156}
56157_ACEOF
56158if ac_fn_cxx_try_link "$LINENO"; then :
56159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56160$as_echo "yes" >&6; }
56161	  X_LIBS="$X_LIBS -R $x_libraries"
56162else
56163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
56164$as_echo "neither works" >&6; }
56165fi
56166rm -f core conftest.err conftest.$ac_objext \
56167    conftest$ac_exeext conftest.$ac_ext
56168fi
56169rm -f core conftest.err conftest.$ac_objext \
56170    conftest$ac_exeext conftest.$ac_ext
56171    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
56172    LIBS=$ac_xsave_LIBS
56173  fi
56174
56175  # Check for system-dependent libraries X programs must link with.
56176  # Do this before checking for the system-independent R6 libraries
56177  # (-lICE), since we may need -lsocket or whatever for X linking.
56178
56179  if test "$ISC" = yes; then
56180    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
56181  else
56182    # Martyn Johnson says this is needed for Ultrix, if the X
56183    # libraries were built with DECnet support.  And Karl Berry says
56184    # the Alpha needs dnet_stub (dnet does not exist).
56185    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
56186    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56187/* end confdefs.h.  */
56188
56189/* Override any GCC internal prototype to avoid an error.
56190   Use char because int might match the return type of a GCC
56191   builtin and then its argument prototype would still apply.  */
56192#ifdef __cplusplus
56193extern "C"
56194#endif
56195char XOpenDisplay ();
56196int
56197main ()
56198{
56199return XOpenDisplay ();
56200  ;
56201  return 0;
56202}
56203_ACEOF
56204if ac_fn_cxx_try_link "$LINENO"; then :
56205
56206else
56207  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
56208$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
56209if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
56210  $as_echo_n "(cached) " >&6
56211else
56212  ac_check_lib_save_LIBS=$LIBS
56213LIBS="-ldnet  $LIBS"
56214cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56215/* end confdefs.h.  */
56216
56217/* Override any GCC internal prototype to avoid an error.
56218   Use char because int might match the return type of a GCC
56219   builtin and then its argument prototype would still apply.  */
56220#ifdef __cplusplus
56221extern "C"
56222#endif
56223char dnet_ntoa ();
56224int
56225main ()
56226{
56227return dnet_ntoa ();
56228  ;
56229  return 0;
56230}
56231_ACEOF
56232if ac_fn_cxx_try_link "$LINENO"; then :
56233  ac_cv_lib_dnet_dnet_ntoa=yes
56234else
56235  ac_cv_lib_dnet_dnet_ntoa=no
56236fi
56237rm -f core conftest.err conftest.$ac_objext \
56238    conftest$ac_exeext conftest.$ac_ext
56239LIBS=$ac_check_lib_save_LIBS
56240fi
56241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
56242$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
56243if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
56244  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
56245fi
56246
56247    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
56248      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
56249$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
56250if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
56251  $as_echo_n "(cached) " >&6
56252else
56253  ac_check_lib_save_LIBS=$LIBS
56254LIBS="-ldnet_stub  $LIBS"
56255cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56256/* end confdefs.h.  */
56257
56258/* Override any GCC internal prototype to avoid an error.
56259   Use char because int might match the return type of a GCC
56260   builtin and then its argument prototype would still apply.  */
56261#ifdef __cplusplus
56262extern "C"
56263#endif
56264char dnet_ntoa ();
56265int
56266main ()
56267{
56268return dnet_ntoa ();
56269  ;
56270  return 0;
56271}
56272_ACEOF
56273if ac_fn_cxx_try_link "$LINENO"; then :
56274  ac_cv_lib_dnet_stub_dnet_ntoa=yes
56275else
56276  ac_cv_lib_dnet_stub_dnet_ntoa=no
56277fi
56278rm -f core conftest.err conftest.$ac_objext \
56279    conftest$ac_exeext conftest.$ac_ext
56280LIBS=$ac_check_lib_save_LIBS
56281fi
56282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
56283$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
56284if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
56285  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
56286fi
56287
56288    fi
56289fi
56290rm -f core conftest.err conftest.$ac_objext \
56291    conftest$ac_exeext conftest.$ac_ext
56292    LIBS="$ac_xsave_LIBS"
56293
56294    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
56295    # to get the SysV transport functions.
56296    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
56297    # needs -lnsl.
56298    # The nsl library prevents programs from opening the X display
56299    # on Irix 5.2, according to T.E. Dickey.
56300    # The functions gethostbyname, getservbyname, and inet_addr are
56301    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
56302    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
56303if test "x$ac_cv_func_gethostbyname" = xyes; then :
56304
56305fi
56306
56307    if test $ac_cv_func_gethostbyname = no; then
56308      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
56309$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
56310if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
56311  $as_echo_n "(cached) " >&6
56312else
56313  ac_check_lib_save_LIBS=$LIBS
56314LIBS="-lnsl  $LIBS"
56315cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56316/* end confdefs.h.  */
56317
56318/* Override any GCC internal prototype to avoid an error.
56319   Use char because int might match the return type of a GCC
56320   builtin and then its argument prototype would still apply.  */
56321#ifdef __cplusplus
56322extern "C"
56323#endif
56324char gethostbyname ();
56325int
56326main ()
56327{
56328return gethostbyname ();
56329  ;
56330  return 0;
56331}
56332_ACEOF
56333if ac_fn_cxx_try_link "$LINENO"; then :
56334  ac_cv_lib_nsl_gethostbyname=yes
56335else
56336  ac_cv_lib_nsl_gethostbyname=no
56337fi
56338rm -f core conftest.err conftest.$ac_objext \
56339    conftest$ac_exeext conftest.$ac_ext
56340LIBS=$ac_check_lib_save_LIBS
56341fi
56342{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
56343$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
56344if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
56345  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
56346fi
56347
56348      if test $ac_cv_lib_nsl_gethostbyname = no; then
56349	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
56350$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
56351if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
56352  $as_echo_n "(cached) " >&6
56353else
56354  ac_check_lib_save_LIBS=$LIBS
56355LIBS="-lbsd  $LIBS"
56356cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56357/* end confdefs.h.  */
56358
56359/* Override any GCC internal prototype to avoid an error.
56360   Use char because int might match the return type of a GCC
56361   builtin and then its argument prototype would still apply.  */
56362#ifdef __cplusplus
56363extern "C"
56364#endif
56365char gethostbyname ();
56366int
56367main ()
56368{
56369return gethostbyname ();
56370  ;
56371  return 0;
56372}
56373_ACEOF
56374if ac_fn_cxx_try_link "$LINENO"; then :
56375  ac_cv_lib_bsd_gethostbyname=yes
56376else
56377  ac_cv_lib_bsd_gethostbyname=no
56378fi
56379rm -f core conftest.err conftest.$ac_objext \
56380    conftest$ac_exeext conftest.$ac_ext
56381LIBS=$ac_check_lib_save_LIBS
56382fi
56383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
56384$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
56385if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
56386  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
56387fi
56388
56389      fi
56390    fi
56391
56392    # lieder@skyler.mavd.honeywell.com says without -lsocket,
56393    # socket/setsockopt and other routines are undefined under SCO ODT
56394    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
56395    # on later versions), says Simon Leinen: it contains gethostby*
56396    # variants that don't use the name server (or something).  -lsocket
56397    # must be given before -lnsl if both are needed.  We assume that
56398    # if connect needs -lnsl, so does gethostbyname.
56399    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
56400if test "x$ac_cv_func_connect" = xyes; then :
56401
56402fi
56403
56404    if test $ac_cv_func_connect = no; then
56405      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
56406$as_echo_n "checking for connect in -lsocket... " >&6; }
56407if ${ac_cv_lib_socket_connect+:} false; then :
56408  $as_echo_n "(cached) " >&6
56409else
56410  ac_check_lib_save_LIBS=$LIBS
56411LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
56412cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56413/* end confdefs.h.  */
56414
56415/* Override any GCC internal prototype to avoid an error.
56416   Use char because int might match the return type of a GCC
56417   builtin and then its argument prototype would still apply.  */
56418#ifdef __cplusplus
56419extern "C"
56420#endif
56421char connect ();
56422int
56423main ()
56424{
56425return connect ();
56426  ;
56427  return 0;
56428}
56429_ACEOF
56430if ac_fn_cxx_try_link "$LINENO"; then :
56431  ac_cv_lib_socket_connect=yes
56432else
56433  ac_cv_lib_socket_connect=no
56434fi
56435rm -f core conftest.err conftest.$ac_objext \
56436    conftest$ac_exeext conftest.$ac_ext
56437LIBS=$ac_check_lib_save_LIBS
56438fi
56439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
56440$as_echo "$ac_cv_lib_socket_connect" >&6; }
56441if test "x$ac_cv_lib_socket_connect" = xyes; then :
56442  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
56443fi
56444
56445    fi
56446
56447    # Guillermo Gomez says -lposix is necessary on A/UX.
56448    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
56449if test "x$ac_cv_func_remove" = xyes; then :
56450
56451fi
56452
56453    if test $ac_cv_func_remove = no; then
56454      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
56455$as_echo_n "checking for remove in -lposix... " >&6; }
56456if ${ac_cv_lib_posix_remove+:} false; then :
56457  $as_echo_n "(cached) " >&6
56458else
56459  ac_check_lib_save_LIBS=$LIBS
56460LIBS="-lposix  $LIBS"
56461cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56462/* end confdefs.h.  */
56463
56464/* Override any GCC internal prototype to avoid an error.
56465   Use char because int might match the return type of a GCC
56466   builtin and then its argument prototype would still apply.  */
56467#ifdef __cplusplus
56468extern "C"
56469#endif
56470char remove ();
56471int
56472main ()
56473{
56474return remove ();
56475  ;
56476  return 0;
56477}
56478_ACEOF
56479if ac_fn_cxx_try_link "$LINENO"; then :
56480  ac_cv_lib_posix_remove=yes
56481else
56482  ac_cv_lib_posix_remove=no
56483fi
56484rm -f core conftest.err conftest.$ac_objext \
56485    conftest$ac_exeext conftest.$ac_ext
56486LIBS=$ac_check_lib_save_LIBS
56487fi
56488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
56489$as_echo "$ac_cv_lib_posix_remove" >&6; }
56490if test "x$ac_cv_lib_posix_remove" = xyes; then :
56491  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
56492fi
56493
56494    fi
56495
56496    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
56497    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
56498if test "x$ac_cv_func_shmat" = xyes; then :
56499
56500fi
56501
56502    if test $ac_cv_func_shmat = no; then
56503      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
56504$as_echo_n "checking for shmat in -lipc... " >&6; }
56505if ${ac_cv_lib_ipc_shmat+:} false; then :
56506  $as_echo_n "(cached) " >&6
56507else
56508  ac_check_lib_save_LIBS=$LIBS
56509LIBS="-lipc  $LIBS"
56510cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56511/* end confdefs.h.  */
56512
56513/* Override any GCC internal prototype to avoid an error.
56514   Use char because int might match the return type of a GCC
56515   builtin and then its argument prototype would still apply.  */
56516#ifdef __cplusplus
56517extern "C"
56518#endif
56519char shmat ();
56520int
56521main ()
56522{
56523return shmat ();
56524  ;
56525  return 0;
56526}
56527_ACEOF
56528if ac_fn_cxx_try_link "$LINENO"; then :
56529  ac_cv_lib_ipc_shmat=yes
56530else
56531  ac_cv_lib_ipc_shmat=no
56532fi
56533rm -f core conftest.err conftest.$ac_objext \
56534    conftest$ac_exeext conftest.$ac_ext
56535LIBS=$ac_check_lib_save_LIBS
56536fi
56537{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
56538$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
56539if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
56540  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
56541fi
56542
56543    fi
56544  fi
56545
56546  # Check for libraries that X11R6 Xt/Xaw programs need.
56547  ac_save_LDFLAGS=$LDFLAGS
56548  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
56549  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
56550  # check for ICE first), but we must link in the order -lSM -lICE or
56551  # we get undefined symbols.  So assume we have SM if we have ICE.
56552  # These have to be linked with before -lX11, unlike the other
56553  # libraries we check for below, so use a different variable.
56554  # John Interrante, Karl Berry
56555  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
56556$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
56557if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
56558  $as_echo_n "(cached) " >&6
56559else
56560  ac_check_lib_save_LIBS=$LIBS
56561LIBS="-lICE $X_EXTRA_LIBS $LIBS"
56562cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56563/* end confdefs.h.  */
56564
56565/* Override any GCC internal prototype to avoid an error.
56566   Use char because int might match the return type of a GCC
56567   builtin and then its argument prototype would still apply.  */
56568#ifdef __cplusplus
56569extern "C"
56570#endif
56571char IceConnectionNumber ();
56572int
56573main ()
56574{
56575return IceConnectionNumber ();
56576  ;
56577  return 0;
56578}
56579_ACEOF
56580if ac_fn_cxx_try_link "$LINENO"; then :
56581  ac_cv_lib_ICE_IceConnectionNumber=yes
56582else
56583  ac_cv_lib_ICE_IceConnectionNumber=no
56584fi
56585rm -f core conftest.err conftest.$ac_objext \
56586    conftest$ac_exeext conftest.$ac_ext
56587LIBS=$ac_check_lib_save_LIBS
56588fi
56589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
56590$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
56591if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
56592  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
56593fi
56594
56595  LDFLAGS=$ac_save_LDFLAGS
56596
56597fi
56598
56599
56600    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
56601    # this doesn't make sense so we remove it.
56602    if test "x$COMPILE_TYPE" = xcross; then
56603      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
56604    fi
56605
56606    if test "x$no_x" = xyes; then
56607
56608  # Print a helpful message on how to acquire the necessary build dependency.
56609  # x11 is the help tag: freetype, cups, alsa etc
56610  MISSING_DEPENDENCY=x11
56611
56612  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56613    cygwin_help $MISSING_DEPENDENCY
56614  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56615    msys_help $MISSING_DEPENDENCY
56616  else
56617    PKGHANDLER_COMMAND=
56618
56619    case $PKGHANDLER in
56620      apt-get)
56621        apt_help     $MISSING_DEPENDENCY ;;
56622      yum)
56623        yum_help     $MISSING_DEPENDENCY ;;
56624      port)
56625        port_help    $MISSING_DEPENDENCY ;;
56626      pkgutil)
56627        pkgutil_help $MISSING_DEPENDENCY ;;
56628      pkgadd)
56629        pkgadd_help  $MISSING_DEPENDENCY ;;
56630    esac
56631
56632    if test "x$PKGHANDLER_COMMAND" != x; then
56633      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56634    fi
56635  fi
56636
56637      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
56638    fi
56639
56640    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
56641      OPENWIN_HOME="/usr/openwin"
56642      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
56643      X_LIBS="-L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
56644          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
56645    fi
56646
56647    ac_ext=c
56648ac_cpp='$CPP $CPPFLAGS'
56649ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56650ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56651ac_compiler_gnu=$ac_cv_c_compiler_gnu
56652
56653    OLD_CFLAGS="$CFLAGS"
56654    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
56655
56656    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
56657    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
56658do :
56659  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56660ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
56661          # include <X11/Xlib.h>
56662          # include <X11/Xutil.h>
56663
56664
56665"
56666if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56667  cat >>confdefs.h <<_ACEOF
56668#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56669_ACEOF
56670 X11_HEADERS_OK=yes
56671else
56672  X11_HEADERS_OK=no; break
56673fi
56674
56675done
56676
56677
56678    if test "x$X11_HEADERS_OK" = xno; then
56679
56680  # Print a helpful message on how to acquire the necessary build dependency.
56681  # x11 is the help tag: freetype, cups, alsa etc
56682  MISSING_DEPENDENCY=x11
56683
56684  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56685    cygwin_help $MISSING_DEPENDENCY
56686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56687    msys_help $MISSING_DEPENDENCY
56688  else
56689    PKGHANDLER_COMMAND=
56690
56691    case $PKGHANDLER in
56692      apt-get)
56693        apt_help     $MISSING_DEPENDENCY ;;
56694      yum)
56695        yum_help     $MISSING_DEPENDENCY ;;
56696      port)
56697        port_help    $MISSING_DEPENDENCY ;;
56698      pkgutil)
56699        pkgutil_help $MISSING_DEPENDENCY ;;
56700      pkgadd)
56701        pkgadd_help  $MISSING_DEPENDENCY ;;
56702    esac
56703
56704    if test "x$PKGHANDLER_COMMAND" != x; then
56705      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56706    fi
56707  fi
56708
56709      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
56710    fi
56711
56712    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
56713    # defined in libawt_xawt.
56714    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
56715$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
56716    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56717/* end confdefs.h.  */
56718#include <X11/extensions/Xrender.h>
56719int
56720main ()
56721{
56722XLinearGradient x;
56723  ;
56724  return 0;
56725}
56726_ACEOF
56727if ac_fn_c_try_compile "$LINENO"; then :
56728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56729$as_echo "yes" >&6; }
56730else
56731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56732$as_echo "no" >&6; }
56733         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
56734fi
56735rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
56736
56737    CFLAGS="$OLD_CFLAGS"
56738    ac_ext=cpp
56739ac_cpp='$CXXCPP $CPPFLAGS'
56740ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56741ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56742ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
56743
56744  fi # NEEDS_LIB_X11
56745
56746
56747
56748
56749
56750
56751# Check whether --with-cups was given.
56752if test "${with_cups+set}" = set; then :
56753  withval=$with_cups;
56754fi
56755
56756
56757# Check whether --with-cups-include was given.
56758if test "${with_cups_include+set}" = set; then :
56759  withval=$with_cups_include;
56760fi
56761
56762
56763  if test "x$NEEDS_LIB_CUPS" = xfalse; then
56764    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
56765        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
56766      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
56767$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
56768    fi
56769    CUPS_CFLAGS=
56770  else
56771    CUPS_FOUND=no
56772
56773    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
56774      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
56775    fi
56776
56777    if test "x${with_cups}" != x; then
56778      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56779$as_echo_n "checking for cups headers... " >&6; }
56780      if test -s "${with_cups}/include/cups/cups.h"; then
56781        CUPS_CFLAGS="-I${with_cups}/include"
56782        CUPS_FOUND=yes
56783        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56784$as_echo "$CUPS_FOUND" >&6; }
56785      else
56786        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
56787      fi
56788    fi
56789    if test "x${with_cups_include}" != x; then
56790      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56791$as_echo_n "checking for cups headers... " >&6; }
56792      if test -s "${with_cups_include}/cups/cups.h"; then
56793        CUPS_CFLAGS="-I${with_cups_include}"
56794        CUPS_FOUND=yes
56795        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56796$as_echo "$CUPS_FOUND" >&6; }
56797      else
56798        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
56799      fi
56800    fi
56801    if test "x$CUPS_FOUND" = xno; then
56802      # Are the cups headers installed in the default /usr/include location?
56803      for ac_header in cups/cups.h cups/ppd.h
56804do :
56805  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56806ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
56807if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56808  cat >>confdefs.h <<_ACEOF
56809#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56810_ACEOF
56811
56812          CUPS_FOUND=yes
56813          CUPS_CFLAGS=
56814          DEFAULT_CUPS=yes
56815
56816fi
56817
56818done
56819
56820    fi
56821    if test "x$CUPS_FOUND" = xno; then
56822
56823  # Print a helpful message on how to acquire the necessary build dependency.
56824  # cups is the help tag: freetype, cups, alsa etc
56825  MISSING_DEPENDENCY=cups
56826
56827  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56828    cygwin_help $MISSING_DEPENDENCY
56829  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56830    msys_help $MISSING_DEPENDENCY
56831  else
56832    PKGHANDLER_COMMAND=
56833
56834    case $PKGHANDLER in
56835      apt-get)
56836        apt_help     $MISSING_DEPENDENCY ;;
56837      yum)
56838        yum_help     $MISSING_DEPENDENCY ;;
56839      port)
56840        port_help    $MISSING_DEPENDENCY ;;
56841      pkgutil)
56842        pkgutil_help $MISSING_DEPENDENCY ;;
56843      pkgadd)
56844        pkgadd_help  $MISSING_DEPENDENCY ;;
56845    esac
56846
56847    if test "x$PKGHANDLER_COMMAND" != x; then
56848      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56849    fi
56850  fi
56851
56852      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
56853    fi
56854  fi
56855
56856
56857
56858
56859
56860# Check whether --with-freetype was given.
56861if test "${with_freetype+set}" = set; then :
56862  withval=$with_freetype;
56863fi
56864
56865
56866# Check whether --with-freetype-include was given.
56867if test "${with_freetype_include+set}" = set; then :
56868  withval=$with_freetype_include;
56869fi
56870
56871
56872# Check whether --with-freetype-lib was given.
56873if test "${with_freetype_lib+set}" = set; then :
56874  withval=$with_freetype_lib;
56875fi
56876
56877
56878# Check whether --with-freetype-src was given.
56879if test "${with_freetype_src+set}" = set; then :
56880  withval=$with_freetype_src;
56881fi
56882
56883  # Check whether --enable-freetype-bundling was given.
56884if test "${enable_freetype_bundling+set}" = set; then :
56885  enableval=$enable_freetype_bundling;
56886fi
56887
56888
56889  # Need to specify explicitly since it needs to be overridden on some versions of macosx
56890  FREETYPE_BASE_NAME=freetype
56891  FREETYPE_CFLAGS=
56892  FREETYPE_LIBS=
56893  FREETYPE_BUNDLE_LIB_PATH=
56894
56895  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
56896    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
56897        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
56898        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
56899        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
56900      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
56901$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
56902    fi
56903    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
56904      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
56905$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
56906    fi
56907  else
56908    # freetype is needed to build; go get it!
56909
56910    BUNDLE_FREETYPE="$enable_freetype_bundling"
56911
56912    if  test "x$with_freetype_src" != x; then
56913      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56914        # Try to build freetype if --with-freetype-src was given on Windows
56915
56916  FREETYPE_SRC_PATH="$with_freetype_src"
56917  BUILD_FREETYPE=yes
56918
56919  # Check if the freetype sources are acessible..
56920  if ! test -d $FREETYPE_SRC_PATH; then
56921    { $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
56922$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
56923    BUILD_FREETYPE=no
56924  fi
56925  # ..and contain a vc2010 project file
56926  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
56927  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
56928    { $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
56929$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
56930    BUILD_FREETYPE=no
56931  fi
56932  # Now check if configure found a version of 'msbuild.exe'
56933  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
56934    { $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
56935$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;}
56936    BUILD_FREETYPE=no
56937  fi
56938
56939  # Ready to go..
56940  if test "x$BUILD_FREETYPE" = xyes; then
56941    # msbuild requires trailing slashes for output directories
56942    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
56943    freetype_lib_path_unix="$freetype_lib_path"
56944    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
56945
56946  unix_path="$vcxproj_path"
56947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56948    windows_path=`$CYGPATH -m "$unix_path"`
56949    vcxproj_path="$windows_path"
56950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56951    windows_path=`cmd //c echo $unix_path`
56952    vcxproj_path="$windows_path"
56953  fi
56954
56955
56956  unix_path="$freetype_lib_path"
56957  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56958    windows_path=`$CYGPATH -m "$unix_path"`
56959    freetype_lib_path="$windows_path"
56960  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56961    windows_path=`cmd //c echo $unix_path`
56962    freetype_lib_path="$windows_path"
56963  fi
56964
56965
56966  unix_path="$freetype_obj_path"
56967  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56968    windows_path=`$CYGPATH -m "$unix_path"`
56969    freetype_obj_path="$windows_path"
56970  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56971    windows_path=`cmd //c echo $unix_path`
56972    freetype_obj_path="$windows_path"
56973  fi
56974
56975    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56976      freetype_platform=x64
56977    else
56978      freetype_platform=win32
56979    fi
56980
56981    # The original freetype project file is for VS 2010 (i.e. 'v100'),
56982    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
56983    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
56984    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
56985    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
56986$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
56987
56988    # First we try to build the freetype.dll
56989    $ECHO -e "@echo off\n"\
56990        "$MSBUILD $vcxproj_path "\
56991        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
56992        "/p:Configuration=\"Release Multithreaded\" "\
56993        "/p:Platform=$freetype_platform "\
56994        "/p:ConfigurationType=DynamicLibrary "\
56995        "/p:TargetName=freetype "\
56996        "/p:OutDir=\"$freetype_lib_path\" "\
56997        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
56998    cmd /c freetype.bat
56999
57000    if test -s "$freetype_lib_path_unix/freetype.dll"; then
57001      # If that succeeds we also build freetype.lib
57002      $ECHO -e "@echo off\n"\
57003          "$MSBUILD $vcxproj_path "\
57004          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57005          "/p:Configuration=\"Release Multithreaded\" "\
57006          "/p:Platform=$freetype_platform "\
57007          "/p:ConfigurationType=StaticLibrary "\
57008          "/p:TargetName=freetype "\
57009          "/p:OutDir=\"$freetype_lib_path\" "\
57010          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
57011      cmd /c freetype.bat
57012
57013      if test -s "$freetype_lib_path_unix/freetype.lib"; then
57014        # Once we build both, lib and dll, set freetype lib and include path appropriately
57015        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
57016        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
57017        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
57018$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
57019      else
57020        BUILD_FREETYPE=no
57021      fi
57022    else
57023      BUILD_FREETYPE=no
57024    fi
57025  fi
57026
57027        if test "x$BUILD_FREETYPE" = xyes; then
57028          # Okay, we built it. Check that it works.
57029
57030  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57031  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57032  METHOD="--with-freetype-src"
57033
57034  # Let's start with an optimistic view of the world :-)
57035  FOUND_FREETYPE=yes
57036
57037  # First look for the canonical freetype main include file ft2build.h.
57038  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57039    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57040    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57041    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57042      # Fail.
57043      FOUND_FREETYPE=no
57044    fi
57045  fi
57046
57047  if test "x$FOUND_FREETYPE" = xyes; then
57048    # Include file found, let's continue the sanity check.
57049    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57050$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57051
57052    # Reset to default value
57053    FREETYPE_BASE_NAME=freetype
57054    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57055    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57056      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57057          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57058        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57059        # for the .6 version explicitly.
57060        FREETYPE_BASE_NAME=freetype.6
57061        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57062        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57063$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57064      else
57065        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57066$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57067        FOUND_FREETYPE=no
57068      fi
57069    else
57070      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57071        # On Windows, we will need both .lib and .dll file.
57072        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57073          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57074$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57075          FOUND_FREETYPE=no
57076        fi
57077      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57078          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57079        # Found lib in isa dir, use that instead.
57080        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57081        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57082$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57083      fi
57084    fi
57085  fi
57086
57087  if test "x$FOUND_FREETYPE" = xyes; then
57088
57089  # Only process if variable expands to non-empty
57090
57091  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57092    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57093
57094  # Input might be given as Windows format, start by converting to
57095  # unix format.
57096  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57097  new_path=`$CYGPATH -u "$path"`
57098
57099  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57100  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57101  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57102  # "foo.exe" is OK but "foo" is an error.
57103  #
57104  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57105  # It is also a way to make sure we got the proper file name for the real test later on.
57106  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57107  if test "x$test_shortpath" = x; then
57108    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57109$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57110    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57111  fi
57112
57113  # Call helper function which possibly converts this using DOS-style short mode.
57114  # If so, the updated path is stored in $new_path.
57115
57116  input_path="$new_path"
57117  # Check if we need to convert this using DOS-style short mode. If the path
57118  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57119  # take no chances and rewrite it.
57120  # Note: m4 eats our [], so we need to use [ and ] instead.
57121  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57122  if test "x$has_forbidden_chars" != x; then
57123    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57124    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57125    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57126    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57127      # Going to short mode and back again did indeed matter. Since short mode is
57128      # case insensitive, let's make it lowercase to improve readability.
57129      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57130      # Now convert it back to Unix-style (cygpath)
57131      input_path=`$CYGPATH -u "$shortmode_path"`
57132      new_path="$input_path"
57133    fi
57134  fi
57135
57136  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57137  if test "x$test_cygdrive_prefix" = x; then
57138    # As a simple fix, exclude /usr/bin since it's not a real path.
57139    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57140      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57141      # a path prefixed by /cygdrive for fixpath to work.
57142      new_path="$CYGWIN_ROOT_PATH$input_path"
57143    fi
57144  fi
57145
57146
57147  if test "x$path" != "x$new_path"; then
57148    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57149    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57150$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57151  fi
57152
57153    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57154
57155  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57156  has_colon=`$ECHO $path | $GREP ^.:`
57157  new_path="$path"
57158  if test "x$has_colon" = x; then
57159    # Not in mixed or Windows style, start by that.
57160    new_path=`cmd //c echo $path`
57161  fi
57162
57163
57164  input_path="$new_path"
57165  # Check if we need to convert this using DOS-style short mode. If the path
57166  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57167  # take no chances and rewrite it.
57168  # Note: m4 eats our [], so we need to use [ and ] instead.
57169  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57170  if test "x$has_forbidden_chars" != x; then
57171    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57172    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57173  fi
57174
57175
57176  windows_path="$new_path"
57177  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57178    unix_path=`$CYGPATH -u "$windows_path"`
57179    new_path="$unix_path"
57180  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57181    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57182    new_path="$unix_path"
57183  fi
57184
57185  if test "x$path" != "x$new_path"; then
57186    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57187    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57188$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57189  fi
57190
57191  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57192  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57193
57194    else
57195      # We're on a unix platform. Hooray! :)
57196      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57197      has_space=`$ECHO "$path" | $GREP " "`
57198      if test "x$has_space" != x; then
57199        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57200$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57201        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57202      fi
57203
57204      # Use eval to expand a potential ~
57205      eval path="$path"
57206      if test ! -f "$path" && test ! -d "$path"; then
57207        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57208      fi
57209
57210      if test -d "$path"; then
57211        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57212      else
57213        dir="`$DIRNAME "$path"`"
57214        base="`$BASENAME "$path"`"
57215        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57216      fi
57217    fi
57218  fi
57219
57220
57221  # Only process if variable expands to non-empty
57222
57223  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57224    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57225
57226  # Input might be given as Windows format, start by converting to
57227  # unix format.
57228  path="$POTENTIAL_FREETYPE_LIB_PATH"
57229  new_path=`$CYGPATH -u "$path"`
57230
57231  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57232  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57233  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57234  # "foo.exe" is OK but "foo" is an error.
57235  #
57236  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57237  # It is also a way to make sure we got the proper file name for the real test later on.
57238  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57239  if test "x$test_shortpath" = x; then
57240    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57241$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57242    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57243  fi
57244
57245  # Call helper function which possibly converts this using DOS-style short mode.
57246  # If so, the updated path is stored in $new_path.
57247
57248  input_path="$new_path"
57249  # Check if we need to convert this using DOS-style short mode. If the path
57250  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57251  # take no chances and rewrite it.
57252  # Note: m4 eats our [], so we need to use [ and ] instead.
57253  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57254  if test "x$has_forbidden_chars" != x; then
57255    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57256    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57257    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57258    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57259      # Going to short mode and back again did indeed matter. Since short mode is
57260      # case insensitive, let's make it lowercase to improve readability.
57261      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57262      # Now convert it back to Unix-style (cygpath)
57263      input_path=`$CYGPATH -u "$shortmode_path"`
57264      new_path="$input_path"
57265    fi
57266  fi
57267
57268  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57269  if test "x$test_cygdrive_prefix" = x; then
57270    # As a simple fix, exclude /usr/bin since it's not a real path.
57271    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57272      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57273      # a path prefixed by /cygdrive for fixpath to work.
57274      new_path="$CYGWIN_ROOT_PATH$input_path"
57275    fi
57276  fi
57277
57278
57279  if test "x$path" != "x$new_path"; then
57280    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57281    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57282$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57283  fi
57284
57285    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57286
57287  path="$POTENTIAL_FREETYPE_LIB_PATH"
57288  has_colon=`$ECHO $path | $GREP ^.:`
57289  new_path="$path"
57290  if test "x$has_colon" = x; then
57291    # Not in mixed or Windows style, start by that.
57292    new_path=`cmd //c echo $path`
57293  fi
57294
57295
57296  input_path="$new_path"
57297  # Check if we need to convert this using DOS-style short mode. If the path
57298  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57299  # take no chances and rewrite it.
57300  # Note: m4 eats our [], so we need to use [ and ] instead.
57301  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57302  if test "x$has_forbidden_chars" != x; then
57303    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57304    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57305  fi
57306
57307
57308  windows_path="$new_path"
57309  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57310    unix_path=`$CYGPATH -u "$windows_path"`
57311    new_path="$unix_path"
57312  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57313    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57314    new_path="$unix_path"
57315  fi
57316
57317  if test "x$path" != "x$new_path"; then
57318    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57319    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57320$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57321  fi
57322
57323  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57324  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57325
57326    else
57327      # We're on a unix platform. Hooray! :)
57328      path="$POTENTIAL_FREETYPE_LIB_PATH"
57329      has_space=`$ECHO "$path" | $GREP " "`
57330      if test "x$has_space" != x; then
57331        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57332$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57333        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57334      fi
57335
57336      # Use eval to expand a potential ~
57337      eval path="$path"
57338      if test ! -f "$path" && test ! -d "$path"; then
57339        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57340      fi
57341
57342      if test -d "$path"; then
57343        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57344      else
57345        dir="`$DIRNAME "$path"`"
57346        base="`$BASENAME "$path"`"
57347        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57348      fi
57349    fi
57350  fi
57351
57352
57353    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57354    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57355$as_echo_n "checking for freetype includes... " >&6; }
57356    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57357$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57358    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57359    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57360$as_echo_n "checking for freetype libraries... " >&6; }
57361    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57362$as_echo "$FREETYPE_LIB_PATH" >&6; }
57363  fi
57364
57365          if test "x$FOUND_FREETYPE" != xyes; then
57366            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
57367          fi
57368        else
57369          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
57370$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
57371          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
57372        fi
57373      else
57374        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
57375$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
57376      fi
57377    fi
57378
57379    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
57380      # User has specified settings
57381
57382      if test "x$BUNDLE_FREETYPE" = x; then
57383        # If not specified, default is to bundle freetype
57384        BUNDLE_FREETYPE=yes
57385      fi
57386
57387      if test "x$with_freetype" != x; then
57388        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
57389        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
57390      fi
57391
57392      # Allow --with-freetype-lib and --with-freetype-include to override
57393      if test "x$with_freetype_include" != x; then
57394        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
57395      fi
57396      if test "x$with_freetype_lib" != x; then
57397        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
57398      fi
57399
57400      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57401        # Okay, we got it. Check that it works.
57402
57403  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57404  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57405  METHOD="--with-freetype"
57406
57407  # Let's start with an optimistic view of the world :-)
57408  FOUND_FREETYPE=yes
57409
57410  # First look for the canonical freetype main include file ft2build.h.
57411  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57412    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57413    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57414    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57415      # Fail.
57416      FOUND_FREETYPE=no
57417    fi
57418  fi
57419
57420  if test "x$FOUND_FREETYPE" = xyes; then
57421    # Include file found, let's continue the sanity check.
57422    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57423$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57424
57425    # Reset to default value
57426    FREETYPE_BASE_NAME=freetype
57427    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57428    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57429      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57430          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57431        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57432        # for the .6 version explicitly.
57433        FREETYPE_BASE_NAME=freetype.6
57434        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57435        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57436$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57437      else
57438        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57439$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57440        FOUND_FREETYPE=no
57441      fi
57442    else
57443      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57444        # On Windows, we will need both .lib and .dll file.
57445        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57446          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57447$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57448          FOUND_FREETYPE=no
57449        fi
57450      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57451          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57452        # Found lib in isa dir, use that instead.
57453        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57454        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57455$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57456      fi
57457    fi
57458  fi
57459
57460  if test "x$FOUND_FREETYPE" = xyes; then
57461
57462  # Only process if variable expands to non-empty
57463
57464  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57465    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57466
57467  # Input might be given as Windows format, start by converting to
57468  # unix format.
57469  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57470  new_path=`$CYGPATH -u "$path"`
57471
57472  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57473  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57474  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57475  # "foo.exe" is OK but "foo" is an error.
57476  #
57477  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57478  # It is also a way to make sure we got the proper file name for the real test later on.
57479  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57480  if test "x$test_shortpath" = x; then
57481    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57482$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57483    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57484  fi
57485
57486  # Call helper function which possibly converts this using DOS-style short mode.
57487  # If so, the updated path is stored in $new_path.
57488
57489  input_path="$new_path"
57490  # Check if we need to convert this using DOS-style short mode. If the path
57491  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57492  # take no chances and rewrite it.
57493  # Note: m4 eats our [], so we need to use [ and ] instead.
57494  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57495  if test "x$has_forbidden_chars" != x; then
57496    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57497    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57498    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57499    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57500      # Going to short mode and back again did indeed matter. Since short mode is
57501      # case insensitive, let's make it lowercase to improve readability.
57502      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57503      # Now convert it back to Unix-style (cygpath)
57504      input_path=`$CYGPATH -u "$shortmode_path"`
57505      new_path="$input_path"
57506    fi
57507  fi
57508
57509  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57510  if test "x$test_cygdrive_prefix" = x; then
57511    # As a simple fix, exclude /usr/bin since it's not a real path.
57512    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57513      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57514      # a path prefixed by /cygdrive for fixpath to work.
57515      new_path="$CYGWIN_ROOT_PATH$input_path"
57516    fi
57517  fi
57518
57519
57520  if test "x$path" != "x$new_path"; then
57521    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57522    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57523$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57524  fi
57525
57526    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57527
57528  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57529  has_colon=`$ECHO $path | $GREP ^.:`
57530  new_path="$path"
57531  if test "x$has_colon" = x; then
57532    # Not in mixed or Windows style, start by that.
57533    new_path=`cmd //c echo $path`
57534  fi
57535
57536
57537  input_path="$new_path"
57538  # Check if we need to convert this using DOS-style short mode. If the path
57539  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57540  # take no chances and rewrite it.
57541  # Note: m4 eats our [], so we need to use [ and ] instead.
57542  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57543  if test "x$has_forbidden_chars" != x; then
57544    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57545    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57546  fi
57547
57548
57549  windows_path="$new_path"
57550  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57551    unix_path=`$CYGPATH -u "$windows_path"`
57552    new_path="$unix_path"
57553  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57554    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57555    new_path="$unix_path"
57556  fi
57557
57558  if test "x$path" != "x$new_path"; then
57559    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57560    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57561$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57562  fi
57563
57564  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57565  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57566
57567    else
57568      # We're on a unix platform. Hooray! :)
57569      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57570      has_space=`$ECHO "$path" | $GREP " "`
57571      if test "x$has_space" != x; then
57572        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57573$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57574        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57575      fi
57576
57577      # Use eval to expand a potential ~
57578      eval path="$path"
57579      if test ! -f "$path" && test ! -d "$path"; then
57580        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57581      fi
57582
57583      if test -d "$path"; then
57584        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57585      else
57586        dir="`$DIRNAME "$path"`"
57587        base="`$BASENAME "$path"`"
57588        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57589      fi
57590    fi
57591  fi
57592
57593
57594  # Only process if variable expands to non-empty
57595
57596  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57597    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57598
57599  # Input might be given as Windows format, start by converting to
57600  # unix format.
57601  path="$POTENTIAL_FREETYPE_LIB_PATH"
57602  new_path=`$CYGPATH -u "$path"`
57603
57604  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57605  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57606  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57607  # "foo.exe" is OK but "foo" is an error.
57608  #
57609  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57610  # It is also a way to make sure we got the proper file name for the real test later on.
57611  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57612  if test "x$test_shortpath" = x; then
57613    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57614$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57615    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57616  fi
57617
57618  # Call helper function which possibly converts this using DOS-style short mode.
57619  # If so, the updated path is stored in $new_path.
57620
57621  input_path="$new_path"
57622  # Check if we need to convert this using DOS-style short mode. If the path
57623  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57624  # take no chances and rewrite it.
57625  # Note: m4 eats our [], so we need to use [ and ] instead.
57626  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57627  if test "x$has_forbidden_chars" != x; then
57628    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57629    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57630    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57631    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57632      # Going to short mode and back again did indeed matter. Since short mode is
57633      # case insensitive, let's make it lowercase to improve readability.
57634      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57635      # Now convert it back to Unix-style (cygpath)
57636      input_path=`$CYGPATH -u "$shortmode_path"`
57637      new_path="$input_path"
57638    fi
57639  fi
57640
57641  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57642  if test "x$test_cygdrive_prefix" = x; then
57643    # As a simple fix, exclude /usr/bin since it's not a real path.
57644    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57645      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57646      # a path prefixed by /cygdrive for fixpath to work.
57647      new_path="$CYGWIN_ROOT_PATH$input_path"
57648    fi
57649  fi
57650
57651
57652  if test "x$path" != "x$new_path"; then
57653    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57654    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57655$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57656  fi
57657
57658    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57659
57660  path="$POTENTIAL_FREETYPE_LIB_PATH"
57661  has_colon=`$ECHO $path | $GREP ^.:`
57662  new_path="$path"
57663  if test "x$has_colon" = x; then
57664    # Not in mixed or Windows style, start by that.
57665    new_path=`cmd //c echo $path`
57666  fi
57667
57668
57669  input_path="$new_path"
57670  # Check if we need to convert this using DOS-style short mode. If the path
57671  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57672  # take no chances and rewrite it.
57673  # Note: m4 eats our [], so we need to use [ and ] instead.
57674  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57675  if test "x$has_forbidden_chars" != x; then
57676    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57677    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57678  fi
57679
57680
57681  windows_path="$new_path"
57682  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57683    unix_path=`$CYGPATH -u "$windows_path"`
57684    new_path="$unix_path"
57685  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57686    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57687    new_path="$unix_path"
57688  fi
57689
57690  if test "x$path" != "x$new_path"; then
57691    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57692    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57693$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57694  fi
57695
57696  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57697  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57698
57699    else
57700      # We're on a unix platform. Hooray! :)
57701      path="$POTENTIAL_FREETYPE_LIB_PATH"
57702      has_space=`$ECHO "$path" | $GREP " "`
57703      if test "x$has_space" != x; then
57704        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57705$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57706        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57707      fi
57708
57709      # Use eval to expand a potential ~
57710      eval path="$path"
57711      if test ! -f "$path" && test ! -d "$path"; then
57712        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57713      fi
57714
57715      if test -d "$path"; then
57716        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57717      else
57718        dir="`$DIRNAME "$path"`"
57719        base="`$BASENAME "$path"`"
57720        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57721      fi
57722    fi
57723  fi
57724
57725
57726    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57727    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57728$as_echo_n "checking for freetype includes... " >&6; }
57729    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57730$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57731    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57732    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57733$as_echo_n "checking for freetype libraries... " >&6; }
57734    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57735$as_echo "$FREETYPE_LIB_PATH" >&6; }
57736  fi
57737
57738        if test "x$FOUND_FREETYPE" != xyes; then
57739          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
57740        fi
57741      else
57742        # User specified only one of lib or include. This is an error.
57743        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
57744          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
57745$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
57746          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57747        else
57748          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
57749$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
57750          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57751        fi
57752      fi
57753    else
57754      # User did not specify settings, but we need freetype. Try to locate it.
57755
57756      if test "x$BUNDLE_FREETYPE" = x; then
57757        # If not specified, default is to bundle freetype only on windows
57758        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57759          BUNDLE_FREETYPE=yes
57760        else
57761          BUNDLE_FREETYPE=no
57762        fi
57763      fi
57764
57765      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
57766      if test "x$SYSROOT" = x; then
57767        if test "x$FOUND_FREETYPE" != xyes; then
57768          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
57769          if test "x$PKG_CONFIG" != x; then
57770
57771pkg_failed=no
57772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
57773$as_echo_n "checking for FREETYPE... " >&6; }
57774
57775if test -n "$FREETYPE_CFLAGS"; then
57776    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
57777 elif test -n "$PKG_CONFIG"; then
57778    if test -n "$PKG_CONFIG" && \
57779    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57780  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57781  ac_status=$?
57782  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57783  test $ac_status = 0; }; then
57784  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
57785else
57786  pkg_failed=yes
57787fi
57788 else
57789    pkg_failed=untried
57790fi
57791if test -n "$FREETYPE_LIBS"; then
57792    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
57793 elif test -n "$PKG_CONFIG"; then
57794    if test -n "$PKG_CONFIG" && \
57795    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57796  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57797  ac_status=$?
57798  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57799  test $ac_status = 0; }; then
57800  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
57801else
57802  pkg_failed=yes
57803fi
57804 else
57805    pkg_failed=untried
57806fi
57807
57808
57809
57810if test $pkg_failed = yes; then
57811
57812if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
57813        _pkg_short_errors_supported=yes
57814else
57815        _pkg_short_errors_supported=no
57816fi
57817        if test $_pkg_short_errors_supported = yes; then
57818	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
57819        else
57820	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
57821        fi
57822	# Put the nasty error message in config.log where it belongs
57823	echo "$FREETYPE_PKG_ERRORS" >&5
57824
57825	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57826$as_echo "no" >&6; }
57827                FOUND_FREETYPE=no
57828elif test $pkg_failed = untried; then
57829	FOUND_FREETYPE=no
57830else
57831	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
57832	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
57833        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57834$as_echo "yes" >&6; }
57835	FOUND_FREETYPE=yes
57836fi
57837            if test "x$FOUND_FREETYPE" = xyes; then
57838              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
57839              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
57840              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
57841              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
57842                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
57843              fi
57844              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
57845              if test "x$BUNDLE_FREETYPE" = xyes; then
57846                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
57847$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
57848                FOUND_FREETYPE=no
57849              else
57850                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
57851$as_echo_n "checking for freetype... " >&6; }
57852                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
57853$as_echo "yes (using pkg-config)" >&6; }
57854              fi
57855            fi
57856          fi
57857        fi
57858      fi
57859
57860      if test "x$FOUND_FREETYPE" != xyes; then
57861        # Check in well-known locations
57862        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57863          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
57864
57865  windows_path="$FREETYPE_BASE_DIR"
57866  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57867    unix_path=`$CYGPATH -u "$windows_path"`
57868    FREETYPE_BASE_DIR="$unix_path"
57869  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57870    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57871    FREETYPE_BASE_DIR="$unix_path"
57872  fi
57873
57874
57875  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
57876  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
57877  METHOD="well-known location"
57878
57879  # Let's start with an optimistic view of the world :-)
57880  FOUND_FREETYPE=yes
57881
57882  # First look for the canonical freetype main include file ft2build.h.
57883  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57884    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57885    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57886    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57887      # Fail.
57888      FOUND_FREETYPE=no
57889    fi
57890  fi
57891
57892  if test "x$FOUND_FREETYPE" = xyes; then
57893    # Include file found, let's continue the sanity check.
57894    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57895$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57896
57897    # Reset to default value
57898    FREETYPE_BASE_NAME=freetype
57899    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57900    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57901      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57902          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57903        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57904        # for the .6 version explicitly.
57905        FREETYPE_BASE_NAME=freetype.6
57906        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57907        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57908$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57909      else
57910        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57911$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57912        FOUND_FREETYPE=no
57913      fi
57914    else
57915      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57916        # On Windows, we will need both .lib and .dll file.
57917        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57918          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57919$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57920          FOUND_FREETYPE=no
57921        fi
57922      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57923          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57924        # Found lib in isa dir, use that instead.
57925        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57926        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57927$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57928      fi
57929    fi
57930  fi
57931
57932  if test "x$FOUND_FREETYPE" = xyes; then
57933
57934  # Only process if variable expands to non-empty
57935
57936  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57937    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57938
57939  # Input might be given as Windows format, start by converting to
57940  # unix format.
57941  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57942  new_path=`$CYGPATH -u "$path"`
57943
57944  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57945  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57946  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57947  # "foo.exe" is OK but "foo" is an error.
57948  #
57949  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57950  # It is also a way to make sure we got the proper file name for the real test later on.
57951  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57952  if test "x$test_shortpath" = x; then
57953    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57954$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57955    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57956  fi
57957
57958  # Call helper function which possibly converts this using DOS-style short mode.
57959  # If so, the updated path is stored in $new_path.
57960
57961  input_path="$new_path"
57962  # Check if we need to convert this using DOS-style short mode. If the path
57963  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57964  # take no chances and rewrite it.
57965  # Note: m4 eats our [], so we need to use [ and ] instead.
57966  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57967  if test "x$has_forbidden_chars" != x; then
57968    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57969    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57970    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57971    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57972      # Going to short mode and back again did indeed matter. Since short mode is
57973      # case insensitive, let's make it lowercase to improve readability.
57974      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57975      # Now convert it back to Unix-style (cygpath)
57976      input_path=`$CYGPATH -u "$shortmode_path"`
57977      new_path="$input_path"
57978    fi
57979  fi
57980
57981  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57982  if test "x$test_cygdrive_prefix" = x; then
57983    # As a simple fix, exclude /usr/bin since it's not a real path.
57984    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57985      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57986      # a path prefixed by /cygdrive for fixpath to work.
57987      new_path="$CYGWIN_ROOT_PATH$input_path"
57988    fi
57989  fi
57990
57991
57992  if test "x$path" != "x$new_path"; then
57993    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57994    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57995$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57996  fi
57997
57998    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57999
58000  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58001  has_colon=`$ECHO $path | $GREP ^.:`
58002  new_path="$path"
58003  if test "x$has_colon" = x; then
58004    # Not in mixed or Windows style, start by that.
58005    new_path=`cmd //c echo $path`
58006  fi
58007
58008
58009  input_path="$new_path"
58010  # Check if we need to convert this using DOS-style short mode. If the path
58011  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58012  # take no chances and rewrite it.
58013  # Note: m4 eats our [], so we need to use [ and ] instead.
58014  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58015  if test "x$has_forbidden_chars" != x; then
58016    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58017    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58018  fi
58019
58020
58021  windows_path="$new_path"
58022  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58023    unix_path=`$CYGPATH -u "$windows_path"`
58024    new_path="$unix_path"
58025  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58026    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58027    new_path="$unix_path"
58028  fi
58029
58030  if test "x$path" != "x$new_path"; then
58031    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58032    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58033$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58034  fi
58035
58036  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58037  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58038
58039    else
58040      # We're on a unix platform. Hooray! :)
58041      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58042      has_space=`$ECHO "$path" | $GREP " "`
58043      if test "x$has_space" != x; then
58044        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58045$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58046        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58047      fi
58048
58049      # Use eval to expand a potential ~
58050      eval path="$path"
58051      if test ! -f "$path" && test ! -d "$path"; then
58052        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58053      fi
58054
58055      if test -d "$path"; then
58056        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58057      else
58058        dir="`$DIRNAME "$path"`"
58059        base="`$BASENAME "$path"`"
58060        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58061      fi
58062    fi
58063  fi
58064
58065
58066  # Only process if variable expands to non-empty
58067
58068  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58069    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58070
58071  # Input might be given as Windows format, start by converting to
58072  # unix format.
58073  path="$POTENTIAL_FREETYPE_LIB_PATH"
58074  new_path=`$CYGPATH -u "$path"`
58075
58076  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58077  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58078  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58079  # "foo.exe" is OK but "foo" is an error.
58080  #
58081  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58082  # It is also a way to make sure we got the proper file name for the real test later on.
58083  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58084  if test "x$test_shortpath" = x; then
58085    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58086$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58087    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58088  fi
58089
58090  # Call helper function which possibly converts this using DOS-style short mode.
58091  # If so, the updated path is stored in $new_path.
58092
58093  input_path="$new_path"
58094  # Check if we need to convert this using DOS-style short mode. If the path
58095  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58096  # take no chances and rewrite it.
58097  # Note: m4 eats our [], so we need to use [ and ] instead.
58098  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58099  if test "x$has_forbidden_chars" != x; then
58100    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58101    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58102    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58103    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58104      # Going to short mode and back again did indeed matter. Since short mode is
58105      # case insensitive, let's make it lowercase to improve readability.
58106      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58107      # Now convert it back to Unix-style (cygpath)
58108      input_path=`$CYGPATH -u "$shortmode_path"`
58109      new_path="$input_path"
58110    fi
58111  fi
58112
58113  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58114  if test "x$test_cygdrive_prefix" = x; then
58115    # As a simple fix, exclude /usr/bin since it's not a real path.
58116    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58117      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58118      # a path prefixed by /cygdrive for fixpath to work.
58119      new_path="$CYGWIN_ROOT_PATH$input_path"
58120    fi
58121  fi
58122
58123
58124  if test "x$path" != "x$new_path"; then
58125    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58126    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58127$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58128  fi
58129
58130    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58131
58132  path="$POTENTIAL_FREETYPE_LIB_PATH"
58133  has_colon=`$ECHO $path | $GREP ^.:`
58134  new_path="$path"
58135  if test "x$has_colon" = x; then
58136    # Not in mixed or Windows style, start by that.
58137    new_path=`cmd //c echo $path`
58138  fi
58139
58140
58141  input_path="$new_path"
58142  # Check if we need to convert this using DOS-style short mode. If the path
58143  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58144  # take no chances and rewrite it.
58145  # Note: m4 eats our [], so we need to use [ and ] instead.
58146  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58147  if test "x$has_forbidden_chars" != x; then
58148    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58149    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58150  fi
58151
58152
58153  windows_path="$new_path"
58154  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58155    unix_path=`$CYGPATH -u "$windows_path"`
58156    new_path="$unix_path"
58157  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58158    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58159    new_path="$unix_path"
58160  fi
58161
58162  if test "x$path" != "x$new_path"; then
58163    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58164    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58165$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58166  fi
58167
58168  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58169  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58170
58171    else
58172      # We're on a unix platform. Hooray! :)
58173      path="$POTENTIAL_FREETYPE_LIB_PATH"
58174      has_space=`$ECHO "$path" | $GREP " "`
58175      if test "x$has_space" != x; then
58176        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58177$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58178        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58179      fi
58180
58181      # Use eval to expand a potential ~
58182      eval path="$path"
58183      if test ! -f "$path" && test ! -d "$path"; then
58184        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58185      fi
58186
58187      if test -d "$path"; then
58188        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58189      else
58190        dir="`$DIRNAME "$path"`"
58191        base="`$BASENAME "$path"`"
58192        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58193      fi
58194    fi
58195  fi
58196
58197
58198    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58199    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58200$as_echo_n "checking for freetype includes... " >&6; }
58201    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58202$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58203    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58204    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58205$as_echo_n "checking for freetype libraries... " >&6; }
58206    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58207$as_echo "$FREETYPE_LIB_PATH" >&6; }
58208  fi
58209
58210          if test "x$FOUND_FREETYPE" != xyes; then
58211            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
58212
58213  windows_path="$FREETYPE_BASE_DIR"
58214  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58215    unix_path=`$CYGPATH -u "$windows_path"`
58216    FREETYPE_BASE_DIR="$unix_path"
58217  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58218    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58219    FREETYPE_BASE_DIR="$unix_path"
58220  fi
58221
58222
58223  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58224  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58225  METHOD="well-known location"
58226
58227  # Let's start with an optimistic view of the world :-)
58228  FOUND_FREETYPE=yes
58229
58230  # First look for the canonical freetype main include file ft2build.h.
58231  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58232    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58233    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58234    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58235      # Fail.
58236      FOUND_FREETYPE=no
58237    fi
58238  fi
58239
58240  if test "x$FOUND_FREETYPE" = xyes; then
58241    # Include file found, let's continue the sanity check.
58242    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58243$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58244
58245    # Reset to default value
58246    FREETYPE_BASE_NAME=freetype
58247    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58248    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58249      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58250          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58251        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58252        # for the .6 version explicitly.
58253        FREETYPE_BASE_NAME=freetype.6
58254        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58255        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58256$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58257      else
58258        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58259$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58260        FOUND_FREETYPE=no
58261      fi
58262    else
58263      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58264        # On Windows, we will need both .lib and .dll file.
58265        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58266          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58267$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58268          FOUND_FREETYPE=no
58269        fi
58270      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58271          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58272        # Found lib in isa dir, use that instead.
58273        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58274        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58275$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58276      fi
58277    fi
58278  fi
58279
58280  if test "x$FOUND_FREETYPE" = xyes; then
58281
58282  # Only process if variable expands to non-empty
58283
58284  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58285    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58286
58287  # Input might be given as Windows format, start by converting to
58288  # unix format.
58289  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58290  new_path=`$CYGPATH -u "$path"`
58291
58292  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58293  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58294  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58295  # "foo.exe" is OK but "foo" is an error.
58296  #
58297  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58298  # It is also a way to make sure we got the proper file name for the real test later on.
58299  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58300  if test "x$test_shortpath" = x; then
58301    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58302$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58303    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58304  fi
58305
58306  # Call helper function which possibly converts this using DOS-style short mode.
58307  # If so, the updated path is stored in $new_path.
58308
58309  input_path="$new_path"
58310  # Check if we need to convert this using DOS-style short mode. If the path
58311  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58312  # take no chances and rewrite it.
58313  # Note: m4 eats our [], so we need to use [ and ] instead.
58314  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58315  if test "x$has_forbidden_chars" != x; then
58316    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58317    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58318    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58319    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58320      # Going to short mode and back again did indeed matter. Since short mode is
58321      # case insensitive, let's make it lowercase to improve readability.
58322      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58323      # Now convert it back to Unix-style (cygpath)
58324      input_path=`$CYGPATH -u "$shortmode_path"`
58325      new_path="$input_path"
58326    fi
58327  fi
58328
58329  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58330  if test "x$test_cygdrive_prefix" = x; then
58331    # As a simple fix, exclude /usr/bin since it's not a real path.
58332    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58333      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58334      # a path prefixed by /cygdrive for fixpath to work.
58335      new_path="$CYGWIN_ROOT_PATH$input_path"
58336    fi
58337  fi
58338
58339
58340  if test "x$path" != "x$new_path"; then
58341    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58342    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58343$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58344  fi
58345
58346    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58347
58348  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58349  has_colon=`$ECHO $path | $GREP ^.:`
58350  new_path="$path"
58351  if test "x$has_colon" = x; then
58352    # Not in mixed or Windows style, start by that.
58353    new_path=`cmd //c echo $path`
58354  fi
58355
58356
58357  input_path="$new_path"
58358  # Check if we need to convert this using DOS-style short mode. If the path
58359  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58360  # take no chances and rewrite it.
58361  # Note: m4 eats our [], so we need to use [ and ] instead.
58362  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58363  if test "x$has_forbidden_chars" != x; then
58364    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58365    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58366  fi
58367
58368
58369  windows_path="$new_path"
58370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58371    unix_path=`$CYGPATH -u "$windows_path"`
58372    new_path="$unix_path"
58373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58374    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58375    new_path="$unix_path"
58376  fi
58377
58378  if test "x$path" != "x$new_path"; then
58379    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58380    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58381$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58382  fi
58383
58384  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58385  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58386
58387    else
58388      # We're on a unix platform. Hooray! :)
58389      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58390      has_space=`$ECHO "$path" | $GREP " "`
58391      if test "x$has_space" != x; then
58392        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58393$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58394        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58395      fi
58396
58397      # Use eval to expand a potential ~
58398      eval path="$path"
58399      if test ! -f "$path" && test ! -d "$path"; then
58400        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58401      fi
58402
58403      if test -d "$path"; then
58404        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58405      else
58406        dir="`$DIRNAME "$path"`"
58407        base="`$BASENAME "$path"`"
58408        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58409      fi
58410    fi
58411  fi
58412
58413
58414  # Only process if variable expands to non-empty
58415
58416  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58417    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58418
58419  # Input might be given as Windows format, start by converting to
58420  # unix format.
58421  path="$POTENTIAL_FREETYPE_LIB_PATH"
58422  new_path=`$CYGPATH -u "$path"`
58423
58424  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58425  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58426  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58427  # "foo.exe" is OK but "foo" is an error.
58428  #
58429  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58430  # It is also a way to make sure we got the proper file name for the real test later on.
58431  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58432  if test "x$test_shortpath" = x; then
58433    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58434$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58435    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58436  fi
58437
58438  # Call helper function which possibly converts this using DOS-style short mode.
58439  # If so, the updated path is stored in $new_path.
58440
58441  input_path="$new_path"
58442  # Check if we need to convert this using DOS-style short mode. If the path
58443  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58444  # take no chances and rewrite it.
58445  # Note: m4 eats our [], so we need to use [ and ] instead.
58446  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58447  if test "x$has_forbidden_chars" != x; then
58448    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58449    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58450    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58451    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58452      # Going to short mode and back again did indeed matter. Since short mode is
58453      # case insensitive, let's make it lowercase to improve readability.
58454      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58455      # Now convert it back to Unix-style (cygpath)
58456      input_path=`$CYGPATH -u "$shortmode_path"`
58457      new_path="$input_path"
58458    fi
58459  fi
58460
58461  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58462  if test "x$test_cygdrive_prefix" = x; then
58463    # As a simple fix, exclude /usr/bin since it's not a real path.
58464    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58465      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58466      # a path prefixed by /cygdrive for fixpath to work.
58467      new_path="$CYGWIN_ROOT_PATH$input_path"
58468    fi
58469  fi
58470
58471
58472  if test "x$path" != "x$new_path"; then
58473    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58474    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58475$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58476  fi
58477
58478    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58479
58480  path="$POTENTIAL_FREETYPE_LIB_PATH"
58481  has_colon=`$ECHO $path | $GREP ^.:`
58482  new_path="$path"
58483  if test "x$has_colon" = x; then
58484    # Not in mixed or Windows style, start by that.
58485    new_path=`cmd //c echo $path`
58486  fi
58487
58488
58489  input_path="$new_path"
58490  # Check if we need to convert this using DOS-style short mode. If the path
58491  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58492  # take no chances and rewrite it.
58493  # Note: m4 eats our [], so we need to use [ and ] instead.
58494  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58495  if test "x$has_forbidden_chars" != x; then
58496    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58497    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58498  fi
58499
58500
58501  windows_path="$new_path"
58502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58503    unix_path=`$CYGPATH -u "$windows_path"`
58504    new_path="$unix_path"
58505  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58506    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58507    new_path="$unix_path"
58508  fi
58509
58510  if test "x$path" != "x$new_path"; then
58511    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58512    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58513$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58514  fi
58515
58516  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58517  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58518
58519    else
58520      # We're on a unix platform. Hooray! :)
58521      path="$POTENTIAL_FREETYPE_LIB_PATH"
58522      has_space=`$ECHO "$path" | $GREP " "`
58523      if test "x$has_space" != x; then
58524        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58525$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58526        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58527      fi
58528
58529      # Use eval to expand a potential ~
58530      eval path="$path"
58531      if test ! -f "$path" && test ! -d "$path"; then
58532        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58533      fi
58534
58535      if test -d "$path"; then
58536        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58537      else
58538        dir="`$DIRNAME "$path"`"
58539        base="`$BASENAME "$path"`"
58540        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58541      fi
58542    fi
58543  fi
58544
58545
58546    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58547    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58548$as_echo_n "checking for freetype includes... " >&6; }
58549    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58550$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58551    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58552    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58553$as_echo_n "checking for freetype libraries... " >&6; }
58554    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58555$as_echo "$FREETYPE_LIB_PATH" >&6; }
58556  fi
58557
58558          fi
58559          if test "x$FOUND_FREETYPE" != xyes; then
58560            FREETYPE_BASE_DIR="$HOME/freetype"
58561
58562  windows_path="$FREETYPE_BASE_DIR"
58563  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58564    unix_path=`$CYGPATH -u "$windows_path"`
58565    FREETYPE_BASE_DIR="$unix_path"
58566  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58567    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58568    FREETYPE_BASE_DIR="$unix_path"
58569  fi
58570
58571            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
58572
58573  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58574  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
58575  METHOD="well-known location"
58576
58577  # Let's start with an optimistic view of the world :-)
58578  FOUND_FREETYPE=yes
58579
58580  # First look for the canonical freetype main include file ft2build.h.
58581  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58582    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58583    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58584    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58585      # Fail.
58586      FOUND_FREETYPE=no
58587    fi
58588  fi
58589
58590  if test "x$FOUND_FREETYPE" = xyes; then
58591    # Include file found, let's continue the sanity check.
58592    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58593$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58594
58595    # Reset to default value
58596    FREETYPE_BASE_NAME=freetype
58597    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58598    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58599      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58600          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58601        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58602        # for the .6 version explicitly.
58603        FREETYPE_BASE_NAME=freetype.6
58604        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58605        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58606$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58607      else
58608        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58609$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58610        FOUND_FREETYPE=no
58611      fi
58612    else
58613      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58614        # On Windows, we will need both .lib and .dll file.
58615        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58616          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58617$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58618          FOUND_FREETYPE=no
58619        fi
58620      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58621          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58622        # Found lib in isa dir, use that instead.
58623        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58624        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58625$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58626      fi
58627    fi
58628  fi
58629
58630  if test "x$FOUND_FREETYPE" = xyes; then
58631
58632  # Only process if variable expands to non-empty
58633
58634  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58635    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58636
58637  # Input might be given as Windows format, start by converting to
58638  # unix format.
58639  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58640  new_path=`$CYGPATH -u "$path"`
58641
58642  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58643  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58644  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58645  # "foo.exe" is OK but "foo" is an error.
58646  #
58647  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58648  # It is also a way to make sure we got the proper file name for the real test later on.
58649  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58650  if test "x$test_shortpath" = x; then
58651    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58652$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58653    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58654  fi
58655
58656  # Call helper function which possibly converts this using DOS-style short mode.
58657  # If so, the updated path is stored in $new_path.
58658
58659  input_path="$new_path"
58660  # Check if we need to convert this using DOS-style short mode. If the path
58661  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58662  # take no chances and rewrite it.
58663  # Note: m4 eats our [], so we need to use [ and ] instead.
58664  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58665  if test "x$has_forbidden_chars" != x; then
58666    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58667    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58668    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58669    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58670      # Going to short mode and back again did indeed matter. Since short mode is
58671      # case insensitive, let's make it lowercase to improve readability.
58672      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58673      # Now convert it back to Unix-style (cygpath)
58674      input_path=`$CYGPATH -u "$shortmode_path"`
58675      new_path="$input_path"
58676    fi
58677  fi
58678
58679  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58680  if test "x$test_cygdrive_prefix" = x; then
58681    # As a simple fix, exclude /usr/bin since it's not a real path.
58682    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58683      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58684      # a path prefixed by /cygdrive for fixpath to work.
58685      new_path="$CYGWIN_ROOT_PATH$input_path"
58686    fi
58687  fi
58688
58689
58690  if test "x$path" != "x$new_path"; then
58691    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58692    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58693$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58694  fi
58695
58696    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58697
58698  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58699  has_colon=`$ECHO $path | $GREP ^.:`
58700  new_path="$path"
58701  if test "x$has_colon" = x; then
58702    # Not in mixed or Windows style, start by that.
58703    new_path=`cmd //c echo $path`
58704  fi
58705
58706
58707  input_path="$new_path"
58708  # Check if we need to convert this using DOS-style short mode. If the path
58709  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58710  # take no chances and rewrite it.
58711  # Note: m4 eats our [], so we need to use [ and ] instead.
58712  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58713  if test "x$has_forbidden_chars" != x; then
58714    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58715    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58716  fi
58717
58718
58719  windows_path="$new_path"
58720  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58721    unix_path=`$CYGPATH -u "$windows_path"`
58722    new_path="$unix_path"
58723  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58724    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58725    new_path="$unix_path"
58726  fi
58727
58728  if test "x$path" != "x$new_path"; then
58729    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58730    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58731$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58732  fi
58733
58734  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58735  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58736
58737    else
58738      # We're on a unix platform. Hooray! :)
58739      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58740      has_space=`$ECHO "$path" | $GREP " "`
58741      if test "x$has_space" != x; then
58742        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58743$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58744        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58745      fi
58746
58747      # Use eval to expand a potential ~
58748      eval path="$path"
58749      if test ! -f "$path" && test ! -d "$path"; then
58750        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58751      fi
58752
58753      if test -d "$path"; then
58754        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58755      else
58756        dir="`$DIRNAME "$path"`"
58757        base="`$BASENAME "$path"`"
58758        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58759      fi
58760    fi
58761  fi
58762
58763
58764  # Only process if variable expands to non-empty
58765
58766  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58767    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58768
58769  # Input might be given as Windows format, start by converting to
58770  # unix format.
58771  path="$POTENTIAL_FREETYPE_LIB_PATH"
58772  new_path=`$CYGPATH -u "$path"`
58773
58774  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58775  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58776  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58777  # "foo.exe" is OK but "foo" is an error.
58778  #
58779  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58780  # It is also a way to make sure we got the proper file name for the real test later on.
58781  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58782  if test "x$test_shortpath" = x; then
58783    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58784$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58785    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58786  fi
58787
58788  # Call helper function which possibly converts this using DOS-style short mode.
58789  # If so, the updated path is stored in $new_path.
58790
58791  input_path="$new_path"
58792  # Check if we need to convert this using DOS-style short mode. If the path
58793  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58794  # take no chances and rewrite it.
58795  # Note: m4 eats our [], so we need to use [ and ] instead.
58796  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58797  if test "x$has_forbidden_chars" != x; then
58798    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58799    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58800    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58801    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58802      # Going to short mode and back again did indeed matter. Since short mode is
58803      # case insensitive, let's make it lowercase to improve readability.
58804      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58805      # Now convert it back to Unix-style (cygpath)
58806      input_path=`$CYGPATH -u "$shortmode_path"`
58807      new_path="$input_path"
58808    fi
58809  fi
58810
58811  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58812  if test "x$test_cygdrive_prefix" = x; then
58813    # As a simple fix, exclude /usr/bin since it's not a real path.
58814    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58815      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58816      # a path prefixed by /cygdrive for fixpath to work.
58817      new_path="$CYGWIN_ROOT_PATH$input_path"
58818    fi
58819  fi
58820
58821
58822  if test "x$path" != "x$new_path"; then
58823    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58824    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58825$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58826  fi
58827
58828    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58829
58830  path="$POTENTIAL_FREETYPE_LIB_PATH"
58831  has_colon=`$ECHO $path | $GREP ^.:`
58832  new_path="$path"
58833  if test "x$has_colon" = x; then
58834    # Not in mixed or Windows style, start by that.
58835    new_path=`cmd //c echo $path`
58836  fi
58837
58838
58839  input_path="$new_path"
58840  # Check if we need to convert this using DOS-style short mode. If the path
58841  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58842  # take no chances and rewrite it.
58843  # Note: m4 eats our [], so we need to use [ and ] instead.
58844  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58845  if test "x$has_forbidden_chars" != x; then
58846    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58847    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58848  fi
58849
58850
58851  windows_path="$new_path"
58852  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58853    unix_path=`$CYGPATH -u "$windows_path"`
58854    new_path="$unix_path"
58855  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58856    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58857    new_path="$unix_path"
58858  fi
58859
58860  if test "x$path" != "x$new_path"; then
58861    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58862    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58863$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58864  fi
58865
58866  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58867  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58868
58869    else
58870      # We're on a unix platform. Hooray! :)
58871      path="$POTENTIAL_FREETYPE_LIB_PATH"
58872      has_space=`$ECHO "$path" | $GREP " "`
58873      if test "x$has_space" != x; then
58874        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58875$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58876        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58877      fi
58878
58879      # Use eval to expand a potential ~
58880      eval path="$path"
58881      if test ! -f "$path" && test ! -d "$path"; then
58882        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58883      fi
58884
58885      if test -d "$path"; then
58886        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58887      else
58888        dir="`$DIRNAME "$path"`"
58889        base="`$BASENAME "$path"`"
58890        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58891      fi
58892    fi
58893  fi
58894
58895
58896    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58897    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58898$as_echo_n "checking for freetype includes... " >&6; }
58899    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58900$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58901    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58902    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58903$as_echo_n "checking for freetype libraries... " >&6; }
58904    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58905$as_echo "$FREETYPE_LIB_PATH" >&6; }
58906  fi
58907
58908            else
58909
58910  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58911  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
58912  METHOD="well-known location"
58913
58914  # Let's start with an optimistic view of the world :-)
58915  FOUND_FREETYPE=yes
58916
58917  # First look for the canonical freetype main include file ft2build.h.
58918  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58919    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58920    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58921    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58922      # Fail.
58923      FOUND_FREETYPE=no
58924    fi
58925  fi
58926
58927  if test "x$FOUND_FREETYPE" = xyes; then
58928    # Include file found, let's continue the sanity check.
58929    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58930$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58931
58932    # Reset to default value
58933    FREETYPE_BASE_NAME=freetype
58934    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58935    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58936      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58937          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58938        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58939        # for the .6 version explicitly.
58940        FREETYPE_BASE_NAME=freetype.6
58941        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58942        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58943$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58944      else
58945        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58946$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58947        FOUND_FREETYPE=no
58948      fi
58949    else
58950      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58951        # On Windows, we will need both .lib and .dll file.
58952        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58953          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58954$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58955          FOUND_FREETYPE=no
58956        fi
58957      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58958          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58959        # Found lib in isa dir, use that instead.
58960        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58961        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58962$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58963      fi
58964    fi
58965  fi
58966
58967  if test "x$FOUND_FREETYPE" = xyes; then
58968
58969  # Only process if variable expands to non-empty
58970
58971  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58972    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58973
58974  # Input might be given as Windows format, start by converting to
58975  # unix format.
58976  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58977  new_path=`$CYGPATH -u "$path"`
58978
58979  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58980  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58981  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58982  # "foo.exe" is OK but "foo" is an error.
58983  #
58984  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58985  # It is also a way to make sure we got the proper file name for the real test later on.
58986  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58987  if test "x$test_shortpath" = x; then
58988    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58989$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58990    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58991  fi
58992
58993  # Call helper function which possibly converts this using DOS-style short mode.
58994  # If so, the updated path is stored in $new_path.
58995
58996  input_path="$new_path"
58997  # Check if we need to convert this using DOS-style short mode. If the path
58998  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58999  # take no chances and rewrite it.
59000  # Note: m4 eats our [], so we need to use [ and ] instead.
59001  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59002  if test "x$has_forbidden_chars" != x; then
59003    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59004    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59005    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59006    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59007      # Going to short mode and back again did indeed matter. Since short mode is
59008      # case insensitive, let's make it lowercase to improve readability.
59009      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59010      # Now convert it back to Unix-style (cygpath)
59011      input_path=`$CYGPATH -u "$shortmode_path"`
59012      new_path="$input_path"
59013    fi
59014  fi
59015
59016  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59017  if test "x$test_cygdrive_prefix" = x; then
59018    # As a simple fix, exclude /usr/bin since it's not a real path.
59019    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59020      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59021      # a path prefixed by /cygdrive for fixpath to work.
59022      new_path="$CYGWIN_ROOT_PATH$input_path"
59023    fi
59024  fi
59025
59026
59027  if test "x$path" != "x$new_path"; then
59028    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59029    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59030$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59031  fi
59032
59033    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59034
59035  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59036  has_colon=`$ECHO $path | $GREP ^.:`
59037  new_path="$path"
59038  if test "x$has_colon" = x; then
59039    # Not in mixed or Windows style, start by that.
59040    new_path=`cmd //c echo $path`
59041  fi
59042
59043
59044  input_path="$new_path"
59045  # Check if we need to convert this using DOS-style short mode. If the path
59046  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59047  # take no chances and rewrite it.
59048  # Note: m4 eats our [], so we need to use [ and ] instead.
59049  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59050  if test "x$has_forbidden_chars" != x; then
59051    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59052    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59053  fi
59054
59055
59056  windows_path="$new_path"
59057  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59058    unix_path=`$CYGPATH -u "$windows_path"`
59059    new_path="$unix_path"
59060  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59061    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59062    new_path="$unix_path"
59063  fi
59064
59065  if test "x$path" != "x$new_path"; then
59066    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59067    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59068$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59069  fi
59070
59071  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59072  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59073
59074    else
59075      # We're on a unix platform. Hooray! :)
59076      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59077      has_space=`$ECHO "$path" | $GREP " "`
59078      if test "x$has_space" != x; then
59079        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59080$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59081        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59082      fi
59083
59084      # Use eval to expand a potential ~
59085      eval path="$path"
59086      if test ! -f "$path" && test ! -d "$path"; then
59087        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59088      fi
59089
59090      if test -d "$path"; then
59091        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59092      else
59093        dir="`$DIRNAME "$path"`"
59094        base="`$BASENAME "$path"`"
59095        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59096      fi
59097    fi
59098  fi
59099
59100
59101  # Only process if variable expands to non-empty
59102
59103  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59104    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59105
59106  # Input might be given as Windows format, start by converting to
59107  # unix format.
59108  path="$POTENTIAL_FREETYPE_LIB_PATH"
59109  new_path=`$CYGPATH -u "$path"`
59110
59111  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59112  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59113  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59114  # "foo.exe" is OK but "foo" is an error.
59115  #
59116  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59117  # It is also a way to make sure we got the proper file name for the real test later on.
59118  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59119  if test "x$test_shortpath" = x; then
59120    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59121$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59122    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59123  fi
59124
59125  # Call helper function which possibly converts this using DOS-style short mode.
59126  # If so, the updated path is stored in $new_path.
59127
59128  input_path="$new_path"
59129  # Check if we need to convert this using DOS-style short mode. If the path
59130  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59131  # take no chances and rewrite it.
59132  # Note: m4 eats our [], so we need to use [ and ] instead.
59133  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59134  if test "x$has_forbidden_chars" != x; then
59135    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59136    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59137    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59138    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59139      # Going to short mode and back again did indeed matter. Since short mode is
59140      # case insensitive, let's make it lowercase to improve readability.
59141      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59142      # Now convert it back to Unix-style (cygpath)
59143      input_path=`$CYGPATH -u "$shortmode_path"`
59144      new_path="$input_path"
59145    fi
59146  fi
59147
59148  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59149  if test "x$test_cygdrive_prefix" = x; then
59150    # As a simple fix, exclude /usr/bin since it's not a real path.
59151    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59152      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59153      # a path prefixed by /cygdrive for fixpath to work.
59154      new_path="$CYGWIN_ROOT_PATH$input_path"
59155    fi
59156  fi
59157
59158
59159  if test "x$path" != "x$new_path"; then
59160    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59161    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59162$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59163  fi
59164
59165    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59166
59167  path="$POTENTIAL_FREETYPE_LIB_PATH"
59168  has_colon=`$ECHO $path | $GREP ^.:`
59169  new_path="$path"
59170  if test "x$has_colon" = x; then
59171    # Not in mixed or Windows style, start by that.
59172    new_path=`cmd //c echo $path`
59173  fi
59174
59175
59176  input_path="$new_path"
59177  # Check if we need to convert this using DOS-style short mode. If the path
59178  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59179  # take no chances and rewrite it.
59180  # Note: m4 eats our [], so we need to use [ and ] instead.
59181  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59182  if test "x$has_forbidden_chars" != x; then
59183    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59184    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59185  fi
59186
59187
59188  windows_path="$new_path"
59189  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59190    unix_path=`$CYGPATH -u "$windows_path"`
59191    new_path="$unix_path"
59192  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59193    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59194    new_path="$unix_path"
59195  fi
59196
59197  if test "x$path" != "x$new_path"; then
59198    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59199    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59200$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59201  fi
59202
59203  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59204  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59205
59206    else
59207      # We're on a unix platform. Hooray! :)
59208      path="$POTENTIAL_FREETYPE_LIB_PATH"
59209      has_space=`$ECHO "$path" | $GREP " "`
59210      if test "x$has_space" != x; then
59211        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59212$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59213        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59214      fi
59215
59216      # Use eval to expand a potential ~
59217      eval path="$path"
59218      if test ! -f "$path" && test ! -d "$path"; then
59219        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59220      fi
59221
59222      if test -d "$path"; then
59223        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59224      else
59225        dir="`$DIRNAME "$path"`"
59226        base="`$BASENAME "$path"`"
59227        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59228      fi
59229    fi
59230  fi
59231
59232
59233    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59234    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59235$as_echo_n "checking for freetype includes... " >&6; }
59236    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59237$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59238    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59239    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59240$as_echo_n "checking for freetype libraries... " >&6; }
59241    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59242$as_echo "$FREETYPE_LIB_PATH" >&6; }
59243  fi
59244
59245            fi
59246            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
59247                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
59248              # Source is available, as a last resort try to build freetype in default location
59249
59250  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
59251  BUILD_FREETYPE=yes
59252
59253  # Check if the freetype sources are acessible..
59254  if ! test -d $FREETYPE_SRC_PATH; then
59255    { $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
59256$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
59257    BUILD_FREETYPE=no
59258  fi
59259  # ..and contain a vc2010 project file
59260  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
59261  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
59262    { $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
59263$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
59264    BUILD_FREETYPE=no
59265  fi
59266  # Now check if configure found a version of 'msbuild.exe'
59267  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
59268    { $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
59269$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;}
59270    BUILD_FREETYPE=no
59271  fi
59272
59273  # Ready to go..
59274  if test "x$BUILD_FREETYPE" = xyes; then
59275    # msbuild requires trailing slashes for output directories
59276    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
59277    freetype_lib_path_unix="$freetype_lib_path"
59278    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
59279
59280  unix_path="$vcxproj_path"
59281  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59282    windows_path=`$CYGPATH -m "$unix_path"`
59283    vcxproj_path="$windows_path"
59284  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59285    windows_path=`cmd //c echo $unix_path`
59286    vcxproj_path="$windows_path"
59287  fi
59288
59289
59290  unix_path="$freetype_lib_path"
59291  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59292    windows_path=`$CYGPATH -m "$unix_path"`
59293    freetype_lib_path="$windows_path"
59294  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59295    windows_path=`cmd //c echo $unix_path`
59296    freetype_lib_path="$windows_path"
59297  fi
59298
59299
59300  unix_path="$freetype_obj_path"
59301  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59302    windows_path=`$CYGPATH -m "$unix_path"`
59303    freetype_obj_path="$windows_path"
59304  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59305    windows_path=`cmd //c echo $unix_path`
59306    freetype_obj_path="$windows_path"
59307  fi
59308
59309    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59310      freetype_platform=x64
59311    else
59312      freetype_platform=win32
59313    fi
59314
59315    # The original freetype project file is for VS 2010 (i.e. 'v100'),
59316    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
59317    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
59318    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
59319    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
59320$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
59321
59322    # First we try to build the freetype.dll
59323    $ECHO -e "@echo off\n"\
59324        "$MSBUILD $vcxproj_path "\
59325        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59326        "/p:Configuration=\"Release Multithreaded\" "\
59327        "/p:Platform=$freetype_platform "\
59328        "/p:ConfigurationType=DynamicLibrary "\
59329        "/p:TargetName=freetype "\
59330        "/p:OutDir=\"$freetype_lib_path\" "\
59331        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
59332    cmd /c freetype.bat
59333
59334    if test -s "$freetype_lib_path_unix/freetype.dll"; then
59335      # If that succeeds we also build freetype.lib
59336      $ECHO -e "@echo off\n"\
59337          "$MSBUILD $vcxproj_path "\
59338          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59339          "/p:Configuration=\"Release Multithreaded\" "\
59340          "/p:Platform=$freetype_platform "\
59341          "/p:ConfigurationType=StaticLibrary "\
59342          "/p:TargetName=freetype "\
59343          "/p:OutDir=\"$freetype_lib_path\" "\
59344          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
59345      cmd /c freetype.bat
59346
59347      if test -s "$freetype_lib_path_unix/freetype.lib"; then
59348        # Once we build both, lib and dll, set freetype lib and include path appropriately
59349        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
59350        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
59351        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
59352$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
59353      else
59354        BUILD_FREETYPE=no
59355      fi
59356    else
59357      BUILD_FREETYPE=no
59358    fi
59359  fi
59360
59361              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59362
59363  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59364  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59365  METHOD="well-known location"
59366
59367  # Let's start with an optimistic view of the world :-)
59368  FOUND_FREETYPE=yes
59369
59370  # First look for the canonical freetype main include file ft2build.h.
59371  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59372    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59373    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59374    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59375      # Fail.
59376      FOUND_FREETYPE=no
59377    fi
59378  fi
59379
59380  if test "x$FOUND_FREETYPE" = xyes; then
59381    # Include file found, let's continue the sanity check.
59382    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59383$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59384
59385    # Reset to default value
59386    FREETYPE_BASE_NAME=freetype
59387    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59388    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59389      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59390          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59391        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59392        # for the .6 version explicitly.
59393        FREETYPE_BASE_NAME=freetype.6
59394        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59395        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59396$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59397      else
59398        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59399$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59400        FOUND_FREETYPE=no
59401      fi
59402    else
59403      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59404        # On Windows, we will need both .lib and .dll file.
59405        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59406          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59407$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59408          FOUND_FREETYPE=no
59409        fi
59410      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59411          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59412        # Found lib in isa dir, use that instead.
59413        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59414        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59415$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59416      fi
59417    fi
59418  fi
59419
59420  if test "x$FOUND_FREETYPE" = xyes; then
59421
59422  # Only process if variable expands to non-empty
59423
59424  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59425    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59426
59427  # Input might be given as Windows format, start by converting to
59428  # unix format.
59429  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59430  new_path=`$CYGPATH -u "$path"`
59431
59432  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59433  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59434  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59435  # "foo.exe" is OK but "foo" is an error.
59436  #
59437  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59438  # It is also a way to make sure we got the proper file name for the real test later on.
59439  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59440  if test "x$test_shortpath" = x; then
59441    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59442$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59443    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59444  fi
59445
59446  # Call helper function which possibly converts this using DOS-style short mode.
59447  # If so, the updated path is stored in $new_path.
59448
59449  input_path="$new_path"
59450  # Check if we need to convert this using DOS-style short mode. If the path
59451  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59452  # take no chances and rewrite it.
59453  # Note: m4 eats our [], so we need to use [ and ] instead.
59454  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59455  if test "x$has_forbidden_chars" != x; then
59456    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59457    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59458    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59459    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59460      # Going to short mode and back again did indeed matter. Since short mode is
59461      # case insensitive, let's make it lowercase to improve readability.
59462      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59463      # Now convert it back to Unix-style (cygpath)
59464      input_path=`$CYGPATH -u "$shortmode_path"`
59465      new_path="$input_path"
59466    fi
59467  fi
59468
59469  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59470  if test "x$test_cygdrive_prefix" = x; then
59471    # As a simple fix, exclude /usr/bin since it's not a real path.
59472    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59473      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59474      # a path prefixed by /cygdrive for fixpath to work.
59475      new_path="$CYGWIN_ROOT_PATH$input_path"
59476    fi
59477  fi
59478
59479
59480  if test "x$path" != "x$new_path"; then
59481    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59482    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59483$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59484  fi
59485
59486    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59487
59488  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59489  has_colon=`$ECHO $path | $GREP ^.:`
59490  new_path="$path"
59491  if test "x$has_colon" = x; then
59492    # Not in mixed or Windows style, start by that.
59493    new_path=`cmd //c echo $path`
59494  fi
59495
59496
59497  input_path="$new_path"
59498  # Check if we need to convert this using DOS-style short mode. If the path
59499  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59500  # take no chances and rewrite it.
59501  # Note: m4 eats our [], so we need to use [ and ] instead.
59502  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59503  if test "x$has_forbidden_chars" != x; then
59504    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59505    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59506  fi
59507
59508
59509  windows_path="$new_path"
59510  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59511    unix_path=`$CYGPATH -u "$windows_path"`
59512    new_path="$unix_path"
59513  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59514    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59515    new_path="$unix_path"
59516  fi
59517
59518  if test "x$path" != "x$new_path"; then
59519    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59520    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59521$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59522  fi
59523
59524  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59525  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59526
59527    else
59528      # We're on a unix platform. Hooray! :)
59529      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59530      has_space=`$ECHO "$path" | $GREP " "`
59531      if test "x$has_space" != x; then
59532        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59533$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59534        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59535      fi
59536
59537      # Use eval to expand a potential ~
59538      eval path="$path"
59539      if test ! -f "$path" && test ! -d "$path"; then
59540        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59541      fi
59542
59543      if test -d "$path"; then
59544        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59545      else
59546        dir="`$DIRNAME "$path"`"
59547        base="`$BASENAME "$path"`"
59548        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59549      fi
59550    fi
59551  fi
59552
59553
59554  # Only process if variable expands to non-empty
59555
59556  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59557    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59558
59559  # Input might be given as Windows format, start by converting to
59560  # unix format.
59561  path="$POTENTIAL_FREETYPE_LIB_PATH"
59562  new_path=`$CYGPATH -u "$path"`
59563
59564  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59565  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59566  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59567  # "foo.exe" is OK but "foo" is an error.
59568  #
59569  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59570  # It is also a way to make sure we got the proper file name for the real test later on.
59571  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59572  if test "x$test_shortpath" = x; then
59573    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59574$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59575    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59576  fi
59577
59578  # Call helper function which possibly converts this using DOS-style short mode.
59579  # If so, the updated path is stored in $new_path.
59580
59581  input_path="$new_path"
59582  # Check if we need to convert this using DOS-style short mode. If the path
59583  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59584  # take no chances and rewrite it.
59585  # Note: m4 eats our [], so we need to use [ and ] instead.
59586  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59587  if test "x$has_forbidden_chars" != x; then
59588    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59589    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59590    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59591    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59592      # Going to short mode and back again did indeed matter. Since short mode is
59593      # case insensitive, let's make it lowercase to improve readability.
59594      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59595      # Now convert it back to Unix-style (cygpath)
59596      input_path=`$CYGPATH -u "$shortmode_path"`
59597      new_path="$input_path"
59598    fi
59599  fi
59600
59601  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59602  if test "x$test_cygdrive_prefix" = x; then
59603    # As a simple fix, exclude /usr/bin since it's not a real path.
59604    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59605      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59606      # a path prefixed by /cygdrive for fixpath to work.
59607      new_path="$CYGWIN_ROOT_PATH$input_path"
59608    fi
59609  fi
59610
59611
59612  if test "x$path" != "x$new_path"; then
59613    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59614    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59615$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59616  fi
59617
59618    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59619
59620  path="$POTENTIAL_FREETYPE_LIB_PATH"
59621  has_colon=`$ECHO $path | $GREP ^.:`
59622  new_path="$path"
59623  if test "x$has_colon" = x; then
59624    # Not in mixed or Windows style, start by that.
59625    new_path=`cmd //c echo $path`
59626  fi
59627
59628
59629  input_path="$new_path"
59630  # Check if we need to convert this using DOS-style short mode. If the path
59631  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59632  # take no chances and rewrite it.
59633  # Note: m4 eats our [], so we need to use [ and ] instead.
59634  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59635  if test "x$has_forbidden_chars" != x; then
59636    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59637    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59638  fi
59639
59640
59641  windows_path="$new_path"
59642  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59643    unix_path=`$CYGPATH -u "$windows_path"`
59644    new_path="$unix_path"
59645  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59646    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59647    new_path="$unix_path"
59648  fi
59649
59650  if test "x$path" != "x$new_path"; then
59651    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59652    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59653$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59654  fi
59655
59656  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59657  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59658
59659    else
59660      # We're on a unix platform. Hooray! :)
59661      path="$POTENTIAL_FREETYPE_LIB_PATH"
59662      has_space=`$ECHO "$path" | $GREP " "`
59663      if test "x$has_space" != x; then
59664        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59665$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59666        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59667      fi
59668
59669      # Use eval to expand a potential ~
59670      eval path="$path"
59671      if test ! -f "$path" && test ! -d "$path"; then
59672        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59673      fi
59674
59675      if test -d "$path"; then
59676        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59677      else
59678        dir="`$DIRNAME "$path"`"
59679        base="`$BASENAME "$path"`"
59680        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59681      fi
59682    fi
59683  fi
59684
59685
59686    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59687    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59688$as_echo_n "checking for freetype includes... " >&6; }
59689    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59690$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59691    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59692    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59693$as_echo_n "checking for freetype libraries... " >&6; }
59694    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59695$as_echo "$FREETYPE_LIB_PATH" >&6; }
59696  fi
59697
59698              else
59699
59700  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59701  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59702  METHOD="well-known location"
59703
59704  # Let's start with an optimistic view of the world :-)
59705  FOUND_FREETYPE=yes
59706
59707  # First look for the canonical freetype main include file ft2build.h.
59708  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59709    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59710    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59711    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59712      # Fail.
59713      FOUND_FREETYPE=no
59714    fi
59715  fi
59716
59717  if test "x$FOUND_FREETYPE" = xyes; then
59718    # Include file found, let's continue the sanity check.
59719    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59720$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59721
59722    # Reset to default value
59723    FREETYPE_BASE_NAME=freetype
59724    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59725    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59726      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59727          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59728        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59729        # for the .6 version explicitly.
59730        FREETYPE_BASE_NAME=freetype.6
59731        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59732        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59733$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59734      else
59735        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59736$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59737        FOUND_FREETYPE=no
59738      fi
59739    else
59740      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59741        # On Windows, we will need both .lib and .dll file.
59742        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59743          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59744$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59745          FOUND_FREETYPE=no
59746        fi
59747      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59748          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59749        # Found lib in isa dir, use that instead.
59750        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59751        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59752$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59753      fi
59754    fi
59755  fi
59756
59757  if test "x$FOUND_FREETYPE" = xyes; then
59758
59759  # Only process if variable expands to non-empty
59760
59761  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59762    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59763
59764  # Input might be given as Windows format, start by converting to
59765  # unix format.
59766  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59767  new_path=`$CYGPATH -u "$path"`
59768
59769  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59770  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59771  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59772  # "foo.exe" is OK but "foo" is an error.
59773  #
59774  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59775  # It is also a way to make sure we got the proper file name for the real test later on.
59776  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59777  if test "x$test_shortpath" = x; then
59778    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59779$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59780    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59781  fi
59782
59783  # Call helper function which possibly converts this using DOS-style short mode.
59784  # If so, the updated path is stored in $new_path.
59785
59786  input_path="$new_path"
59787  # Check if we need to convert this using DOS-style short mode. If the path
59788  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59789  # take no chances and rewrite it.
59790  # Note: m4 eats our [], so we need to use [ and ] instead.
59791  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59792  if test "x$has_forbidden_chars" != x; then
59793    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59794    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59795    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59796    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59797      # Going to short mode and back again did indeed matter. Since short mode is
59798      # case insensitive, let's make it lowercase to improve readability.
59799      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59800      # Now convert it back to Unix-style (cygpath)
59801      input_path=`$CYGPATH -u "$shortmode_path"`
59802      new_path="$input_path"
59803    fi
59804  fi
59805
59806  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59807  if test "x$test_cygdrive_prefix" = x; then
59808    # As a simple fix, exclude /usr/bin since it's not a real path.
59809    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59810      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59811      # a path prefixed by /cygdrive for fixpath to work.
59812      new_path="$CYGWIN_ROOT_PATH$input_path"
59813    fi
59814  fi
59815
59816
59817  if test "x$path" != "x$new_path"; then
59818    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59819    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59820$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59821  fi
59822
59823    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59824
59825  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59826  has_colon=`$ECHO $path | $GREP ^.:`
59827  new_path="$path"
59828  if test "x$has_colon" = x; then
59829    # Not in mixed or Windows style, start by that.
59830    new_path=`cmd //c echo $path`
59831  fi
59832
59833
59834  input_path="$new_path"
59835  # Check if we need to convert this using DOS-style short mode. If the path
59836  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59837  # take no chances and rewrite it.
59838  # Note: m4 eats our [], so we need to use [ and ] instead.
59839  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59840  if test "x$has_forbidden_chars" != x; then
59841    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59842    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59843  fi
59844
59845
59846  windows_path="$new_path"
59847  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59848    unix_path=`$CYGPATH -u "$windows_path"`
59849    new_path="$unix_path"
59850  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59851    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59852    new_path="$unix_path"
59853  fi
59854
59855  if test "x$path" != "x$new_path"; then
59856    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59857    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59858$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59859  fi
59860
59861  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59862  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59863
59864    else
59865      # We're on a unix platform. Hooray! :)
59866      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59867      has_space=`$ECHO "$path" | $GREP " "`
59868      if test "x$has_space" != x; then
59869        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59870$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59871        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59872      fi
59873
59874      # Use eval to expand a potential ~
59875      eval path="$path"
59876      if test ! -f "$path" && test ! -d "$path"; then
59877        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59878      fi
59879
59880      if test -d "$path"; then
59881        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59882      else
59883        dir="`$DIRNAME "$path"`"
59884        base="`$BASENAME "$path"`"
59885        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59886      fi
59887    fi
59888  fi
59889
59890
59891  # Only process if variable expands to non-empty
59892
59893  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59894    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59895
59896  # Input might be given as Windows format, start by converting to
59897  # unix format.
59898  path="$POTENTIAL_FREETYPE_LIB_PATH"
59899  new_path=`$CYGPATH -u "$path"`
59900
59901  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59902  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59903  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59904  # "foo.exe" is OK but "foo" is an error.
59905  #
59906  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59907  # It is also a way to make sure we got the proper file name for the real test later on.
59908  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59909  if test "x$test_shortpath" = x; then
59910    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59911$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59912    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59913  fi
59914
59915  # Call helper function which possibly converts this using DOS-style short mode.
59916  # If so, the updated path is stored in $new_path.
59917
59918  input_path="$new_path"
59919  # Check if we need to convert this using DOS-style short mode. If the path
59920  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59921  # take no chances and rewrite it.
59922  # Note: m4 eats our [], so we need to use [ and ] instead.
59923  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59924  if test "x$has_forbidden_chars" != x; then
59925    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59926    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59927    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59928    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59929      # Going to short mode and back again did indeed matter. Since short mode is
59930      # case insensitive, let's make it lowercase to improve readability.
59931      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59932      # Now convert it back to Unix-style (cygpath)
59933      input_path=`$CYGPATH -u "$shortmode_path"`
59934      new_path="$input_path"
59935    fi
59936  fi
59937
59938  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59939  if test "x$test_cygdrive_prefix" = x; then
59940    # As a simple fix, exclude /usr/bin since it's not a real path.
59941    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59942      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59943      # a path prefixed by /cygdrive for fixpath to work.
59944      new_path="$CYGWIN_ROOT_PATH$input_path"
59945    fi
59946  fi
59947
59948
59949  if test "x$path" != "x$new_path"; then
59950    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59951    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59952$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59953  fi
59954
59955    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59956
59957  path="$POTENTIAL_FREETYPE_LIB_PATH"
59958  has_colon=`$ECHO $path | $GREP ^.:`
59959  new_path="$path"
59960  if test "x$has_colon" = x; then
59961    # Not in mixed or Windows style, start by that.
59962    new_path=`cmd //c echo $path`
59963  fi
59964
59965
59966  input_path="$new_path"
59967  # Check if we need to convert this using DOS-style short mode. If the path
59968  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59969  # take no chances and rewrite it.
59970  # Note: m4 eats our [], so we need to use [ and ] instead.
59971  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59972  if test "x$has_forbidden_chars" != x; then
59973    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59974    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59975  fi
59976
59977
59978  windows_path="$new_path"
59979  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59980    unix_path=`$CYGPATH -u "$windows_path"`
59981    new_path="$unix_path"
59982  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59983    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59984    new_path="$unix_path"
59985  fi
59986
59987  if test "x$path" != "x$new_path"; then
59988    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59989    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59990$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59991  fi
59992
59993  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59994  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59995
59996    else
59997      # We're on a unix platform. Hooray! :)
59998      path="$POTENTIAL_FREETYPE_LIB_PATH"
59999      has_space=`$ECHO "$path" | $GREP " "`
60000      if test "x$has_space" != x; then
60001        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60002$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60003        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60004      fi
60005
60006      # Use eval to expand a potential ~
60007      eval path="$path"
60008      if test ! -f "$path" && test ! -d "$path"; then
60009        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60010      fi
60011
60012      if test -d "$path"; then
60013        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60014      else
60015        dir="`$DIRNAME "$path"`"
60016        base="`$BASENAME "$path"`"
60017        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60018      fi
60019    fi
60020  fi
60021
60022
60023    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60024    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60025$as_echo_n "checking for freetype includes... " >&6; }
60026    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60027$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60028    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60029    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60030$as_echo_n "checking for freetype libraries... " >&6; }
60031    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60032$as_echo "$FREETYPE_LIB_PATH" >&6; }
60033  fi
60034
60035              fi
60036            fi
60037          fi
60038        else
60039          FREETYPE_BASE_DIR="$SYSROOT/usr"
60040
60041  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60042  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60043  METHOD="well-known location"
60044
60045  # Let's start with an optimistic view of the world :-)
60046  FOUND_FREETYPE=yes
60047
60048  # First look for the canonical freetype main include file ft2build.h.
60049  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60050    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60051    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60052    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60053      # Fail.
60054      FOUND_FREETYPE=no
60055    fi
60056  fi
60057
60058  if test "x$FOUND_FREETYPE" = xyes; then
60059    # Include file found, let's continue the sanity check.
60060    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60061$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60062
60063    # Reset to default value
60064    FREETYPE_BASE_NAME=freetype
60065    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60066    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60067      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60068          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60069        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60070        # for the .6 version explicitly.
60071        FREETYPE_BASE_NAME=freetype.6
60072        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60073        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60074$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60075      else
60076        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60077$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60078        FOUND_FREETYPE=no
60079      fi
60080    else
60081      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60082        # On Windows, we will need both .lib and .dll file.
60083        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60084          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60085$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60086          FOUND_FREETYPE=no
60087        fi
60088      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60089          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60090        # Found lib in isa dir, use that instead.
60091        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60092        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60093$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60094      fi
60095    fi
60096  fi
60097
60098  if test "x$FOUND_FREETYPE" = xyes; then
60099
60100  # Only process if variable expands to non-empty
60101
60102  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60103    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60104
60105  # Input might be given as Windows format, start by converting to
60106  # unix format.
60107  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60108  new_path=`$CYGPATH -u "$path"`
60109
60110  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60111  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60112  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60113  # "foo.exe" is OK but "foo" is an error.
60114  #
60115  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60116  # It is also a way to make sure we got the proper file name for the real test later on.
60117  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60118  if test "x$test_shortpath" = x; then
60119    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60120$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60121    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60122  fi
60123
60124  # Call helper function which possibly converts this using DOS-style short mode.
60125  # If so, the updated path is stored in $new_path.
60126
60127  input_path="$new_path"
60128  # Check if we need to convert this using DOS-style short mode. If the path
60129  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60130  # take no chances and rewrite it.
60131  # Note: m4 eats our [], so we need to use [ and ] instead.
60132  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60133  if test "x$has_forbidden_chars" != x; then
60134    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60135    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60136    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60137    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60138      # Going to short mode and back again did indeed matter. Since short mode is
60139      # case insensitive, let's make it lowercase to improve readability.
60140      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60141      # Now convert it back to Unix-style (cygpath)
60142      input_path=`$CYGPATH -u "$shortmode_path"`
60143      new_path="$input_path"
60144    fi
60145  fi
60146
60147  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60148  if test "x$test_cygdrive_prefix" = x; then
60149    # As a simple fix, exclude /usr/bin since it's not a real path.
60150    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60151      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60152      # a path prefixed by /cygdrive for fixpath to work.
60153      new_path="$CYGWIN_ROOT_PATH$input_path"
60154    fi
60155  fi
60156
60157
60158  if test "x$path" != "x$new_path"; then
60159    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60160    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60161$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60162  fi
60163
60164    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60165
60166  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60167  has_colon=`$ECHO $path | $GREP ^.:`
60168  new_path="$path"
60169  if test "x$has_colon" = x; then
60170    # Not in mixed or Windows style, start by that.
60171    new_path=`cmd //c echo $path`
60172  fi
60173
60174
60175  input_path="$new_path"
60176  # Check if we need to convert this using DOS-style short mode. If the path
60177  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60178  # take no chances and rewrite it.
60179  # Note: m4 eats our [], so we need to use [ and ] instead.
60180  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60181  if test "x$has_forbidden_chars" != x; then
60182    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60183    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60184  fi
60185
60186
60187  windows_path="$new_path"
60188  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60189    unix_path=`$CYGPATH -u "$windows_path"`
60190    new_path="$unix_path"
60191  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60192    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60193    new_path="$unix_path"
60194  fi
60195
60196  if test "x$path" != "x$new_path"; then
60197    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60198    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60199$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60200  fi
60201
60202  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60203  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60204
60205    else
60206      # We're on a unix platform. Hooray! :)
60207      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60208      has_space=`$ECHO "$path" | $GREP " "`
60209      if test "x$has_space" != x; then
60210        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60211$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60212        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60213      fi
60214
60215      # Use eval to expand a potential ~
60216      eval path="$path"
60217      if test ! -f "$path" && test ! -d "$path"; then
60218        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60219      fi
60220
60221      if test -d "$path"; then
60222        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60223      else
60224        dir="`$DIRNAME "$path"`"
60225        base="`$BASENAME "$path"`"
60226        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60227      fi
60228    fi
60229  fi
60230
60231
60232  # Only process if variable expands to non-empty
60233
60234  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60235    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60236
60237  # Input might be given as Windows format, start by converting to
60238  # unix format.
60239  path="$POTENTIAL_FREETYPE_LIB_PATH"
60240  new_path=`$CYGPATH -u "$path"`
60241
60242  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60243  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60244  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60245  # "foo.exe" is OK but "foo" is an error.
60246  #
60247  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60248  # It is also a way to make sure we got the proper file name for the real test later on.
60249  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60250  if test "x$test_shortpath" = x; then
60251    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60252$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60253    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60254  fi
60255
60256  # Call helper function which possibly converts this using DOS-style short mode.
60257  # If so, the updated path is stored in $new_path.
60258
60259  input_path="$new_path"
60260  # Check if we need to convert this using DOS-style short mode. If the path
60261  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60262  # take no chances and rewrite it.
60263  # Note: m4 eats our [], so we need to use [ and ] instead.
60264  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60265  if test "x$has_forbidden_chars" != x; then
60266    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60267    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60268    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60269    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60270      # Going to short mode and back again did indeed matter. Since short mode is
60271      # case insensitive, let's make it lowercase to improve readability.
60272      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60273      # Now convert it back to Unix-style (cygpath)
60274      input_path=`$CYGPATH -u "$shortmode_path"`
60275      new_path="$input_path"
60276    fi
60277  fi
60278
60279  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60280  if test "x$test_cygdrive_prefix" = x; then
60281    # As a simple fix, exclude /usr/bin since it's not a real path.
60282    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60283      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60284      # a path prefixed by /cygdrive for fixpath to work.
60285      new_path="$CYGWIN_ROOT_PATH$input_path"
60286    fi
60287  fi
60288
60289
60290  if test "x$path" != "x$new_path"; then
60291    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60292    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60293$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60294  fi
60295
60296    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60297
60298  path="$POTENTIAL_FREETYPE_LIB_PATH"
60299  has_colon=`$ECHO $path | $GREP ^.:`
60300  new_path="$path"
60301  if test "x$has_colon" = x; then
60302    # Not in mixed or Windows style, start by that.
60303    new_path=`cmd //c echo $path`
60304  fi
60305
60306
60307  input_path="$new_path"
60308  # Check if we need to convert this using DOS-style short mode. If the path
60309  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60310  # take no chances and rewrite it.
60311  # Note: m4 eats our [], so we need to use [ and ] instead.
60312  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60313  if test "x$has_forbidden_chars" != x; then
60314    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60315    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60316  fi
60317
60318
60319  windows_path="$new_path"
60320  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60321    unix_path=`$CYGPATH -u "$windows_path"`
60322    new_path="$unix_path"
60323  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60324    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60325    new_path="$unix_path"
60326  fi
60327
60328  if test "x$path" != "x$new_path"; then
60329    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60330    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60331$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60332  fi
60333
60334  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60335  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60336
60337    else
60338      # We're on a unix platform. Hooray! :)
60339      path="$POTENTIAL_FREETYPE_LIB_PATH"
60340      has_space=`$ECHO "$path" | $GREP " "`
60341      if test "x$has_space" != x; then
60342        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60343$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60344        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60345      fi
60346
60347      # Use eval to expand a potential ~
60348      eval path="$path"
60349      if test ! -f "$path" && test ! -d "$path"; then
60350        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60351      fi
60352
60353      if test -d "$path"; then
60354        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60355      else
60356        dir="`$DIRNAME "$path"`"
60357        base="`$BASENAME "$path"`"
60358        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60359      fi
60360    fi
60361  fi
60362
60363
60364    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60365    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60366$as_echo_n "checking for freetype includes... " >&6; }
60367    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60368$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60369    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60370    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60371$as_echo_n "checking for freetype libraries... " >&6; }
60372    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60373$as_echo "$FREETYPE_LIB_PATH" >&6; }
60374  fi
60375
60376
60377          if test "x$FOUND_FREETYPE" != xyes; then
60378            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
60379
60380  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60381  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60382  METHOD="well-known location"
60383
60384  # Let's start with an optimistic view of the world :-)
60385  FOUND_FREETYPE=yes
60386
60387  # First look for the canonical freetype main include file ft2build.h.
60388  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60389    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60390    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60391    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60392      # Fail.
60393      FOUND_FREETYPE=no
60394    fi
60395  fi
60396
60397  if test "x$FOUND_FREETYPE" = xyes; then
60398    # Include file found, let's continue the sanity check.
60399    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60400$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60401
60402    # Reset to default value
60403    FREETYPE_BASE_NAME=freetype
60404    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60405    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60406      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60407          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60408        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60409        # for the .6 version explicitly.
60410        FREETYPE_BASE_NAME=freetype.6
60411        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60412        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60413$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60414      else
60415        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60416$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60417        FOUND_FREETYPE=no
60418      fi
60419    else
60420      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60421        # On Windows, we will need both .lib and .dll file.
60422        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60423          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60424$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60425          FOUND_FREETYPE=no
60426        fi
60427      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60428          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60429        # Found lib in isa dir, use that instead.
60430        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60431        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60432$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60433      fi
60434    fi
60435  fi
60436
60437  if test "x$FOUND_FREETYPE" = xyes; then
60438
60439  # Only process if variable expands to non-empty
60440
60441  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60442    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60443
60444  # Input might be given as Windows format, start by converting to
60445  # unix format.
60446  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60447  new_path=`$CYGPATH -u "$path"`
60448
60449  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60450  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60451  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60452  # "foo.exe" is OK but "foo" is an error.
60453  #
60454  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60455  # It is also a way to make sure we got the proper file name for the real test later on.
60456  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60457  if test "x$test_shortpath" = x; then
60458    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60459$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60460    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60461  fi
60462
60463  # Call helper function which possibly converts this using DOS-style short mode.
60464  # If so, the updated path is stored in $new_path.
60465
60466  input_path="$new_path"
60467  # Check if we need to convert this using DOS-style short mode. If the path
60468  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60469  # take no chances and rewrite it.
60470  # Note: m4 eats our [], so we need to use [ and ] instead.
60471  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60472  if test "x$has_forbidden_chars" != x; then
60473    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60474    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60475    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60476    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60477      # Going to short mode and back again did indeed matter. Since short mode is
60478      # case insensitive, let's make it lowercase to improve readability.
60479      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60480      # Now convert it back to Unix-style (cygpath)
60481      input_path=`$CYGPATH -u "$shortmode_path"`
60482      new_path="$input_path"
60483    fi
60484  fi
60485
60486  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60487  if test "x$test_cygdrive_prefix" = x; then
60488    # As a simple fix, exclude /usr/bin since it's not a real path.
60489    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60490      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60491      # a path prefixed by /cygdrive for fixpath to work.
60492      new_path="$CYGWIN_ROOT_PATH$input_path"
60493    fi
60494  fi
60495
60496
60497  if test "x$path" != "x$new_path"; then
60498    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60499    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60500$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60501  fi
60502
60503    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60504
60505  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60506  has_colon=`$ECHO $path | $GREP ^.:`
60507  new_path="$path"
60508  if test "x$has_colon" = x; then
60509    # Not in mixed or Windows style, start by that.
60510    new_path=`cmd //c echo $path`
60511  fi
60512
60513
60514  input_path="$new_path"
60515  # Check if we need to convert this using DOS-style short mode. If the path
60516  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60517  # take no chances and rewrite it.
60518  # Note: m4 eats our [], so we need to use [ and ] instead.
60519  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60520  if test "x$has_forbidden_chars" != x; then
60521    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60522    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60523  fi
60524
60525
60526  windows_path="$new_path"
60527  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60528    unix_path=`$CYGPATH -u "$windows_path"`
60529    new_path="$unix_path"
60530  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60531    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60532    new_path="$unix_path"
60533  fi
60534
60535  if test "x$path" != "x$new_path"; then
60536    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60537    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60538$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60539  fi
60540
60541  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60542  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60543
60544    else
60545      # We're on a unix platform. Hooray! :)
60546      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60547      has_space=`$ECHO "$path" | $GREP " "`
60548      if test "x$has_space" != x; then
60549        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60550$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60551        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60552      fi
60553
60554      # Use eval to expand a potential ~
60555      eval path="$path"
60556      if test ! -f "$path" && test ! -d "$path"; then
60557        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60558      fi
60559
60560      if test -d "$path"; then
60561        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60562      else
60563        dir="`$DIRNAME "$path"`"
60564        base="`$BASENAME "$path"`"
60565        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60566      fi
60567    fi
60568  fi
60569
60570
60571  # Only process if variable expands to non-empty
60572
60573  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60574    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60575
60576  # Input might be given as Windows format, start by converting to
60577  # unix format.
60578  path="$POTENTIAL_FREETYPE_LIB_PATH"
60579  new_path=`$CYGPATH -u "$path"`
60580
60581  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60582  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60583  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60584  # "foo.exe" is OK but "foo" is an error.
60585  #
60586  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60587  # It is also a way to make sure we got the proper file name for the real test later on.
60588  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60589  if test "x$test_shortpath" = x; then
60590    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60591$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60592    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60593  fi
60594
60595  # Call helper function which possibly converts this using DOS-style short mode.
60596  # If so, the updated path is stored in $new_path.
60597
60598  input_path="$new_path"
60599  # Check if we need to convert this using DOS-style short mode. If the path
60600  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60601  # take no chances and rewrite it.
60602  # Note: m4 eats our [], so we need to use [ and ] instead.
60603  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60604  if test "x$has_forbidden_chars" != x; then
60605    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60606    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60607    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60608    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60609      # Going to short mode and back again did indeed matter. Since short mode is
60610      # case insensitive, let's make it lowercase to improve readability.
60611      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60612      # Now convert it back to Unix-style (cygpath)
60613      input_path=`$CYGPATH -u "$shortmode_path"`
60614      new_path="$input_path"
60615    fi
60616  fi
60617
60618  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60619  if test "x$test_cygdrive_prefix" = x; then
60620    # As a simple fix, exclude /usr/bin since it's not a real path.
60621    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60622      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60623      # a path prefixed by /cygdrive for fixpath to work.
60624      new_path="$CYGWIN_ROOT_PATH$input_path"
60625    fi
60626  fi
60627
60628
60629  if test "x$path" != "x$new_path"; then
60630    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60631    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60632$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60633  fi
60634
60635    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60636
60637  path="$POTENTIAL_FREETYPE_LIB_PATH"
60638  has_colon=`$ECHO $path | $GREP ^.:`
60639  new_path="$path"
60640  if test "x$has_colon" = x; then
60641    # Not in mixed or Windows style, start by that.
60642    new_path=`cmd //c echo $path`
60643  fi
60644
60645
60646  input_path="$new_path"
60647  # Check if we need to convert this using DOS-style short mode. If the path
60648  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60649  # take no chances and rewrite it.
60650  # Note: m4 eats our [], so we need to use [ and ] instead.
60651  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60652  if test "x$has_forbidden_chars" != x; then
60653    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60654    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60655  fi
60656
60657
60658  windows_path="$new_path"
60659  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60660    unix_path=`$CYGPATH -u "$windows_path"`
60661    new_path="$unix_path"
60662  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60663    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60664    new_path="$unix_path"
60665  fi
60666
60667  if test "x$path" != "x$new_path"; then
60668    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60669    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60670$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60671  fi
60672
60673  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60674  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60675
60676    else
60677      # We're on a unix platform. Hooray! :)
60678      path="$POTENTIAL_FREETYPE_LIB_PATH"
60679      has_space=`$ECHO "$path" | $GREP " "`
60680      if test "x$has_space" != x; then
60681        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60682$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60683        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60684      fi
60685
60686      # Use eval to expand a potential ~
60687      eval path="$path"
60688      if test ! -f "$path" && test ! -d "$path"; then
60689        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60690      fi
60691
60692      if test -d "$path"; then
60693        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60694      else
60695        dir="`$DIRNAME "$path"`"
60696        base="`$BASENAME "$path"`"
60697        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60698      fi
60699    fi
60700  fi
60701
60702
60703    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60704    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60705$as_echo_n "checking for freetype includes... " >&6; }
60706    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60707$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60708    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60709    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60710$as_echo_n "checking for freetype libraries... " >&6; }
60711    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60712$as_echo "$FREETYPE_LIB_PATH" >&6; }
60713  fi
60714
60715          fi
60716
60717          if test "x$OPENJDK_TARGET_OS" = xmacosx; then
60718            if test "x$FOUND_FREETYPE" != xyes; then
60719              # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
60720              FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
60721
60722  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60723  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60724  METHOD="well-known location"
60725
60726  # Let's start with an optimistic view of the world :-)
60727  FOUND_FREETYPE=yes
60728
60729  # First look for the canonical freetype main include file ft2build.h.
60730  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60731    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60732    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60733    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60734      # Fail.
60735      FOUND_FREETYPE=no
60736    fi
60737  fi
60738
60739  if test "x$FOUND_FREETYPE" = xyes; then
60740    # Include file found, let's continue the sanity check.
60741    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60742$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60743
60744    # Reset to default value
60745    FREETYPE_BASE_NAME=freetype
60746    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60747    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60748      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60749          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60750        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60751        # for the .6 version explicitly.
60752        FREETYPE_BASE_NAME=freetype.6
60753        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60754        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60755$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60756      else
60757        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60758$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60759        FOUND_FREETYPE=no
60760      fi
60761    else
60762      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60763        # On Windows, we will need both .lib and .dll file.
60764        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60765          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60766$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60767          FOUND_FREETYPE=no
60768        fi
60769      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60770          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60771        # Found lib in isa dir, use that instead.
60772        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60773        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60774$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60775      fi
60776    fi
60777  fi
60778
60779  if test "x$FOUND_FREETYPE" = xyes; then
60780
60781  # Only process if variable expands to non-empty
60782
60783  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60784    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60785
60786  # Input might be given as Windows format, start by converting to
60787  # unix format.
60788  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60789  new_path=`$CYGPATH -u "$path"`
60790
60791  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60792  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60793  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60794  # "foo.exe" is OK but "foo" is an error.
60795  #
60796  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60797  # It is also a way to make sure we got the proper file name for the real test later on.
60798  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60799  if test "x$test_shortpath" = x; then
60800    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60801$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60802    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60803  fi
60804
60805  # Call helper function which possibly converts this using DOS-style short mode.
60806  # If so, the updated path is stored in $new_path.
60807
60808  input_path="$new_path"
60809  # Check if we need to convert this using DOS-style short mode. If the path
60810  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60811  # take no chances and rewrite it.
60812  # Note: m4 eats our [], so we need to use [ and ] instead.
60813  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60814  if test "x$has_forbidden_chars" != x; then
60815    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60816    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60817    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60818    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60819      # Going to short mode and back again did indeed matter. Since short mode is
60820      # case insensitive, let's make it lowercase to improve readability.
60821      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60822      # Now convert it back to Unix-style (cygpath)
60823      input_path=`$CYGPATH -u "$shortmode_path"`
60824      new_path="$input_path"
60825    fi
60826  fi
60827
60828  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60829  if test "x$test_cygdrive_prefix" = x; then
60830    # As a simple fix, exclude /usr/bin since it's not a real path.
60831    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60832      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60833      # a path prefixed by /cygdrive for fixpath to work.
60834      new_path="$CYGWIN_ROOT_PATH$input_path"
60835    fi
60836  fi
60837
60838
60839  if test "x$path" != "x$new_path"; then
60840    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60841    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60842$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60843  fi
60844
60845    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60846
60847  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60848  has_colon=`$ECHO $path | $GREP ^.:`
60849  new_path="$path"
60850  if test "x$has_colon" = x; then
60851    # Not in mixed or Windows style, start by that.
60852    new_path=`cmd //c echo $path`
60853  fi
60854
60855
60856  input_path="$new_path"
60857  # Check if we need to convert this using DOS-style short mode. If the path
60858  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60859  # take no chances and rewrite it.
60860  # Note: m4 eats our [], so we need to use [ and ] instead.
60861  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60862  if test "x$has_forbidden_chars" != x; then
60863    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60864    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60865  fi
60866
60867
60868  windows_path="$new_path"
60869  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60870    unix_path=`$CYGPATH -u "$windows_path"`
60871    new_path="$unix_path"
60872  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60873    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60874    new_path="$unix_path"
60875  fi
60876
60877  if test "x$path" != "x$new_path"; then
60878    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60879    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60880$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60881  fi
60882
60883  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60884  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60885
60886    else
60887      # We're on a unix platform. Hooray! :)
60888      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60889      has_space=`$ECHO "$path" | $GREP " "`
60890      if test "x$has_space" != x; then
60891        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60892$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60893        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60894      fi
60895
60896      # Use eval to expand a potential ~
60897      eval path="$path"
60898      if test ! -f "$path" && test ! -d "$path"; then
60899        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60900      fi
60901
60902      if test -d "$path"; then
60903        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60904      else
60905        dir="`$DIRNAME "$path"`"
60906        base="`$BASENAME "$path"`"
60907        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60908      fi
60909    fi
60910  fi
60911
60912
60913  # Only process if variable expands to non-empty
60914
60915  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60916    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60917
60918  # Input might be given as Windows format, start by converting to
60919  # unix format.
60920  path="$POTENTIAL_FREETYPE_LIB_PATH"
60921  new_path=`$CYGPATH -u "$path"`
60922
60923  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60924  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60925  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60926  # "foo.exe" is OK but "foo" is an error.
60927  #
60928  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60929  # It is also a way to make sure we got the proper file name for the real test later on.
60930  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60931  if test "x$test_shortpath" = x; then
60932    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60933$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60934    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60935  fi
60936
60937  # Call helper function which possibly converts this using DOS-style short mode.
60938  # If so, the updated path is stored in $new_path.
60939
60940  input_path="$new_path"
60941  # Check if we need to convert this using DOS-style short mode. If the path
60942  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60943  # take no chances and rewrite it.
60944  # Note: m4 eats our [], so we need to use [ and ] instead.
60945  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60946  if test "x$has_forbidden_chars" != x; then
60947    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60948    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60949    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60950    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60951      # Going to short mode and back again did indeed matter. Since short mode is
60952      # case insensitive, let's make it lowercase to improve readability.
60953      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60954      # Now convert it back to Unix-style (cygpath)
60955      input_path=`$CYGPATH -u "$shortmode_path"`
60956      new_path="$input_path"
60957    fi
60958  fi
60959
60960  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60961  if test "x$test_cygdrive_prefix" = x; then
60962    # As a simple fix, exclude /usr/bin since it's not a real path.
60963    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60964      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60965      # a path prefixed by /cygdrive for fixpath to work.
60966      new_path="$CYGWIN_ROOT_PATH$input_path"
60967    fi
60968  fi
60969
60970
60971  if test "x$path" != "x$new_path"; then
60972    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60973    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60974$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60975  fi
60976
60977    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60978
60979  path="$POTENTIAL_FREETYPE_LIB_PATH"
60980  has_colon=`$ECHO $path | $GREP ^.:`
60981  new_path="$path"
60982  if test "x$has_colon" = x; then
60983    # Not in mixed or Windows style, start by that.
60984    new_path=`cmd //c echo $path`
60985  fi
60986
60987
60988  input_path="$new_path"
60989  # Check if we need to convert this using DOS-style short mode. If the path
60990  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60991  # take no chances and rewrite it.
60992  # Note: m4 eats our [], so we need to use [ and ] instead.
60993  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60994  if test "x$has_forbidden_chars" != x; then
60995    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60996    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60997  fi
60998
60999
61000  windows_path="$new_path"
61001  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61002    unix_path=`$CYGPATH -u "$windows_path"`
61003    new_path="$unix_path"
61004  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61005    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61006    new_path="$unix_path"
61007  fi
61008
61009  if test "x$path" != "x$new_path"; then
61010    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61011    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61012$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61013  fi
61014
61015  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61016  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61017
61018    else
61019      # We're on a unix platform. Hooray! :)
61020      path="$POTENTIAL_FREETYPE_LIB_PATH"
61021      has_space=`$ECHO "$path" | $GREP " "`
61022      if test "x$has_space" != x; then
61023        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61024$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61025        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61026      fi
61027
61028      # Use eval to expand a potential ~
61029      eval path="$path"
61030      if test ! -f "$path" && test ! -d "$path"; then
61031        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61032      fi
61033
61034      if test -d "$path"; then
61035        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61036      else
61037        dir="`$DIRNAME "$path"`"
61038        base="`$BASENAME "$path"`"
61039        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61040      fi
61041    fi
61042  fi
61043
61044
61045    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61046    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61047$as_echo_n "checking for freetype includes... " >&6; }
61048    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61049$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61050    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61051    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61052$as_echo_n "checking for freetype libraries... " >&6; }
61053    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61054$as_echo "$FREETYPE_LIB_PATH" >&6; }
61055  fi
61056
61057            fi
61058          fi
61059
61060          if test "x$FOUND_FREETYPE" != xyes; then
61061            FREETYPE_BASE_DIR="$SYSROOT/usr"
61062            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
61063
61064  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61065  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
61066  METHOD="well-known location"
61067
61068  # Let's start with an optimistic view of the world :-)
61069  FOUND_FREETYPE=yes
61070
61071  # First look for the canonical freetype main include file ft2build.h.
61072  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61073    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61074    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61075    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61076      # Fail.
61077      FOUND_FREETYPE=no
61078    fi
61079  fi
61080
61081  if test "x$FOUND_FREETYPE" = xyes; then
61082    # Include file found, let's continue the sanity check.
61083    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61084$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61085
61086    # Reset to default value
61087    FREETYPE_BASE_NAME=freetype
61088    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61089    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61090      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61091          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61092        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61093        # for the .6 version explicitly.
61094        FREETYPE_BASE_NAME=freetype.6
61095        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61096        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61097$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61098      else
61099        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61100$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61101        FOUND_FREETYPE=no
61102      fi
61103    else
61104      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61105        # On Windows, we will need both .lib and .dll file.
61106        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61107          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61108$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61109          FOUND_FREETYPE=no
61110        fi
61111      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61112          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61113        # Found lib in isa dir, use that instead.
61114        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61115        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61116$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61117      fi
61118    fi
61119  fi
61120
61121  if test "x$FOUND_FREETYPE" = xyes; then
61122
61123  # Only process if variable expands to non-empty
61124
61125  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61126    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61127
61128  # Input might be given as Windows format, start by converting to
61129  # unix format.
61130  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61131  new_path=`$CYGPATH -u "$path"`
61132
61133  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61134  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61135  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61136  # "foo.exe" is OK but "foo" is an error.
61137  #
61138  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61139  # It is also a way to make sure we got the proper file name for the real test later on.
61140  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61141  if test "x$test_shortpath" = x; then
61142    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61143$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61144    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61145  fi
61146
61147  # Call helper function which possibly converts this using DOS-style short mode.
61148  # If so, the updated path is stored in $new_path.
61149
61150  input_path="$new_path"
61151  # Check if we need to convert this using DOS-style short mode. If the path
61152  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61153  # take no chances and rewrite it.
61154  # Note: m4 eats our [], so we need to use [ and ] instead.
61155  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61156  if test "x$has_forbidden_chars" != x; then
61157    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61158    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61159    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61160    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61161      # Going to short mode and back again did indeed matter. Since short mode is
61162      # case insensitive, let's make it lowercase to improve readability.
61163      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61164      # Now convert it back to Unix-style (cygpath)
61165      input_path=`$CYGPATH -u "$shortmode_path"`
61166      new_path="$input_path"
61167    fi
61168  fi
61169
61170  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61171  if test "x$test_cygdrive_prefix" = x; then
61172    # As a simple fix, exclude /usr/bin since it's not a real path.
61173    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61174      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61175      # a path prefixed by /cygdrive for fixpath to work.
61176      new_path="$CYGWIN_ROOT_PATH$input_path"
61177    fi
61178  fi
61179
61180
61181  if test "x$path" != "x$new_path"; then
61182    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61183    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61184$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61185  fi
61186
61187    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61188
61189  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61190  has_colon=`$ECHO $path | $GREP ^.:`
61191  new_path="$path"
61192  if test "x$has_colon" = x; then
61193    # Not in mixed or Windows style, start by that.
61194    new_path=`cmd //c echo $path`
61195  fi
61196
61197
61198  input_path="$new_path"
61199  # Check if we need to convert this using DOS-style short mode. If the path
61200  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61201  # take no chances and rewrite it.
61202  # Note: m4 eats our [], so we need to use [ and ] instead.
61203  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61204  if test "x$has_forbidden_chars" != x; then
61205    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61206    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61207  fi
61208
61209
61210  windows_path="$new_path"
61211  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61212    unix_path=`$CYGPATH -u "$windows_path"`
61213    new_path="$unix_path"
61214  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61215    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61216    new_path="$unix_path"
61217  fi
61218
61219  if test "x$path" != "x$new_path"; then
61220    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61221    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61222$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61223  fi
61224
61225  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61226  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61227
61228    else
61229      # We're on a unix platform. Hooray! :)
61230      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61231      has_space=`$ECHO "$path" | $GREP " "`
61232      if test "x$has_space" != x; then
61233        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61234$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61235        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61236      fi
61237
61238      # Use eval to expand a potential ~
61239      eval path="$path"
61240      if test ! -f "$path" && test ! -d "$path"; then
61241        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61242      fi
61243
61244      if test -d "$path"; then
61245        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61246      else
61247        dir="`$DIRNAME "$path"`"
61248        base="`$BASENAME "$path"`"
61249        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61250      fi
61251    fi
61252  fi
61253
61254
61255  # Only process if variable expands to non-empty
61256
61257  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61258    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61259
61260  # Input might be given as Windows format, start by converting to
61261  # unix format.
61262  path="$POTENTIAL_FREETYPE_LIB_PATH"
61263  new_path=`$CYGPATH -u "$path"`
61264
61265  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61266  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61267  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61268  # "foo.exe" is OK but "foo" is an error.
61269  #
61270  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61271  # It is also a way to make sure we got the proper file name for the real test later on.
61272  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61273  if test "x$test_shortpath" = x; then
61274    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61275$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61276    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61277  fi
61278
61279  # Call helper function which possibly converts this using DOS-style short mode.
61280  # If so, the updated path is stored in $new_path.
61281
61282  input_path="$new_path"
61283  # Check if we need to convert this using DOS-style short mode. If the path
61284  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61285  # take no chances and rewrite it.
61286  # Note: m4 eats our [], so we need to use [ and ] instead.
61287  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61288  if test "x$has_forbidden_chars" != x; then
61289    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61290    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61291    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61292    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61293      # Going to short mode and back again did indeed matter. Since short mode is
61294      # case insensitive, let's make it lowercase to improve readability.
61295      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61296      # Now convert it back to Unix-style (cygpath)
61297      input_path=`$CYGPATH -u "$shortmode_path"`
61298      new_path="$input_path"
61299    fi
61300  fi
61301
61302  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61303  if test "x$test_cygdrive_prefix" = x; then
61304    # As a simple fix, exclude /usr/bin since it's not a real path.
61305    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61306      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61307      # a path prefixed by /cygdrive for fixpath to work.
61308      new_path="$CYGWIN_ROOT_PATH$input_path"
61309    fi
61310  fi
61311
61312
61313  if test "x$path" != "x$new_path"; then
61314    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61315    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61316$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61317  fi
61318
61319    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61320
61321  path="$POTENTIAL_FREETYPE_LIB_PATH"
61322  has_colon=`$ECHO $path | $GREP ^.:`
61323  new_path="$path"
61324  if test "x$has_colon" = x; then
61325    # Not in mixed or Windows style, start by that.
61326    new_path=`cmd //c echo $path`
61327  fi
61328
61329
61330  input_path="$new_path"
61331  # Check if we need to convert this using DOS-style short mode. If the path
61332  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61333  # take no chances and rewrite it.
61334  # Note: m4 eats our [], so we need to use [ and ] instead.
61335  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61336  if test "x$has_forbidden_chars" != x; then
61337    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61338    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61339  fi
61340
61341
61342  windows_path="$new_path"
61343  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61344    unix_path=`$CYGPATH -u "$windows_path"`
61345    new_path="$unix_path"
61346  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61347    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61348    new_path="$unix_path"
61349  fi
61350
61351  if test "x$path" != "x$new_path"; then
61352    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61353    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61354$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61355  fi
61356
61357  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61358  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61359
61360    else
61361      # We're on a unix platform. Hooray! :)
61362      path="$POTENTIAL_FREETYPE_LIB_PATH"
61363      has_space=`$ECHO "$path" | $GREP " "`
61364      if test "x$has_space" != x; then
61365        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61366$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61367        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61368      fi
61369
61370      # Use eval to expand a potential ~
61371      eval path="$path"
61372      if test ! -f "$path" && test ! -d "$path"; then
61373        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61374      fi
61375
61376      if test -d "$path"; then
61377        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61378      else
61379        dir="`$DIRNAME "$path"`"
61380        base="`$BASENAME "$path"`"
61381        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61382      fi
61383    fi
61384  fi
61385
61386
61387    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61388    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61389$as_echo_n "checking for freetype includes... " >&6; }
61390    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61391$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61392    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61393    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61394$as_echo_n "checking for freetype libraries... " >&6; }
61395    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61396$as_echo "$FREETYPE_LIB_PATH" >&6; }
61397  fi
61398
61399            else
61400
61401  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61402  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
61403  METHOD="well-known location"
61404
61405  # Let's start with an optimistic view of the world :-)
61406  FOUND_FREETYPE=yes
61407
61408  # First look for the canonical freetype main include file ft2build.h.
61409  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61410    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61411    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61412    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61413      # Fail.
61414      FOUND_FREETYPE=no
61415    fi
61416  fi
61417
61418  if test "x$FOUND_FREETYPE" = xyes; then
61419    # Include file found, let's continue the sanity check.
61420    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61421$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61422
61423    # Reset to default value
61424    FREETYPE_BASE_NAME=freetype
61425    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61426    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61427      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61428          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61429        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61430        # for the .6 version explicitly.
61431        FREETYPE_BASE_NAME=freetype.6
61432        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61433        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61434$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61435      else
61436        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61437$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61438        FOUND_FREETYPE=no
61439      fi
61440    else
61441      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61442        # On Windows, we will need both .lib and .dll file.
61443        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61444          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61445$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61446          FOUND_FREETYPE=no
61447        fi
61448      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61449          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61450        # Found lib in isa dir, use that instead.
61451        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61452        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61453$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61454      fi
61455    fi
61456  fi
61457
61458  if test "x$FOUND_FREETYPE" = xyes; then
61459
61460  # Only process if variable expands to non-empty
61461
61462  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61463    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61464
61465  # Input might be given as Windows format, start by converting to
61466  # unix format.
61467  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61468  new_path=`$CYGPATH -u "$path"`
61469
61470  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61471  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61472  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61473  # "foo.exe" is OK but "foo" is an error.
61474  #
61475  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61476  # It is also a way to make sure we got the proper file name for the real test later on.
61477  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61478  if test "x$test_shortpath" = x; then
61479    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61480$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61481    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61482  fi
61483
61484  # Call helper function which possibly converts this using DOS-style short mode.
61485  # If so, the updated path is stored in $new_path.
61486
61487  input_path="$new_path"
61488  # Check if we need to convert this using DOS-style short mode. If the path
61489  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61490  # take no chances and rewrite it.
61491  # Note: m4 eats our [], so we need to use [ and ] instead.
61492  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61493  if test "x$has_forbidden_chars" != x; then
61494    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61495    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61496    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61497    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61498      # Going to short mode and back again did indeed matter. Since short mode is
61499      # case insensitive, let's make it lowercase to improve readability.
61500      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61501      # Now convert it back to Unix-style (cygpath)
61502      input_path=`$CYGPATH -u "$shortmode_path"`
61503      new_path="$input_path"
61504    fi
61505  fi
61506
61507  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61508  if test "x$test_cygdrive_prefix" = x; then
61509    # As a simple fix, exclude /usr/bin since it's not a real path.
61510    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61511      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61512      # a path prefixed by /cygdrive for fixpath to work.
61513      new_path="$CYGWIN_ROOT_PATH$input_path"
61514    fi
61515  fi
61516
61517
61518  if test "x$path" != "x$new_path"; then
61519    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61520    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61521$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61522  fi
61523
61524    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61525
61526  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61527  has_colon=`$ECHO $path | $GREP ^.:`
61528  new_path="$path"
61529  if test "x$has_colon" = x; then
61530    # Not in mixed or Windows style, start by that.
61531    new_path=`cmd //c echo $path`
61532  fi
61533
61534
61535  input_path="$new_path"
61536  # Check if we need to convert this using DOS-style short mode. If the path
61537  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61538  # take no chances and rewrite it.
61539  # Note: m4 eats our [], so we need to use [ and ] instead.
61540  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61541  if test "x$has_forbidden_chars" != x; then
61542    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61543    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61544  fi
61545
61546
61547  windows_path="$new_path"
61548  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61549    unix_path=`$CYGPATH -u "$windows_path"`
61550    new_path="$unix_path"
61551  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61552    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61553    new_path="$unix_path"
61554  fi
61555
61556  if test "x$path" != "x$new_path"; then
61557    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61558    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61559$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61560  fi
61561
61562  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61563  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61564
61565    else
61566      # We're on a unix platform. Hooray! :)
61567      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61568      has_space=`$ECHO "$path" | $GREP " "`
61569      if test "x$has_space" != x; then
61570        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61571$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61572        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61573      fi
61574
61575      # Use eval to expand a potential ~
61576      eval path="$path"
61577      if test ! -f "$path" && test ! -d "$path"; then
61578        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61579      fi
61580
61581      if test -d "$path"; then
61582        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61583      else
61584        dir="`$DIRNAME "$path"`"
61585        base="`$BASENAME "$path"`"
61586        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61587      fi
61588    fi
61589  fi
61590
61591
61592  # Only process if variable expands to non-empty
61593
61594  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61595    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61596
61597  # Input might be given as Windows format, start by converting to
61598  # unix format.
61599  path="$POTENTIAL_FREETYPE_LIB_PATH"
61600  new_path=`$CYGPATH -u "$path"`
61601
61602  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61603  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61604  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61605  # "foo.exe" is OK but "foo" is an error.
61606  #
61607  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61608  # It is also a way to make sure we got the proper file name for the real test later on.
61609  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61610  if test "x$test_shortpath" = x; then
61611    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61612$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61613    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61614  fi
61615
61616  # Call helper function which possibly converts this using DOS-style short mode.
61617  # If so, the updated path is stored in $new_path.
61618
61619  input_path="$new_path"
61620  # Check if we need to convert this using DOS-style short mode. If the path
61621  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61622  # take no chances and rewrite it.
61623  # Note: m4 eats our [], so we need to use [ and ] instead.
61624  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61625  if test "x$has_forbidden_chars" != x; then
61626    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61627    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61628    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61629    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61630      # Going to short mode and back again did indeed matter. Since short mode is
61631      # case insensitive, let's make it lowercase to improve readability.
61632      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61633      # Now convert it back to Unix-style (cygpath)
61634      input_path=`$CYGPATH -u "$shortmode_path"`
61635      new_path="$input_path"
61636    fi
61637  fi
61638
61639  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61640  if test "x$test_cygdrive_prefix" = x; then
61641    # As a simple fix, exclude /usr/bin since it's not a real path.
61642    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61643      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61644      # a path prefixed by /cygdrive for fixpath to work.
61645      new_path="$CYGWIN_ROOT_PATH$input_path"
61646    fi
61647  fi
61648
61649
61650  if test "x$path" != "x$new_path"; then
61651    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61652    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61653$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61654  fi
61655
61656    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61657
61658  path="$POTENTIAL_FREETYPE_LIB_PATH"
61659  has_colon=`$ECHO $path | $GREP ^.:`
61660  new_path="$path"
61661  if test "x$has_colon" = x; then
61662    # Not in mixed or Windows style, start by that.
61663    new_path=`cmd //c echo $path`
61664  fi
61665
61666
61667  input_path="$new_path"
61668  # Check if we need to convert this using DOS-style short mode. If the path
61669  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61670  # take no chances and rewrite it.
61671  # Note: m4 eats our [], so we need to use [ and ] instead.
61672  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61673  if test "x$has_forbidden_chars" != x; then
61674    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61675    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61676  fi
61677
61678
61679  windows_path="$new_path"
61680  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61681    unix_path=`$CYGPATH -u "$windows_path"`
61682    new_path="$unix_path"
61683  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61684    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61685    new_path="$unix_path"
61686  fi
61687
61688  if test "x$path" != "x$new_path"; then
61689    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61690    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61691$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61692  fi
61693
61694  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61695  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61696
61697    else
61698      # We're on a unix platform. Hooray! :)
61699      path="$POTENTIAL_FREETYPE_LIB_PATH"
61700      has_space=`$ECHO "$path" | $GREP " "`
61701      if test "x$has_space" != x; then
61702        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61703$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61704        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61705      fi
61706
61707      # Use eval to expand a potential ~
61708      eval path="$path"
61709      if test ! -f "$path" && test ! -d "$path"; then
61710        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61711      fi
61712
61713      if test -d "$path"; then
61714        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61715      else
61716        dir="`$DIRNAME "$path"`"
61717        base="`$BASENAME "$path"`"
61718        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61719      fi
61720    fi
61721  fi
61722
61723
61724    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61725    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61726$as_echo_n "checking for freetype includes... " >&6; }
61727    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61728$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61729    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61730    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61731$as_echo_n "checking for freetype libraries... " >&6; }
61732    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61733$as_echo "$FREETYPE_LIB_PATH" >&6; }
61734  fi
61735
61736              if test "x$FOUND_FREETYPE" != xyes; then
61737
61738  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61739  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
61740  METHOD="well-known location"
61741
61742  # Let's start with an optimistic view of the world :-)
61743  FOUND_FREETYPE=yes
61744
61745  # First look for the canonical freetype main include file ft2build.h.
61746  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61747    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61748    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61749    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61750      # Fail.
61751      FOUND_FREETYPE=no
61752    fi
61753  fi
61754
61755  if test "x$FOUND_FREETYPE" = xyes; then
61756    # Include file found, let's continue the sanity check.
61757    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61758$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61759
61760    # Reset to default value
61761    FREETYPE_BASE_NAME=freetype
61762    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61763    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61764      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61765          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61766        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61767        # for the .6 version explicitly.
61768        FREETYPE_BASE_NAME=freetype.6
61769        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61770        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61771$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61772      else
61773        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61774$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61775        FOUND_FREETYPE=no
61776      fi
61777    else
61778      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61779        # On Windows, we will need both .lib and .dll file.
61780        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61781          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61782$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61783          FOUND_FREETYPE=no
61784        fi
61785      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61786          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61787        # Found lib in isa dir, use that instead.
61788        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61789        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61790$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61791      fi
61792    fi
61793  fi
61794
61795  if test "x$FOUND_FREETYPE" = xyes; then
61796
61797  # Only process if variable expands to non-empty
61798
61799  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61800    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61801
61802  # Input might be given as Windows format, start by converting to
61803  # unix format.
61804  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61805  new_path=`$CYGPATH -u "$path"`
61806
61807  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61808  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61809  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61810  # "foo.exe" is OK but "foo" is an error.
61811  #
61812  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61813  # It is also a way to make sure we got the proper file name for the real test later on.
61814  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61815  if test "x$test_shortpath" = x; then
61816    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61817$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61818    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61819  fi
61820
61821  # Call helper function which possibly converts this using DOS-style short mode.
61822  # If so, the updated path is stored in $new_path.
61823
61824  input_path="$new_path"
61825  # Check if we need to convert this using DOS-style short mode. If the path
61826  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61827  # take no chances and rewrite it.
61828  # Note: m4 eats our [], so we need to use [ and ] instead.
61829  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61830  if test "x$has_forbidden_chars" != x; then
61831    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61832    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61833    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61834    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61835      # Going to short mode and back again did indeed matter. Since short mode is
61836      # case insensitive, let's make it lowercase to improve readability.
61837      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61838      # Now convert it back to Unix-style (cygpath)
61839      input_path=`$CYGPATH -u "$shortmode_path"`
61840      new_path="$input_path"
61841    fi
61842  fi
61843
61844  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61845  if test "x$test_cygdrive_prefix" = x; then
61846    # As a simple fix, exclude /usr/bin since it's not a real path.
61847    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61848      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61849      # a path prefixed by /cygdrive for fixpath to work.
61850      new_path="$CYGWIN_ROOT_PATH$input_path"
61851    fi
61852  fi
61853
61854
61855  if test "x$path" != "x$new_path"; then
61856    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61857    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61858$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61859  fi
61860
61861    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61862
61863  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61864  has_colon=`$ECHO $path | $GREP ^.:`
61865  new_path="$path"
61866  if test "x$has_colon" = x; then
61867    # Not in mixed or Windows style, start by that.
61868    new_path=`cmd //c echo $path`
61869  fi
61870
61871
61872  input_path="$new_path"
61873  # Check if we need to convert this using DOS-style short mode. If the path
61874  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61875  # take no chances and rewrite it.
61876  # Note: m4 eats our [], so we need to use [ and ] instead.
61877  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61878  if test "x$has_forbidden_chars" != x; then
61879    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61880    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61881  fi
61882
61883
61884  windows_path="$new_path"
61885  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61886    unix_path=`$CYGPATH -u "$windows_path"`
61887    new_path="$unix_path"
61888  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61889    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61890    new_path="$unix_path"
61891  fi
61892
61893  if test "x$path" != "x$new_path"; then
61894    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61895    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61896$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61897  fi
61898
61899  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61900  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61901
61902    else
61903      # We're on a unix platform. Hooray! :)
61904      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61905      has_space=`$ECHO "$path" | $GREP " "`
61906      if test "x$has_space" != x; then
61907        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61908$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61909        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61910      fi
61911
61912      # Use eval to expand a potential ~
61913      eval path="$path"
61914      if test ! -f "$path" && test ! -d "$path"; then
61915        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61916      fi
61917
61918      if test -d "$path"; then
61919        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61920      else
61921        dir="`$DIRNAME "$path"`"
61922        base="`$BASENAME "$path"`"
61923        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61924      fi
61925    fi
61926  fi
61927
61928
61929  # Only process if variable expands to non-empty
61930
61931  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61932    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61933
61934  # Input might be given as Windows format, start by converting to
61935  # unix format.
61936  path="$POTENTIAL_FREETYPE_LIB_PATH"
61937  new_path=`$CYGPATH -u "$path"`
61938
61939  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61940  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61941  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61942  # "foo.exe" is OK but "foo" is an error.
61943  #
61944  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61945  # It is also a way to make sure we got the proper file name for the real test later on.
61946  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61947  if test "x$test_shortpath" = x; then
61948    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61949$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61950    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61951  fi
61952
61953  # Call helper function which possibly converts this using DOS-style short mode.
61954  # If so, the updated path is stored in $new_path.
61955
61956  input_path="$new_path"
61957  # Check if we need to convert this using DOS-style short mode. If the path
61958  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61959  # take no chances and rewrite it.
61960  # Note: m4 eats our [], so we need to use [ and ] instead.
61961  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61962  if test "x$has_forbidden_chars" != x; then
61963    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61964    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61965    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61966    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61967      # Going to short mode and back again did indeed matter. Since short mode is
61968      # case insensitive, let's make it lowercase to improve readability.
61969      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61970      # Now convert it back to Unix-style (cygpath)
61971      input_path=`$CYGPATH -u "$shortmode_path"`
61972      new_path="$input_path"
61973    fi
61974  fi
61975
61976  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61977  if test "x$test_cygdrive_prefix" = x; then
61978    # As a simple fix, exclude /usr/bin since it's not a real path.
61979    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61980      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61981      # a path prefixed by /cygdrive for fixpath to work.
61982      new_path="$CYGWIN_ROOT_PATH$input_path"
61983    fi
61984  fi
61985
61986
61987  if test "x$path" != "x$new_path"; then
61988    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61989    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61990$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61991  fi
61992
61993    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61994
61995  path="$POTENTIAL_FREETYPE_LIB_PATH"
61996  has_colon=`$ECHO $path | $GREP ^.:`
61997  new_path="$path"
61998  if test "x$has_colon" = x; then
61999    # Not in mixed or Windows style, start by that.
62000    new_path=`cmd //c echo $path`
62001  fi
62002
62003
62004  input_path="$new_path"
62005  # Check if we need to convert this using DOS-style short mode. If the path
62006  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62007  # take no chances and rewrite it.
62008  # Note: m4 eats our [], so we need to use [ and ] instead.
62009  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62010  if test "x$has_forbidden_chars" != x; then
62011    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62012    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62013  fi
62014
62015
62016  windows_path="$new_path"
62017  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62018    unix_path=`$CYGPATH -u "$windows_path"`
62019    new_path="$unix_path"
62020  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62021    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62022    new_path="$unix_path"
62023  fi
62024
62025  if test "x$path" != "x$new_path"; then
62026    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62027    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62028$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62029  fi
62030
62031  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62032  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62033
62034    else
62035      # We're on a unix platform. Hooray! :)
62036      path="$POTENTIAL_FREETYPE_LIB_PATH"
62037      has_space=`$ECHO "$path" | $GREP " "`
62038      if test "x$has_space" != x; then
62039        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62040$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62041        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62042      fi
62043
62044      # Use eval to expand a potential ~
62045      eval path="$path"
62046      if test ! -f "$path" && test ! -d "$path"; then
62047        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62048      fi
62049
62050      if test -d "$path"; then
62051        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62052      else
62053        dir="`$DIRNAME "$path"`"
62054        base="`$BASENAME "$path"`"
62055        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62056      fi
62057    fi
62058  fi
62059
62060
62061    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62062    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62063$as_echo_n "checking for freetype includes... " >&6; }
62064    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62065$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62066    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62067    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62068$as_echo_n "checking for freetype libraries... " >&6; }
62069    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62070$as_echo "$FREETYPE_LIB_PATH" >&6; }
62071  fi
62072
62073              fi
62074            fi
62075          fi
62076        fi
62077      fi # end check in well-known locations
62078
62079      if test "x$FOUND_FREETYPE" != xyes; then
62080
62081  # Print a helpful message on how to acquire the necessary build dependency.
62082  # freetype is the help tag: freetype, cups, alsa etc
62083  MISSING_DEPENDENCY=freetype
62084
62085  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62086    cygwin_help $MISSING_DEPENDENCY
62087  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62088    msys_help $MISSING_DEPENDENCY
62089  else
62090    PKGHANDLER_COMMAND=
62091
62092    case $PKGHANDLER in
62093      apt-get)
62094        apt_help     $MISSING_DEPENDENCY ;;
62095      yum)
62096        yum_help     $MISSING_DEPENDENCY ;;
62097      port)
62098        port_help    $MISSING_DEPENDENCY ;;
62099      pkgutil)
62100        pkgutil_help $MISSING_DEPENDENCY ;;
62101      pkgadd)
62102        pkgadd_help  $MISSING_DEPENDENCY ;;
62103    esac
62104
62105    if test "x$PKGHANDLER_COMMAND" != x; then
62106      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62107    fi
62108  fi
62109
62110        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
62111      fi
62112    fi # end user specified settings
62113
62114    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
62115    if test "x$FREETYPE_CFLAGS" = x; then
62116
62117  # Only process if variable expands to non-empty
62118
62119  if test "x$FREETYPE_INCLUDE_PATH" != x; then
62120    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62121
62122  # Input might be given as Windows format, start by converting to
62123  # unix format.
62124  path="$FREETYPE_INCLUDE_PATH"
62125  new_path=`$CYGPATH -u "$path"`
62126
62127  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62128  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62129  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62130  # "foo.exe" is OK but "foo" is an error.
62131  #
62132  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62133  # It is also a way to make sure we got the proper file name for the real test later on.
62134  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62135  if test "x$test_shortpath" = x; then
62136    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62137$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62138    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
62139  fi
62140
62141  # Call helper function which possibly converts this using DOS-style short mode.
62142  # If so, the updated path is stored in $new_path.
62143
62144  input_path="$new_path"
62145  # Check if we need to convert this using DOS-style short mode. If the path
62146  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62147  # take no chances and rewrite it.
62148  # Note: m4 eats our [], so we need to use [ and ] instead.
62149  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62150  if test "x$has_forbidden_chars" != x; then
62151    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62152    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62153    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62154    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62155      # Going to short mode and back again did indeed matter. Since short mode is
62156      # case insensitive, let's make it lowercase to improve readability.
62157      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62158      # Now convert it back to Unix-style (cygpath)
62159      input_path=`$CYGPATH -u "$shortmode_path"`
62160      new_path="$input_path"
62161    fi
62162  fi
62163
62164  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62165  if test "x$test_cygdrive_prefix" = x; then
62166    # As a simple fix, exclude /usr/bin since it's not a real path.
62167    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62168      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62169      # a path prefixed by /cygdrive for fixpath to work.
62170      new_path="$CYGWIN_ROOT_PATH$input_path"
62171    fi
62172  fi
62173
62174
62175  if test "x$path" != "x$new_path"; then
62176    FREETYPE_INCLUDE_PATH="$new_path"
62177    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62178$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62179  fi
62180
62181    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62182
62183  path="$FREETYPE_INCLUDE_PATH"
62184  has_colon=`$ECHO $path | $GREP ^.:`
62185  new_path="$path"
62186  if test "x$has_colon" = x; then
62187    # Not in mixed or Windows style, start by that.
62188    new_path=`cmd //c echo $path`
62189  fi
62190
62191
62192  input_path="$new_path"
62193  # Check if we need to convert this using DOS-style short mode. If the path
62194  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62195  # take no chances and rewrite it.
62196  # Note: m4 eats our [], so we need to use [ and ] instead.
62197  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62198  if test "x$has_forbidden_chars" != x; then
62199    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62200    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62201  fi
62202
62203
62204  windows_path="$new_path"
62205  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62206    unix_path=`$CYGPATH -u "$windows_path"`
62207    new_path="$unix_path"
62208  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62209    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62210    new_path="$unix_path"
62211  fi
62212
62213  if test "x$path" != "x$new_path"; then
62214    FREETYPE_INCLUDE_PATH="$new_path"
62215    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62216$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62217  fi
62218
62219  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62220  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62221
62222    else
62223      # We're on a unix platform. Hooray! :)
62224      path="$FREETYPE_INCLUDE_PATH"
62225      has_space=`$ECHO "$path" | $GREP " "`
62226      if test "x$has_space" != x; then
62227        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62228$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62229        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62230      fi
62231
62232      # Use eval to expand a potential ~
62233      eval path="$path"
62234      if test ! -f "$path" && test ! -d "$path"; then
62235        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62236      fi
62237
62238      if test -d "$path"; then
62239        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62240      else
62241        dir="`$DIRNAME "$path"`"
62242        base="`$BASENAME "$path"`"
62243        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62244      fi
62245    fi
62246  fi
62247
62248      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
62249        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
62250      else
62251        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
62252      fi
62253    fi
62254
62255    if test "x$FREETYPE_LIBS" = x; then
62256
62257  # Only process if variable expands to non-empty
62258
62259  if test "x$FREETYPE_LIB_PATH" != x; then
62260    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62261
62262  # Input might be given as Windows format, start by converting to
62263  # unix format.
62264  path="$FREETYPE_LIB_PATH"
62265  new_path=`$CYGPATH -u "$path"`
62266
62267  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62268  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62269  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62270  # "foo.exe" is OK but "foo" is an error.
62271  #
62272  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62273  # It is also a way to make sure we got the proper file name for the real test later on.
62274  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62275  if test "x$test_shortpath" = x; then
62276    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62277$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62278    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
62279  fi
62280
62281  # Call helper function which possibly converts this using DOS-style short mode.
62282  # If so, the updated path is stored in $new_path.
62283
62284  input_path="$new_path"
62285  # Check if we need to convert this using DOS-style short mode. If the path
62286  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62287  # take no chances and rewrite it.
62288  # Note: m4 eats our [], so we need to use [ and ] instead.
62289  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62290  if test "x$has_forbidden_chars" != x; then
62291    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62292    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62293    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62294    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62295      # Going to short mode and back again did indeed matter. Since short mode is
62296      # case insensitive, let's make it lowercase to improve readability.
62297      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62298      # Now convert it back to Unix-style (cygpath)
62299      input_path=`$CYGPATH -u "$shortmode_path"`
62300      new_path="$input_path"
62301    fi
62302  fi
62303
62304  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62305  if test "x$test_cygdrive_prefix" = x; then
62306    # As a simple fix, exclude /usr/bin since it's not a real path.
62307    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62308      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62309      # a path prefixed by /cygdrive for fixpath to work.
62310      new_path="$CYGWIN_ROOT_PATH$input_path"
62311    fi
62312  fi
62313
62314
62315  if test "x$path" != "x$new_path"; then
62316    FREETYPE_LIB_PATH="$new_path"
62317    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62318$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62319  fi
62320
62321    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62322
62323  path="$FREETYPE_LIB_PATH"
62324  has_colon=`$ECHO $path | $GREP ^.:`
62325  new_path="$path"
62326  if test "x$has_colon" = x; then
62327    # Not in mixed or Windows style, start by that.
62328    new_path=`cmd //c echo $path`
62329  fi
62330
62331
62332  input_path="$new_path"
62333  # Check if we need to convert this using DOS-style short mode. If the path
62334  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62335  # take no chances and rewrite it.
62336  # Note: m4 eats our [], so we need to use [ and ] instead.
62337  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62338  if test "x$has_forbidden_chars" != x; then
62339    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62340    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62341  fi
62342
62343
62344  windows_path="$new_path"
62345  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62346    unix_path=`$CYGPATH -u "$windows_path"`
62347    new_path="$unix_path"
62348  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62349    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62350    new_path="$unix_path"
62351  fi
62352
62353  if test "x$path" != "x$new_path"; then
62354    FREETYPE_LIB_PATH="$new_path"
62355    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62356$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62357  fi
62358
62359  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62360  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62361
62362    else
62363      # We're on a unix platform. Hooray! :)
62364      path="$FREETYPE_LIB_PATH"
62365      has_space=`$ECHO "$path" | $GREP " "`
62366      if test "x$has_space" != x; then
62367        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62368$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62369        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62370      fi
62371
62372      # Use eval to expand a potential ~
62373      eval path="$path"
62374      if test ! -f "$path" && test ! -d "$path"; then
62375        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62376      fi
62377
62378      if test -d "$path"; then
62379        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62380      else
62381        dir="`$DIRNAME "$path"`"
62382        base="`$BASENAME "$path"`"
62383        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62384      fi
62385    fi
62386  fi
62387
62388      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62389        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
62390      else
62391        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
62392      fi
62393    fi
62394
62395    # Try to compile it
62396    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
62397$as_echo_n "checking if we can compile and link with freetype... " >&6; }
62398    ac_ext=cpp
62399ac_cpp='$CXXCPP $CPPFLAGS'
62400ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62401ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62402ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62403
62404    PREV_CXXCFLAGS="$CXXFLAGS"
62405    PREV_LIBS="$LIBS"
62406    PREV_CXX="$CXX"
62407    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
62408    LIBS="$LIBS $FREETYPE_LIBS"
62409    CXX="$FIXPATH $CXX"
62410    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62411/* end confdefs.h.  */
62412
62413          #include<ft2build.h>
62414          #include FT_FREETYPE_H
62415          int main () {
62416            FT_Init_FreeType(NULL);
62417            return 0;
62418          }
62419
62420_ACEOF
62421if ac_fn_cxx_try_link "$LINENO"; then :
62422
62423          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62424$as_echo "yes" >&6; }
62425
62426else
62427
62428          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62429$as_echo "no" >&6; }
62430          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
62431$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
62432          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
62433$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
62434
62435
62436  # Print a helpful message on how to acquire the necessary build dependency.
62437  # freetype is the help tag: freetype, cups, alsa etc
62438  MISSING_DEPENDENCY=freetype
62439
62440  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62441    cygwin_help $MISSING_DEPENDENCY
62442  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62443    msys_help $MISSING_DEPENDENCY
62444  else
62445    PKGHANDLER_COMMAND=
62446
62447    case $PKGHANDLER in
62448      apt-get)
62449        apt_help     $MISSING_DEPENDENCY ;;
62450      yum)
62451        yum_help     $MISSING_DEPENDENCY ;;
62452      port)
62453        port_help    $MISSING_DEPENDENCY ;;
62454      pkgutil)
62455        pkgutil_help $MISSING_DEPENDENCY ;;
62456      pkgadd)
62457        pkgadd_help  $MISSING_DEPENDENCY ;;
62458    esac
62459
62460    if test "x$PKGHANDLER_COMMAND" != x; then
62461      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62462    fi
62463  fi
62464
62465
62466          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
62467
62468
62469fi
62470rm -f core conftest.err conftest.$ac_objext \
62471    conftest$ac_exeext conftest.$ac_ext
62472    CXXCFLAGS="$PREV_CXXFLAGS"
62473    LIBS="$PREV_LIBS"
62474    CXX="$PREV_CXX"
62475    ac_ext=cpp
62476ac_cpp='$CXXCPP $CPPFLAGS'
62477ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62478ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62479ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62480
62481
62482    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
62483$as_echo_n "checking if we should bundle freetype... " >&6; }
62484    if test "x$BUNDLE_FREETYPE" = xyes; then
62485      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
62486    fi
62487    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
62488$as_echo "$BUNDLE_FREETYPE" >&6; }
62489
62490  fi # end freetype needed
62491
62492
62493
62494
62495
62496
62497
62498# Check whether --with-alsa was given.
62499if test "${with_alsa+set}" = set; then :
62500  withval=$with_alsa;
62501fi
62502
62503
62504# Check whether --with-alsa-include was given.
62505if test "${with_alsa_include+set}" = set; then :
62506  withval=$with_alsa_include;
62507fi
62508
62509
62510# Check whether --with-alsa-lib was given.
62511if test "${with_alsa_lib+set}" = set; then :
62512  withval=$with_alsa_lib;
62513fi
62514
62515
62516  if test "x$NEEDS_LIB_ALSA" = xfalse; then
62517    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
62518        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
62519        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
62520      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
62521$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
62522    fi
62523    ALSA_CFLAGS=
62524    ALSA_LIBS=
62525  else
62526    ALSA_FOUND=no
62527
62528    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
62529      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
62530    fi
62531
62532    if test "x${with_alsa}" != x; then
62533      ALSA_LIBS="-L${with_alsa}/lib -lasound"
62534      ALSA_CFLAGS="-I${with_alsa}/include"
62535      ALSA_FOUND=yes
62536    fi
62537    if test "x${with_alsa_include}" != x; then
62538      ALSA_CFLAGS="-I${with_alsa_include}"
62539      ALSA_FOUND=yes
62540    fi
62541    if test "x${with_alsa_lib}" != x; then
62542      ALSA_LIBS="-L${with_alsa_lib} -lasound"
62543      ALSA_FOUND=yes
62544    fi
62545    # Do not try pkg-config if we have a sysroot set.
62546    if test "x$SYSROOT" = x; then
62547      if test "x$ALSA_FOUND" = xno; then
62548
62549pkg_failed=no
62550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
62551$as_echo_n "checking for ALSA... " >&6; }
62552
62553if test -n "$ALSA_CFLAGS"; then
62554    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
62555 elif test -n "$PKG_CONFIG"; then
62556    if test -n "$PKG_CONFIG" && \
62557    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62558  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62559  ac_status=$?
62560  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62561  test $ac_status = 0; }; then
62562  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
62563else
62564  pkg_failed=yes
62565fi
62566 else
62567    pkg_failed=untried
62568fi
62569if test -n "$ALSA_LIBS"; then
62570    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
62571 elif test -n "$PKG_CONFIG"; then
62572    if test -n "$PKG_CONFIG" && \
62573    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62574  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62575  ac_status=$?
62576  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62577  test $ac_status = 0; }; then
62578  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
62579else
62580  pkg_failed=yes
62581fi
62582 else
62583    pkg_failed=untried
62584fi
62585
62586
62587
62588if test $pkg_failed = yes; then
62589
62590if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62591        _pkg_short_errors_supported=yes
62592else
62593        _pkg_short_errors_supported=no
62594fi
62595        if test $_pkg_short_errors_supported = yes; then
62596	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
62597        else
62598	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
62599        fi
62600	# Put the nasty error message in config.log where it belongs
62601	echo "$ALSA_PKG_ERRORS" >&5
62602
62603	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62604$as_echo "no" >&6; }
62605                ALSA_FOUND=no
62606elif test $pkg_failed = untried; then
62607	ALSA_FOUND=no
62608else
62609	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
62610	ALSA_LIBS=$pkg_cv_ALSA_LIBS
62611        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62612$as_echo "yes" >&6; }
62613	ALSA_FOUND=yes
62614fi
62615      fi
62616    fi
62617    if test "x$ALSA_FOUND" = xno; then
62618      for ac_header in alsa/asoundlib.h
62619do :
62620  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
62621if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
62622  cat >>confdefs.h <<_ACEOF
62623#define HAVE_ALSA_ASOUNDLIB_H 1
62624_ACEOF
62625
62626            ALSA_FOUND=yes
62627            ALSA_CFLAGS=-Iignoreme
62628            ALSA_LIBS=-lasound
62629            DEFAULT_ALSA=yes
62630
62631else
62632  ALSA_FOUND=no
62633
62634fi
62635
62636done
62637
62638    fi
62639    if test "x$ALSA_FOUND" = xno; then
62640
62641  # Print a helpful message on how to acquire the necessary build dependency.
62642  # alsa is the help tag: freetype, cups, alsa etc
62643  MISSING_DEPENDENCY=alsa
62644
62645  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62646    cygwin_help $MISSING_DEPENDENCY
62647  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62648    msys_help $MISSING_DEPENDENCY
62649  else
62650    PKGHANDLER_COMMAND=
62651
62652    case $PKGHANDLER in
62653      apt-get)
62654        apt_help     $MISSING_DEPENDENCY ;;
62655      yum)
62656        yum_help     $MISSING_DEPENDENCY ;;
62657      port)
62658        port_help    $MISSING_DEPENDENCY ;;
62659      pkgutil)
62660        pkgutil_help $MISSING_DEPENDENCY ;;
62661      pkgadd)
62662        pkgadd_help  $MISSING_DEPENDENCY ;;
62663    esac
62664
62665    if test "x$PKGHANDLER_COMMAND" != x; then
62666      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62667    fi
62668  fi
62669
62670      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
62671    fi
62672  fi
62673
62674
62675
62676
62677
62678
62679# Check whether --with-libffi was given.
62680if test "${with_libffi+set}" = set; then :
62681  withval=$with_libffi;
62682fi
62683
62684
62685# Check whether --with-libffi-include was given.
62686if test "${with_libffi_include+set}" = set; then :
62687  withval=$with_libffi_include;
62688fi
62689
62690
62691# Check whether --with-libffi-lib was given.
62692if test "${with_libffi_lib+set}" = set; then :
62693  withval=$with_libffi_lib;
62694fi
62695
62696
62697  if test "x$NEEDS_LIB_FFI" = xfalse; then
62698    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
62699        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
62700        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
62701      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
62702$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
62703    fi
62704    LIBFFI_CFLAGS=
62705    LIBFFI_LIBS=
62706  else
62707    LIBFFI_FOUND=no
62708
62709    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
62710      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
62711    fi
62712
62713    if test "x${with_libffi}" != x; then
62714      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
62715      LIBFFI_CFLAGS="-I${with_libffi}/include"
62716      LIBFFI_FOUND=yes
62717    fi
62718    if test "x${with_libffi_include}" != x; then
62719      LIBFFI_CFLAGS="-I${with_libffi_include}"
62720      LIBFFI_FOUND=yes
62721    fi
62722    if test "x${with_libffi_lib}" != x; then
62723      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
62724      LIBFFI_FOUND=yes
62725    fi
62726    # Do not try pkg-config if we have a sysroot set.
62727    if test "x$SYSROOT" = x; then
62728      if test "x$LIBFFI_FOUND" = xno; then
62729        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
62730
62731pkg_failed=no
62732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
62733$as_echo_n "checking for LIBFFI... " >&6; }
62734
62735if test -n "$LIBFFI_CFLAGS"; then
62736    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
62737 elif test -n "$PKG_CONFIG"; then
62738    if test -n "$PKG_CONFIG" && \
62739    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
62740  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
62741  ac_status=$?
62742  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62743  test $ac_status = 0; }; then
62744  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
62745else
62746  pkg_failed=yes
62747fi
62748 else
62749    pkg_failed=untried
62750fi
62751if test -n "$LIBFFI_LIBS"; then
62752    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
62753 elif test -n "$PKG_CONFIG"; then
62754    if test -n "$PKG_CONFIG" && \
62755    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
62756  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
62757  ac_status=$?
62758  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62759  test $ac_status = 0; }; then
62760  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
62761else
62762  pkg_failed=yes
62763fi
62764 else
62765    pkg_failed=untried
62766fi
62767
62768
62769
62770if test $pkg_failed = yes; then
62771
62772if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62773        _pkg_short_errors_supported=yes
62774else
62775        _pkg_short_errors_supported=no
62776fi
62777        if test $_pkg_short_errors_supported = yes; then
62778	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
62779        else
62780	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
62781        fi
62782	# Put the nasty error message in config.log where it belongs
62783	echo "$LIBFFI_PKG_ERRORS" >&5
62784
62785	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62786$as_echo "no" >&6; }
62787                LIBFFI_FOUND=no
62788elif test $pkg_failed = untried; then
62789	LIBFFI_FOUND=no
62790else
62791	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
62792	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
62793        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62794$as_echo "yes" >&6; }
62795	LIBFFI_FOUND=yes
62796fi
62797      fi
62798    fi
62799    if test "x$LIBFFI_FOUND" = xno; then
62800      for ac_header in ffi.h
62801do :
62802  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
62803if test "x$ac_cv_header_ffi_h" = xyes; then :
62804  cat >>confdefs.h <<_ACEOF
62805#define HAVE_FFI_H 1
62806_ACEOF
62807
62808            LIBFFI_FOUND=yes
62809            LIBFFI_CFLAGS=
62810            LIBFFI_LIBS=-lffi
62811
62812else
62813  LIBFFI_FOUND=no
62814
62815fi
62816
62817done
62818
62819    fi
62820    if test "x$LIBFFI_FOUND" = xno; then
62821
62822  # Print a helpful message on how to acquire the necessary build dependency.
62823  # ffi is the help tag: freetype, cups, alsa etc
62824  MISSING_DEPENDENCY=ffi
62825
62826  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62827    cygwin_help $MISSING_DEPENDENCY
62828  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62829    msys_help $MISSING_DEPENDENCY
62830  else
62831    PKGHANDLER_COMMAND=
62832
62833    case $PKGHANDLER in
62834      apt-get)
62835        apt_help     $MISSING_DEPENDENCY ;;
62836      yum)
62837        yum_help     $MISSING_DEPENDENCY ;;
62838      port)
62839        port_help    $MISSING_DEPENDENCY ;;
62840      pkgutil)
62841        pkgutil_help $MISSING_DEPENDENCY ;;
62842      pkgadd)
62843        pkgadd_help  $MISSING_DEPENDENCY ;;
62844    esac
62845
62846    if test "x$PKGHANDLER_COMMAND" != x; then
62847      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62848    fi
62849  fi
62850
62851      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
62852    fi
62853
62854    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
62855$as_echo_n "checking if libffi works... " >&6; }
62856    ac_ext=c
62857ac_cpp='$CPP $CPPFLAGS'
62858ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62859ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62860ac_compiler_gnu=$ac_cv_c_compiler_gnu
62861
62862    OLD_CFLAGS="$CFLAGS"
62863    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
62864    OLD_LIBS="$LIBS"
62865    LIBS="$LIBS $LIBFFI_LIBS"
62866    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62867/* end confdefs.h.  */
62868#include <ffi.h>
62869int
62870main ()
62871{
62872
62873          ffi_call(NULL, NULL, NULL, NULL);
62874          return 0;
62875
62876  ;
62877  return 0;
62878}
62879_ACEOF
62880if ac_fn_c_try_link "$LINENO"; then :
62881  LIBFFI_WORKS=yes
62882else
62883  LIBFFI_WORKS=no
62884
62885fi
62886rm -f core conftest.err conftest.$ac_objext \
62887    conftest$ac_exeext conftest.$ac_ext
62888    CFLAGS="$OLD_CFLAGS"
62889    LIBS="$OLD_LIBS"
62890    ac_ext=cpp
62891ac_cpp='$CXXCPP $CPPFLAGS'
62892ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62893ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62894ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62895
62896    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
62897$as_echo "$LIBFFI_WORKS" >&6; }
62898
62899    if test "x$LIBFFI_WORKS" = xno; then
62900
62901  # Print a helpful message on how to acquire the necessary build dependency.
62902  # ffi is the help tag: freetype, cups, alsa etc
62903  MISSING_DEPENDENCY=ffi
62904
62905  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62906    cygwin_help $MISSING_DEPENDENCY
62907  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62908    msys_help $MISSING_DEPENDENCY
62909  else
62910    PKGHANDLER_COMMAND=
62911
62912    case $PKGHANDLER in
62913      apt-get)
62914        apt_help     $MISSING_DEPENDENCY ;;
62915      yum)
62916        yum_help     $MISSING_DEPENDENCY ;;
62917      port)
62918        port_help    $MISSING_DEPENDENCY ;;
62919      pkgutil)
62920        pkgutil_help $MISSING_DEPENDENCY ;;
62921      pkgadd)
62922        pkgadd_help  $MISSING_DEPENDENCY ;;
62923    esac
62924
62925    if test "x$PKGHANDLER_COMMAND" != x; then
62926      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62927    fi
62928  fi
62929
62930      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
62931    fi
62932  fi
62933
62934
62935
62936
62937
62938  if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
62939    # Extract the first word of "llvm-config", so it can be a program name with args.
62940set dummy llvm-config; ac_word=$2
62941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
62942$as_echo_n "checking for $ac_word... " >&6; }
62943if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
62944  $as_echo_n "(cached) " >&6
62945else
62946  if test -n "$LLVM_CONFIG"; then
62947  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
62948else
62949as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
62950for as_dir in $PATH
62951do
62952  IFS=$as_save_IFS
62953  test -z "$as_dir" && as_dir=.
62954    for ac_exec_ext in '' $ac_executable_extensions; do
62955  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
62956    ac_cv_prog_LLVM_CONFIG="llvm-config"
62957    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
62958    break 2
62959  fi
62960done
62961  done
62962IFS=$as_save_IFS
62963
62964fi
62965fi
62966LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
62967if test -n "$LLVM_CONFIG"; then
62968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
62969$as_echo "$LLVM_CONFIG" >&6; }
62970else
62971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62972$as_echo "no" >&6; }
62973fi
62974
62975
62976
62977    if test "x$LLVM_CONFIG" != xllvm-config; then
62978      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
62979    fi
62980
62981    llvm_components="jit mcjit engine nativecodegen native"
62982    unset LLVM_CFLAGS
62983    for flag in $("$LLVM_CONFIG" --cxxflags); do
62984      if echo "${flag}" | grep -q '^-[ID]'; then
62985        if test "${flag}" != "-D_DEBUG" ; then
62986          if test "${LLVM_CFLAGS}" != "" ; then
62987            LLVM_CFLAGS="${LLVM_CFLAGS} "
62988          fi
62989          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
62990        fi
62991      fi
62992    done
62993    llvm_version=$("${LLVM_CONFIG}" --version | $SED 's/\.//; s/svn.*//')
62994    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
62995
62996    unset LLVM_LDFLAGS
62997    for flag in $("${LLVM_CONFIG}" --ldflags); do
62998      if echo "${flag}" | grep -q '^-L'; then
62999        if test "${LLVM_LDFLAGS}" != ""; then
63000          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
63001        fi
63002        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
63003      fi
63004    done
63005
63006    unset LLVM_LIBS
63007    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
63008      if echo "${flag}" | grep -q '^-l'; then
63009        if test "${LLVM_LIBS}" != ""; then
63010          LLVM_LIBS="${LLVM_LIBS} "
63011        fi
63012        LLVM_LIBS="${LLVM_LIBS}${flag}"
63013      fi
63014    done
63015
63016    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
63017    # always properly detect -ltinfo
63018    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
63019
63020
63021
63022
63023  fi
63024
63025
63026
63027# Check whether --with-libjpeg was given.
63028if test "${with_libjpeg+set}" = set; then :
63029  withval=$with_libjpeg;
63030fi
63031
63032
63033  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
63034$as_echo_n "checking for which libjpeg to use... " >&6; }
63035  # default is bundled
63036  DEFAULT_LIBJPEG=bundled
63037  # if user didn't specify, use DEFAULT_LIBJPEG
63038  if test "x${with_libjpeg}" = "x"; then
63039    with_libjpeg=${DEFAULT_LIBJPEG}
63040  fi
63041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
63042$as_echo "${with_libjpeg}" >&6; }
63043
63044  if test "x${with_libjpeg}" = "xbundled"; then
63045    USE_EXTERNAL_LIBJPEG=false
63046  elif test "x${with_libjpeg}" = "xsystem"; then
63047    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
63048if test "x$ac_cv_header_jpeglib_h" = xyes; then :
63049
63050else
63051   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
63052fi
63053
63054
63055    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
63056$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
63057if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
63058  $as_echo_n "(cached) " >&6
63059else
63060  ac_check_lib_save_LIBS=$LIBS
63061LIBS="-ljpeg  $LIBS"
63062cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63063/* end confdefs.h.  */
63064
63065/* Override any GCC internal prototype to avoid an error.
63066   Use char because int might match the return type of a GCC
63067   builtin and then its argument prototype would still apply.  */
63068#ifdef __cplusplus
63069extern "C"
63070#endif
63071char jpeg_CreateDecompress ();
63072int
63073main ()
63074{
63075return jpeg_CreateDecompress ();
63076  ;
63077  return 0;
63078}
63079_ACEOF
63080if ac_fn_cxx_try_link "$LINENO"; then :
63081  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
63082else
63083  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
63084fi
63085rm -f core conftest.err conftest.$ac_objext \
63086    conftest$ac_exeext conftest.$ac_ext
63087LIBS=$ac_check_lib_save_LIBS
63088fi
63089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
63090$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
63091if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
63092  cat >>confdefs.h <<_ACEOF
63093#define HAVE_LIBJPEG 1
63094_ACEOF
63095
63096  LIBS="-ljpeg $LIBS"
63097
63098else
63099   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
63100fi
63101
63102
63103    USE_EXTERNAL_LIBJPEG=true
63104  else
63105    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
63106  fi
63107
63108
63109
63110
63111
63112# Check whether --with-giflib was given.
63113if test "${with_giflib+set}" = set; then :
63114  withval=$with_giflib;
63115fi
63116
63117
63118  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
63119$as_echo_n "checking for which giflib to use... " >&6; }
63120  # default is bundled
63121  DEFAULT_GIFLIB=bundled
63122  # if user didn't specify, use DEFAULT_GIFLIB
63123  if test "x${with_giflib}" = "x"; then
63124    with_giflib=${DEFAULT_GIFLIB}
63125  fi
63126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
63127$as_echo "${with_giflib}" >&6; }
63128
63129  if test "x${with_giflib}" = "xbundled"; then
63130    USE_EXTERNAL_LIBGIF=false
63131  elif test "x${with_giflib}" = "xsystem"; then
63132    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
63133if test "x$ac_cv_header_gif_lib_h" = xyes; then :
63134
63135else
63136   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
63137fi
63138
63139
63140    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
63141$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
63142if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
63143  $as_echo_n "(cached) " >&6
63144else
63145  ac_check_lib_save_LIBS=$LIBS
63146LIBS="-lgif  $LIBS"
63147cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63148/* end confdefs.h.  */
63149
63150/* Override any GCC internal prototype to avoid an error.
63151   Use char because int might match the return type of a GCC
63152   builtin and then its argument prototype would still apply.  */
63153#ifdef __cplusplus
63154extern "C"
63155#endif
63156char DGifGetCode ();
63157int
63158main ()
63159{
63160return DGifGetCode ();
63161  ;
63162  return 0;
63163}
63164_ACEOF
63165if ac_fn_cxx_try_link "$LINENO"; then :
63166  ac_cv_lib_gif_DGifGetCode=yes
63167else
63168  ac_cv_lib_gif_DGifGetCode=no
63169fi
63170rm -f core conftest.err conftest.$ac_objext \
63171    conftest$ac_exeext conftest.$ac_ext
63172LIBS=$ac_check_lib_save_LIBS
63173fi
63174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
63175$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
63176if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
63177  cat >>confdefs.h <<_ACEOF
63178#define HAVE_LIBGIF 1
63179_ACEOF
63180
63181  LIBS="-lgif $LIBS"
63182
63183else
63184   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
63185fi
63186
63187
63188    USE_EXTERNAL_LIBGIF=true
63189  else
63190    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
63191  fi
63192
63193
63194
63195
63196
63197# Check whether --with-libpng was given.
63198if test "${with_libpng+set}" = set; then :
63199  withval=$with_libpng;
63200fi
63201
63202
63203  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
63204$as_echo_n "checking for which libpng to use... " >&6; }
63205
63206  # default is bundled
63207  DEFAULT_LIBPNG=bundled
63208  # if user didn't specify, use DEFAULT_LIBPNG
63209  if test "x${with_libpng}" = "x"; then
63210      with_libpng=${DEFAULT_LIBPNG}
63211  fi
63212
63213  if test "x${with_libpng}" = "xbundled"; then
63214      USE_EXTERNAL_LIBPNG=false
63215      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63216$as_echo "bundled" >&6; }
63217  elif test "x${with_libpng}" = "xsystem"; then
63218
63219pkg_failed=no
63220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
63221$as_echo_n "checking for PNG... " >&6; }
63222
63223if test -n "$PNG_CFLAGS"; then
63224    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
63225 elif test -n "$PKG_CONFIG"; then
63226    if test -n "$PKG_CONFIG" && \
63227    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63228  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63229  ac_status=$?
63230  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63231  test $ac_status = 0; }; then
63232  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
63233else
63234  pkg_failed=yes
63235fi
63236 else
63237    pkg_failed=untried
63238fi
63239if test -n "$PNG_LIBS"; then
63240    pkg_cv_PNG_LIBS="$PNG_LIBS"
63241 elif test -n "$PKG_CONFIG"; then
63242    if test -n "$PKG_CONFIG" && \
63243    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63244  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63245  ac_status=$?
63246  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63247  test $ac_status = 0; }; then
63248  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
63249else
63250  pkg_failed=yes
63251fi
63252 else
63253    pkg_failed=untried
63254fi
63255
63256
63257
63258if test $pkg_failed = yes; then
63259
63260if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63261        _pkg_short_errors_supported=yes
63262else
63263        _pkg_short_errors_supported=no
63264fi
63265        if test $_pkg_short_errors_supported = yes; then
63266	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
63267        else
63268	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
63269        fi
63270	# Put the nasty error message in config.log where it belongs
63271	echo "$PNG_PKG_ERRORS" >&5
63272
63273	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63274$as_echo "no" >&6; }
63275                 LIBPNG_FOUND=no
63276elif test $pkg_failed = untried; then
63277	 LIBPNG_FOUND=no
63278else
63279	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
63280	PNG_LIBS=$pkg_cv_PNG_LIBS
63281        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63282$as_echo "yes" >&6; }
63283	 LIBPNG_FOUND=yes
63284fi
63285      if test "x${LIBPNG_FOUND}" = "xyes"; then
63286          USE_EXTERNAL_LIBPNG=true
63287          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63288$as_echo "system" >&6; }
63289      else
63290          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63291$as_echo "system not found" >&6; }
63292          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
63293      fi
63294  else
63295      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
63296  fi
63297
63298
63299
63300
63301
63302# Check whether --with-zlib was given.
63303if test "${with_zlib+set}" = set; then :
63304  withval=$with_zlib;
63305fi
63306
63307
63308  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
63309$as_echo_n "checking for compress in -lz... " >&6; }
63310if ${ac_cv_lib_z_compress+:} false; then :
63311  $as_echo_n "(cached) " >&6
63312else
63313  ac_check_lib_save_LIBS=$LIBS
63314LIBS="-lz  $LIBS"
63315cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63316/* end confdefs.h.  */
63317
63318/* Override any GCC internal prototype to avoid an error.
63319   Use char because int might match the return type of a GCC
63320   builtin and then its argument prototype would still apply.  */
63321#ifdef __cplusplus
63322extern "C"
63323#endif
63324char compress ();
63325int
63326main ()
63327{
63328return compress ();
63329  ;
63330  return 0;
63331}
63332_ACEOF
63333if ac_fn_cxx_try_link "$LINENO"; then :
63334  ac_cv_lib_z_compress=yes
63335else
63336  ac_cv_lib_z_compress=no
63337fi
63338rm -f core conftest.err conftest.$ac_objext \
63339    conftest$ac_exeext conftest.$ac_ext
63340LIBS=$ac_check_lib_save_LIBS
63341fi
63342{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
63343$as_echo "$ac_cv_lib_z_compress" >&6; }
63344if test "x$ac_cv_lib_z_compress" = xyes; then :
63345   ZLIB_FOUND=yes
63346else
63347   ZLIB_FOUND=no
63348fi
63349
63350
63351  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
63352$as_echo_n "checking for which zlib to use... " >&6; }
63353
63354  DEFAULT_ZLIB=system
63355  if test "x$OPENJDK_TARGET_OS" = xwindows; then
63356    # On windows default is bundled...on others default is system
63357    DEFAULT_ZLIB=bundled
63358  fi
63359
63360  if test "x${ZLIB_FOUND}" != "xyes"; then
63361    # If we don't find any system...set default to bundled
63362    DEFAULT_ZLIB=bundled
63363  fi
63364
63365  # If user didn't specify, use DEFAULT_ZLIB
63366  if test "x${with_zlib}" = "x"; then
63367    with_zlib=${DEFAULT_ZLIB}
63368  fi
63369
63370  if test "x${with_zlib}" = "xbundled"; then
63371    USE_EXTERNAL_LIBZ=false
63372    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63373$as_echo "bundled" >&6; }
63374  elif test "x${with_zlib}" = "xsystem"; then
63375    if test "x${ZLIB_FOUND}" = "xyes"; then
63376      USE_EXTERNAL_LIBZ=true
63377      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63378$as_echo "system" >&6; }
63379    else
63380      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63381$as_echo "system not found" >&6; }
63382      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
63383    fi
63384  else
63385    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
63386  fi
63387
63388
63389
63390
63391
63392# Check whether --with-lcms was given.
63393if test "${with_lcms+set}" = set; then :
63394  withval=$with_lcms;
63395fi
63396
63397
63398  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
63399$as_echo_n "checking for which lcms to use... " >&6; }
63400
63401  DEFAULT_LCMS=bundled
63402  # If user didn't specify, use DEFAULT_LCMS
63403  if test "x${with_lcms}" = "x"; then
63404      with_lcms=${DEFAULT_LCMS}
63405  fi
63406
63407  if test "x${with_lcms}" = "xbundled"; then
63408    USE_EXTERNAL_LCMS=false
63409    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63410$as_echo "bundled" >&6; }
63411  elif test "x${with_lcms}" = "xsystem"; then
63412    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63413$as_echo "system" >&6; }
63414
63415pkg_failed=no
63416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
63417$as_echo_n "checking for LCMS... " >&6; }
63418
63419if test -n "$LCMS_CFLAGS"; then
63420    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
63421 elif test -n "$PKG_CONFIG"; then
63422    if test -n "$PKG_CONFIG" && \
63423    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63424  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63425  ac_status=$?
63426  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63427  test $ac_status = 0; }; then
63428  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
63429else
63430  pkg_failed=yes
63431fi
63432 else
63433    pkg_failed=untried
63434fi
63435if test -n "$LCMS_LIBS"; then
63436    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
63437 elif test -n "$PKG_CONFIG"; then
63438    if test -n "$PKG_CONFIG" && \
63439    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63440  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63441  ac_status=$?
63442  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63443  test $ac_status = 0; }; then
63444  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
63445else
63446  pkg_failed=yes
63447fi
63448 else
63449    pkg_failed=untried
63450fi
63451
63452
63453
63454if test $pkg_failed = yes; then
63455
63456if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63457        _pkg_short_errors_supported=yes
63458else
63459        _pkg_short_errors_supported=no
63460fi
63461        if test $_pkg_short_errors_supported = yes; then
63462	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
63463        else
63464	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
63465        fi
63466	# Put the nasty error message in config.log where it belongs
63467	echo "$LCMS_PKG_ERRORS" >&5
63468
63469	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63470$as_echo "no" >&6; }
63471                LCMS_FOUND=no
63472elif test $pkg_failed = untried; then
63473	LCMS_FOUND=no
63474else
63475	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
63476	LCMS_LIBS=$pkg_cv_LCMS_LIBS
63477        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63478$as_echo "yes" >&6; }
63479	LCMS_FOUND=yes
63480fi
63481    if test "x${LCMS_FOUND}" = "xyes"; then
63482      USE_EXTERNAL_LCMS=true
63483    else
63484      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
63485    fi
63486  else
63487    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
63488  fi
63489
63490
63491
63492
63493
63494
63495
63496
63497
63498
63499
63500  # Setup libm (the maths library)
63501  if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
63502    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
63503$as_echo_n "checking for cos in -lm... " >&6; }
63504if ${ac_cv_lib_m_cos+:} false; then :
63505  $as_echo_n "(cached) " >&6
63506else
63507  ac_check_lib_save_LIBS=$LIBS
63508LIBS="-lm  $LIBS"
63509cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63510/* end confdefs.h.  */
63511
63512/* Override any GCC internal prototype to avoid an error.
63513   Use char because int might match the return type of a GCC
63514   builtin and then its argument prototype would still apply.  */
63515#ifdef __cplusplus
63516extern "C"
63517#endif
63518char cos ();
63519int
63520main ()
63521{
63522return cos ();
63523  ;
63524  return 0;
63525}
63526_ACEOF
63527if ac_fn_cxx_try_link "$LINENO"; then :
63528  ac_cv_lib_m_cos=yes
63529else
63530  ac_cv_lib_m_cos=no
63531fi
63532rm -f core conftest.err conftest.$ac_objext \
63533    conftest$ac_exeext conftest.$ac_ext
63534LIBS=$ac_check_lib_save_LIBS
63535fi
63536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
63537$as_echo "$ac_cv_lib_m_cos" >&6; }
63538if test "x$ac_cv_lib_m_cos" = xyes; then :
63539  cat >>confdefs.h <<_ACEOF
63540#define HAVE_LIBM 1
63541_ACEOF
63542
63543  LIBS="-lm $LIBS"
63544
63545else
63546
63547        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
63548$as_echo "$as_me: Maths library was not found" >&6;}
63549
63550fi
63551
63552    LIBM="-lm"
63553  else
63554    LIBM=""
63555  fi
63556
63557
63558  # Setup libdl (for dynamic library loading)
63559  save_LIBS="$LIBS"
63560  LIBS=""
63561  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
63562$as_echo_n "checking for dlopen in -ldl... " >&6; }
63563if ${ac_cv_lib_dl_dlopen+:} false; then :
63564  $as_echo_n "(cached) " >&6
63565else
63566  ac_check_lib_save_LIBS=$LIBS
63567LIBS="-ldl  $LIBS"
63568cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63569/* end confdefs.h.  */
63570
63571/* Override any GCC internal prototype to avoid an error.
63572   Use char because int might match the return type of a GCC
63573   builtin and then its argument prototype would still apply.  */
63574#ifdef __cplusplus
63575extern "C"
63576#endif
63577char dlopen ();
63578int
63579main ()
63580{
63581return dlopen ();
63582  ;
63583  return 0;
63584}
63585_ACEOF
63586if ac_fn_cxx_try_link "$LINENO"; then :
63587  ac_cv_lib_dl_dlopen=yes
63588else
63589  ac_cv_lib_dl_dlopen=no
63590fi
63591rm -f core conftest.err conftest.$ac_objext \
63592    conftest$ac_exeext conftest.$ac_ext
63593LIBS=$ac_check_lib_save_LIBS
63594fi
63595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
63596$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
63597if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
63598  cat >>confdefs.h <<_ACEOF
63599#define HAVE_LIBDL 1
63600_ACEOF
63601
63602  LIBS="-ldl $LIBS"
63603
63604fi
63605
63606  LIBDL="$LIBS"
63607
63608  LIBS="$save_LIBS"
63609
63610  # Deprecated libraries, keep the flags for backwards compatibility
63611  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
63612
63613
63614# Check whether --with-dxsdk was given.
63615if test "${with_dxsdk+set}" = set; then :
63616  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
63617$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
63618fi
63619
63620
63621
63622
63623# Check whether --with-dxsdk-lib was given.
63624if test "${with_dxsdk_lib+set}" = set; then :
63625  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
63626$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
63627fi
63628
63629
63630
63631
63632# Check whether --with-dxsdk-include was given.
63633if test "${with_dxsdk_include+set}" = set; then :
63634  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
63635$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
63636fi
63637
63638
63639  fi
63640
63641  # Control if libzip can use mmap. Available for purposes of overriding.
63642  LIBZIP_CAN_USE_MMAP=true
63643
63644
63645
63646  if test "$OPENJDK_TARGET_OS" = "solaris" && test "x$BUILD_GTEST" = "xtrue"; then
63647    # Find the root of the Solaris Studio installation from the compiler path
63648    SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
63649    STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
63650    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
63651$as_echo_n "checking for libstlport.so.1... " >&6; }
63652    if ! test -f "$STLPORT_LIB" && test "x$OPENJDK_TARGET_CPU_ISADIR" = "x/sparcv9"; then
63653      # SS12u3 has libstlport under 'stlport4/v9' instead of 'stlport4/sparcv9'
63654      STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4/v9/libstlport.so.1"
63655    fi
63656    if test -f "$STLPORT_LIB"; then
63657      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
63658$as_echo "yes, $STLPORT_LIB" >&6; }
63659
63660  # Only process if variable expands to non-empty
63661
63662  if test "x$STLPORT_LIB" != x; then
63663    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63664
63665  # Input might be given as Windows format, start by converting to
63666  # unix format.
63667  path="$STLPORT_LIB"
63668  new_path=`$CYGPATH -u "$path"`
63669
63670  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63671  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63672  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63673  # "foo.exe" is OK but "foo" is an error.
63674  #
63675  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63676  # It is also a way to make sure we got the proper file name for the real test later on.
63677  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63678  if test "x$test_shortpath" = x; then
63679    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
63680$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
63681    as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
63682  fi
63683
63684  # Call helper function which possibly converts this using DOS-style short mode.
63685  # If so, the updated path is stored in $new_path.
63686
63687  input_path="$new_path"
63688  # Check if we need to convert this using DOS-style short mode. If the path
63689  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63690  # take no chances and rewrite it.
63691  # Note: m4 eats our [], so we need to use [ and ] instead.
63692  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63693  if test "x$has_forbidden_chars" != x; then
63694    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63695    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63696    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63697    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63698      # Going to short mode and back again did indeed matter. Since short mode is
63699      # case insensitive, let's make it lowercase to improve readability.
63700      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63701      # Now convert it back to Unix-style (cygpath)
63702      input_path=`$CYGPATH -u "$shortmode_path"`
63703      new_path="$input_path"
63704    fi
63705  fi
63706
63707  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63708  if test "x$test_cygdrive_prefix" = x; then
63709    # As a simple fix, exclude /usr/bin since it's not a real path.
63710    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63711      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63712      # a path prefixed by /cygdrive for fixpath to work.
63713      new_path="$CYGWIN_ROOT_PATH$input_path"
63714    fi
63715  fi
63716
63717
63718  if test "x$path" != "x$new_path"; then
63719    STLPORT_LIB="$new_path"
63720    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
63721$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
63722  fi
63723
63724    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63725
63726  path="$STLPORT_LIB"
63727  has_colon=`$ECHO $path | $GREP ^.:`
63728  new_path="$path"
63729  if test "x$has_colon" = x; then
63730    # Not in mixed or Windows style, start by that.
63731    new_path=`cmd //c echo $path`
63732  fi
63733
63734
63735  input_path="$new_path"
63736  # Check if we need to convert this using DOS-style short mode. If the path
63737  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63738  # take no chances and rewrite it.
63739  # Note: m4 eats our [], so we need to use [ and ] instead.
63740  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63741  if test "x$has_forbidden_chars" != x; then
63742    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63743    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63744  fi
63745
63746
63747  windows_path="$new_path"
63748  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63749    unix_path=`$CYGPATH -u "$windows_path"`
63750    new_path="$unix_path"
63751  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63752    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63753    new_path="$unix_path"
63754  fi
63755
63756  if test "x$path" != "x$new_path"; then
63757    STLPORT_LIB="$new_path"
63758    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
63759$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
63760  fi
63761
63762  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63763  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63764
63765    else
63766      # We're on a unix platform. Hooray! :)
63767      path="$STLPORT_LIB"
63768      has_space=`$ECHO "$path" | $GREP " "`
63769      if test "x$has_space" != x; then
63770        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
63771$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
63772        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63773      fi
63774
63775      # Use eval to expand a potential ~
63776      eval path="$path"
63777      if test ! -f "$path" && test ! -d "$path"; then
63778        as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
63779      fi
63780
63781      if test -d "$path"; then
63782        STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
63783      else
63784        dir="`$DIRNAME "$path"`"
63785        base="`$BASENAME "$path"`"
63786        STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
63787      fi
63788    fi
63789  fi
63790
63791    else
63792      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
63793$as_echo "no, not found at $STLPORT_LIB" >&6; }
63794      as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
63795    fi
63796
63797  fi
63798
63799
63800
63801
63802
63803
63804
63805
63806
63807
63808
63809
63810
63811
63812###############################################################################
63813#
63814# We need to do some final tweaking, when everything else is done.
63815#
63816###############################################################################
63817
63818
63819  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
63820$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
63821
63822  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
63823    ENABLE_INTREE_EC=yes
63824    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63825$as_echo "yes" >&6; }
63826  else
63827    ENABLE_INTREE_EC=no
63828    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63829$as_echo "no" >&6; }
63830  fi
63831
63832
63833
63834
63835  # Check whether --enable-jtreg-failure-handler was given.
63836if test "${enable_jtreg_failure_handler+set}" = set; then :
63837  enableval=$enable_jtreg_failure_handler;
63838fi
63839
63840
63841  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
63842$as_echo_n "checking if jtreg failure handler should be built... " >&6; }
63843
63844  if test "x$enable_jtreg_failure_handler" = "xyes"; then
63845    if test "x$JT_HOME" = "x"; then
63846      as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
63847    else
63848      BUILD_FAILURE_HANDLER=true
63849      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
63850$as_echo "yes, forced" >&6; }
63851    fi
63852  elif test "x$enable_jtreg_failure_handler" = "xno"; then
63853    BUILD_FAILURE_HANDLER=false
63854    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
63855$as_echo "no, forced" >&6; }
63856  elif test "x$enable_jtreg_failure_handler" = "xauto" \
63857      || test "x$enable_jtreg_failure_handler" = "x"; then
63858    if test "x$JT_HOME" = "x"; then
63859      BUILD_FAILURE_HANDLER=false
63860      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
63861$as_echo "no, missing jtreg" >&6; }
63862    else
63863      BUILD_FAILURE_HANDLER=true
63864      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
63865$as_echo "yes, jtreg present" >&6; }
63866    fi
63867  else
63868    as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
63869  fi
63870
63871
63872
63873
63874  # Check whether --enable-generate-classlist was given.
63875if test "${enable_generate_classlist+set}" = set; then :
63876  enableval=$enable_generate_classlist;
63877fi
63878
63879
63880  # Check if it's likely that it's possible to generate the classlist. Depending
63881  # on exact jvm configuration it could be possible anyway.
63882  if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
63883    ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
63884  else
63885    ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
63886  fi
63887
63888  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the CDS classlist generation should be enabled" >&5
63889$as_echo_n "checking if the CDS classlist generation should be enabled... " >&6; }
63890  if test "x$enable_generate_classlist" = "xyes"; then
63891    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
63892$as_echo "yes, forced" >&6; }
63893    ENABLE_GENERATE_CLASSLIST="true"
63894    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
63895      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&5
63896$as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&2;}
63897    fi
63898  elif test "x$enable_generate_classlist" = "xno"; then
63899    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
63900$as_echo "no, forced" >&6; }
63901    ENABLE_GENERATE_CLASSLIST="false"
63902  elif test "x$enable_generate_classlist" = "x"; then
63903    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
63904      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63905$as_echo "yes" >&6; }
63906      ENABLE_GENERATE_CLASSLIST="true"
63907    else
63908      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63909$as_echo "no" >&6; }
63910      ENABLE_GENERATE_CLASSLIST="false"
63911    fi
63912  else
63913    as_fn_error $? "Invalid value for --enable-generate-classlist: $enable_generate_classlist" "$LINENO" 5
63914  fi
63915
63916
63917
63918
63919###############################################################################
63920#
63921# Configure parts of the build that only affect the build performance,
63922# not the result.
63923#
63924###############################################################################
63925
63926
63927  # How many cores do we have on this build system?
63928
63929# Check whether --with-num-cores was given.
63930if test "${with_num_cores+set}" = set; then :
63931  withval=$with_num_cores;
63932fi
63933
63934  if test "x$with_num_cores" = x; then
63935    # The number of cores were not specified, try to probe them.
63936
63937  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
63938$as_echo_n "checking for number of cores... " >&6; }
63939  NUM_CORES=1
63940  FOUND_CORES=no
63941
63942  if test -f /proc/cpuinfo; then
63943    # Looks like a Linux (or cygwin) system
63944    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
63945    FOUND_CORES=yes
63946  elif test -x /usr/sbin/psrinfo; then
63947    # Looks like a Solaris system
63948    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
63949    FOUND_CORES=yes
63950  elif test -x /usr/sbin/sysctl; then
63951    # Looks like a MacOSX system
63952    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
63953    FOUND_CORES=yes
63954  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
63955    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
63956    FOUND_CORES=yes
63957  elif test -n "$NUMBER_OF_PROCESSORS"; then
63958    # On windows, look in the env
63959    NUM_CORES=$NUMBER_OF_PROCESSORS
63960    FOUND_CORES=yes
63961  fi
63962
63963  if test "x$FOUND_CORES" = xyes; then
63964    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
63965$as_echo "$NUM_CORES" >&6; }
63966  else
63967    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
63968$as_echo "could not detect number of cores, defaulting to 1" >&6; }
63969    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
63970$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
63971  fi
63972
63973  else
63974    NUM_CORES=$with_num_cores
63975  fi
63976
63977
63978
63979  # How much memory do we have on this build system?
63980
63981# Check whether --with-memory-size was given.
63982if test "${with_memory_size+set}" = set; then :
63983  withval=$with_memory_size;
63984fi
63985
63986  if test "x$with_memory_size" = x; then
63987    # The memory size was not specified, try to probe it.
63988
63989  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
63990$as_echo_n "checking for memory size... " >&6; }
63991  # Default to 1024 MB
63992  MEMORY_SIZE=1024
63993  FOUND_MEM=no
63994
63995  if test -f /proc/meminfo; then
63996    # Looks like a Linux (or cygwin) system
63997    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
63998    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
63999    FOUND_MEM=yes
64000  elif test -x /usr/sbin/prtconf; then
64001    # Looks like a Solaris or AIX system
64002    MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
64003    FOUND_MEM=yes
64004  elif test -x /usr/sbin/sysctl; then
64005    # Looks like a MacOSX system
64006    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
64007    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64008    FOUND_MEM=yes
64009  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
64010    # Windows, but without cygwin
64011    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
64012    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64013    FOUND_MEM=yes
64014  fi
64015
64016  if test "x$FOUND_MEM" = xyes; then
64017    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
64018$as_echo "$MEMORY_SIZE MB" >&6; }
64019  else
64020    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
64021$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
64022    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
64023$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
64024  fi
64025
64026  else
64027    MEMORY_SIZE=$with_memory_size
64028  fi
64029
64030
64031
64032  # Provide a decent default number of parallel jobs for make depending on
64033  # number of cores, amount of memory and machine architecture.
64034
64035# Check whether --with-jobs was given.
64036if test "${with_jobs+set}" = set; then :
64037  withval=$with_jobs;
64038fi
64039
64040  if test "x$with_jobs" = x; then
64041    # Number of jobs was not specified, calculate.
64042    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
64043$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
64044    # Approximate memory in GB.
64045    memory_gb=`expr $MEMORY_SIZE / 1024`
64046    # Pick the lowest of memory in gb and number of cores.
64047    if test "$memory_gb" -lt "$NUM_CORES"; then
64048      JOBS="$memory_gb"
64049    else
64050      JOBS="$NUM_CORES"
64051    fi
64052    if test "$JOBS" -eq "0"; then
64053      JOBS=1
64054    fi
64055    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
64056$as_echo "$JOBS" >&6; }
64057  else
64058    JOBS=$with_jobs
64059  fi
64060
64061
64062
64063  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
64064
64065# Check whether --with-test-jobs was given.
64066if test "${with_test_jobs+set}" = set; then :
64067  withval=$with_test_jobs;
64068fi
64069
64070  if test "x$with_test_jobs" = x; then
64071      TEST_JOBS=0
64072  else
64073      TEST_JOBS=$with_test_jobs
64074  fi
64075
64076
64077
64078# Setup arguments for the boot jdk (after cores and memory have been setup)
64079
64080  ##############################################################################
64081  #
64082  # Specify jvm options for anything that is run with the Boot JDK.
64083  # Not all JVM:s accept the same arguments on the command line.
64084  #
64085
64086# Check whether --with-boot-jdk-jvmargs was given.
64087if test "${with_boot_jdk_jvmargs+set}" = set; then :
64088  withval=$with_boot_jdk_jvmargs;
64089fi
64090
64091
64092  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
64093$as_echo_n "checking flags for boot jdk java command ... " >&6; }
64094
64095  # Disable special log output when a debug build is used as Boot JDK...
64096
64097  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
64098  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
64099  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
64100  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64101  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64102  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64103    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
64104    JVM_ARG_OK=true
64105  else
64106    $ECHO "Arg failed:" >&5
64107    $ECHO "$OUTPUT" >&5
64108    JVM_ARG_OK=false
64109  fi
64110
64111
64112  # Force en-US environment
64113
64114  $ECHO "Check if jvm arg is ok: -Duser.language=en -Duser.country=US" >&5
64115  $ECHO "Command: $JAVA -Duser.language=en -Duser.country=US -version" >&5
64116  OUTPUT=`$JAVA -Duser.language=en -Duser.country=US -version 2>&1`
64117  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64118  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64119  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64120    boot_jdk_jvmargs="$boot_jdk_jvmargs -Duser.language=en -Duser.country=US"
64121    JVM_ARG_OK=true
64122  else
64123    $ECHO "Arg failed:" >&5
64124    $ECHO "$OUTPUT" >&5
64125    JVM_ARG_OK=false
64126  fi
64127
64128
64129  # Apply user provided options.
64130
64131  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
64132  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
64133  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
64134  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64135  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64136  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64137    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
64138    JVM_ARG_OK=true
64139  else
64140    $ECHO "Arg failed:" >&5
64141    $ECHO "$OUTPUT" >&5
64142    JVM_ARG_OK=false
64143  fi
64144
64145
64146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
64147$as_echo "$boot_jdk_jvmargs" >&6; }
64148
64149  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
64150  JAVA_FLAGS=$boot_jdk_jvmargs
64151
64152
64153
64154  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
64155$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
64156
64157  # Starting amount of heap memory.
64158
64159  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
64160  $ECHO "Command: $JAVA -Xms64M -version" >&5
64161  OUTPUT=`$JAVA -Xms64M -version 2>&1`
64162  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64163  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64164  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64165    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
64166    JVM_ARG_OK=true
64167  else
64168    $ECHO "Arg failed:" >&5
64169    $ECHO "$OUTPUT" >&5
64170    JVM_ARG_OK=false
64171  fi
64172
64173  BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
64174
64175  # Maximum amount of heap memory and stack size.
64176  JVM_HEAP_LIMIT_32="1024"
64177  # Running a 64 bit JVM allows for and requires a bigger heap
64178  JVM_HEAP_LIMIT_64="1600"
64179  STACK_SIZE_32=768
64180  STACK_SIZE_64=1536
64181  JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
64182  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
64183    JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
64184  fi
64185  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_64"; then
64186    JVM_HEAP_LIMIT_64=$JVM_HEAP_LIMIT_GLOBAL
64187  fi
64188  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "512"; then
64189    JVM_HEAP_LIMIT_32=512
64190    JVM_HEAP_LIMIT_64=512
64191  fi
64192
64193  if test "x$BOOT_JDK_BITS" = "x32"; then
64194    STACK_SIZE=$STACK_SIZE_32
64195    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_32
64196  else
64197    STACK_SIZE=$STACK_SIZE_64
64198    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
64199  fi
64200
64201  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
64202  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
64203  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
64204  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64205  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64206  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64207    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
64208    JVM_ARG_OK=true
64209  else
64210    $ECHO "Arg failed:" >&5
64211    $ECHO "$OUTPUT" >&5
64212    JVM_ARG_OK=false
64213  fi
64214
64215
64216  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
64217  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
64218  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
64219  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64220  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64221  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64222    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
64223    JVM_ARG_OK=true
64224  else
64225    $ECHO "Arg failed:" >&5
64226    $ECHO "$OUTPUT" >&5
64227    JVM_ARG_OK=false
64228  fi
64229
64230
64231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
64232$as_echo "$boot_jdk_jvmargs_big" >&6; }
64233
64234  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
64235
64236
64237  if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
64238    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_32
64239    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_32
64240  else
64241    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_64
64242    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_64
64243  fi
64244  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -Xmx${BOOTCYCLE_MAX_HEAP}M"
64245  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -XX:ThreadStackSize=$BOOTCYCLE_STACK_SIZE"
64246  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for bootcycle boot jdk java command for big workloads" >&5
64247$as_echo_n "checking flags for bootcycle boot jdk java command for big workloads... " >&6; }
64248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOTCYCLE_JVM_ARGS_BIG" >&5
64249$as_echo "$BOOTCYCLE_JVM_ARGS_BIG" >&6; }
64250
64251
64252  # By default, the main javac compilations use big
64253  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
64254
64255
64256  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
64257$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
64258
64259  # Use serial gc for small short lived tools if possible
64260
64261  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
64262  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
64263  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
64264  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64265  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64266  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64267    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
64268    JVM_ARG_OK=true
64269  else
64270    $ECHO "Arg failed:" >&5
64271    $ECHO "$OUTPUT" >&5
64272    JVM_ARG_OK=false
64273  fi
64274
64275
64276  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
64277  $ECHO "Command: $JAVA -Xms32M -version" >&5
64278  OUTPUT=`$JAVA -Xms32M -version 2>&1`
64279  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64280  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64281  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64282    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
64283    JVM_ARG_OK=true
64284  else
64285    $ECHO "Arg failed:" >&5
64286    $ECHO "$OUTPUT" >&5
64287    JVM_ARG_OK=false
64288  fi
64289
64290
64291  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
64292  $ECHO "Command: $JAVA -Xmx512M -version" >&5
64293  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
64294  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64295  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64296  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64297    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
64298    JVM_ARG_OK=true
64299  else
64300    $ECHO "Arg failed:" >&5
64301    $ECHO "$OUTPUT" >&5
64302    JVM_ARG_OK=false
64303  fi
64304
64305
64306  $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
64307  $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
64308  OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
64309  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64310  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64311  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64312    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
64313    JVM_ARG_OK=true
64314  else
64315    $ECHO "Arg failed:" >&5
64316    $ECHO "$OUTPUT" >&5
64317    JVM_ARG_OK=false
64318  fi
64319
64320
64321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
64322$as_echo "$boot_jdk_jvmargs_small" >&6; }
64323
64324  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
64325
64326
64327  JAVA_TOOL_FLAGS_SMALL=""
64328  for f in $JAVA_FLAGS_SMALL; do
64329    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
64330  done
64331
64332
64333
64334# Setup smart javac (after cores and memory have been setup)
64335
64336
64337# Check whether --with-sjavac-server-java was given.
64338if test "${with_sjavac_server_java+set}" = set; then :
64339  withval=$with_sjavac_server_java;
64340fi
64341
64342
64343  if test "x$with_sjavac_server_java" != x; then
64344    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
64345    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
64346    if test "x$FOUND_VERSION" = x; then
64347      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
64348    fi
64349  else
64350    SJAVAC_SERVER_JAVA="$JAVA"
64351  fi
64352
64353
64354  if test "$MEMORY_SIZE" -gt "3000"; then
64355
64356  $ECHO "Check if jvm arg is ok: -d64" >&5
64357  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
64358  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
64359  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64360  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64361  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64362    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
64363    JVM_ARG_OK=true
64364  else
64365    $ECHO "Arg failed:" >&5
64366    $ECHO "$OUTPUT" >&5
64367    JVM_ARG_OK=false
64368  fi
64369
64370    if test "$JVM_ARG_OK" = true; then
64371      JVM_64BIT=true
64372      JVM_ARG_OK=false
64373    fi
64374  fi
64375
64376  MX_VALUE=`expr $MEMORY_SIZE / 2`
64377  if test "$JVM_64BIT" = true; then
64378    # Set ms lower than mx since more than one instance of the server might
64379    # get launched at the same time before they figure out which instance won.
64380    MS_VALUE=512
64381    if test "$MX_VALUE" -gt "2048"; then
64382      MX_VALUE=2048
64383    fi
64384  else
64385    MS_VALUE=256
64386    if test "$MX_VALUE" -gt "1500"; then
64387      MX_VALUE=1500
64388    fi
64389  fi
64390  if test "$MX_VALUE" -lt "512"; then
64391    MX_VALUE=512
64392  fi
64393
64394  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
64395  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
64396  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
64397  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64398  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64399  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64400    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
64401    JVM_ARG_OK=true
64402  else
64403    $ECHO "Arg failed:" >&5
64404    $ECHO "$OUTPUT" >&5
64405    JVM_ARG_OK=false
64406  fi
64407
64408
64409
64410  # Check whether --enable-sjavac was given.
64411if test "${enable_sjavac+set}" = set; then :
64412  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
64413else
64414  ENABLE_SJAVAC="no"
64415fi
64416
64417  if test "x$JVM_ARG_OK" = "xfalse"; then
64418    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
64419$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
64420    ENABLE_SJAVAC="no"
64421  fi
64422  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
64423$as_echo_n "checking whether to use sjavac... " >&6; }
64424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
64425$as_echo "$ENABLE_SJAVAC" >&6; }
64426
64427
64428  # Check whether --enable-javac-server was given.
64429if test "${enable_javac_server+set}" = set; then :
64430  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
64431else
64432  ENABLE_JAVAC_SERVER="yes"
64433fi
64434
64435  if test "x$JVM_ARG_OK" = "xfalse"; then
64436    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
64437$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
64438    ENABLE_JAVAC_SERVER="no"
64439  fi
64440  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
64441$as_echo_n "checking whether to use javac server... " >&6; }
64442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
64443$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
64444
64445
64446  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
64447    # When using a server javac, the small client instances do not need much
64448    # resources.
64449    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
64450  fi
64451
64452
64453# Setup use of icecc if requested
64454
64455  # Check whether --enable-icecc was given.
64456if test "${enable_icecc+set}" = set; then :
64457  enableval=$enable_icecc;
64458fi
64459
64460
64461  if test "x${enable_icecc}" = "xyes"; then
64462
64463
64464
64465  # Publish this variable in the help.
64466
64467
64468  if [ -z "${ICECC_CMD+x}" ]; then
64469    # The variable is not set by user, try to locate tool using the code snippet
64470    for ac_prog in icecc
64471do
64472  # Extract the first word of "$ac_prog", so it can be a program name with args.
64473set dummy $ac_prog; ac_word=$2
64474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64475$as_echo_n "checking for $ac_word... " >&6; }
64476if ${ac_cv_path_ICECC_CMD+:} false; then :
64477  $as_echo_n "(cached) " >&6
64478else
64479  case $ICECC_CMD in
64480  [\\/]* | ?:[\\/]*)
64481  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64482  ;;
64483  *)
64484  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64485for as_dir in $PATH
64486do
64487  IFS=$as_save_IFS
64488  test -z "$as_dir" && as_dir=.
64489    for ac_exec_ext in '' $ac_executable_extensions; do
64490  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64491    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64492    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64493    break 2
64494  fi
64495done
64496  done
64497IFS=$as_save_IFS
64498
64499  ;;
64500esac
64501fi
64502ICECC_CMD=$ac_cv_path_ICECC_CMD
64503if test -n "$ICECC_CMD"; then
64504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64505$as_echo "$ICECC_CMD" >&6; }
64506else
64507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64508$as_echo "no" >&6; }
64509fi
64510
64511
64512  test -n "$ICECC_CMD" && break
64513done
64514
64515  else
64516    # The variable is set, but is it from the command line or the environment?
64517
64518    # Try to remove the string !ICECC_CMD! from our list.
64519    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
64520    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64521      # If it failed, the variable was not from the command line. Ignore it,
64522      # but warn the user (except for BASH, which is always set by the calling BASH).
64523      if test "xICECC_CMD" != xBASH; then
64524        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
64525$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
64526      fi
64527      # Try to locate tool using the code snippet
64528      for ac_prog in icecc
64529do
64530  # Extract the first word of "$ac_prog", so it can be a program name with args.
64531set dummy $ac_prog; ac_word=$2
64532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64533$as_echo_n "checking for $ac_word... " >&6; }
64534if ${ac_cv_path_ICECC_CMD+:} false; then :
64535  $as_echo_n "(cached) " >&6
64536else
64537  case $ICECC_CMD in
64538  [\\/]* | ?:[\\/]*)
64539  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64540  ;;
64541  *)
64542  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64543for as_dir in $PATH
64544do
64545  IFS=$as_save_IFS
64546  test -z "$as_dir" && as_dir=.
64547    for ac_exec_ext in '' $ac_executable_extensions; do
64548  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64549    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64550    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64551    break 2
64552  fi
64553done
64554  done
64555IFS=$as_save_IFS
64556
64557  ;;
64558esac
64559fi
64560ICECC_CMD=$ac_cv_path_ICECC_CMD
64561if test -n "$ICECC_CMD"; then
64562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64563$as_echo "$ICECC_CMD" >&6; }
64564else
64565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64566$as_echo "no" >&6; }
64567fi
64568
64569
64570  test -n "$ICECC_CMD" && break
64571done
64572
64573    else
64574      # If it succeeded, then it was overridden by the user. We will use it
64575      # for the tool.
64576
64577      # First remove it from the list of overridden variables, so we can test
64578      # for unknown variables in the end.
64579      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64580
64581      # Check if we try to supply an empty value
64582      if test "x$ICECC_CMD" = x; then
64583        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
64584$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
64585        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
64586$as_echo_n "checking for ICECC_CMD... " >&6; }
64587        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64588$as_echo "disabled" >&6; }
64589      else
64590        # Check if the provided tool contains a complete path.
64591        tool_specified="$ICECC_CMD"
64592        tool_basename="${tool_specified##*/}"
64593        if test "x$tool_basename" = "x$tool_specified"; then
64594          # A command without a complete path is provided, search $PATH.
64595          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
64596$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
64597          # Extract the first word of "$tool_basename", so it can be a program name with args.
64598set dummy $tool_basename; ac_word=$2
64599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64600$as_echo_n "checking for $ac_word... " >&6; }
64601if ${ac_cv_path_ICECC_CMD+:} false; then :
64602  $as_echo_n "(cached) " >&6
64603else
64604  case $ICECC_CMD in
64605  [\\/]* | ?:[\\/]*)
64606  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64607  ;;
64608  *)
64609  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64610for as_dir in $PATH
64611do
64612  IFS=$as_save_IFS
64613  test -z "$as_dir" && as_dir=.
64614    for ac_exec_ext in '' $ac_executable_extensions; do
64615  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64616    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64617    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64618    break 2
64619  fi
64620done
64621  done
64622IFS=$as_save_IFS
64623
64624  ;;
64625esac
64626fi
64627ICECC_CMD=$ac_cv_path_ICECC_CMD
64628if test -n "$ICECC_CMD"; then
64629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64630$as_echo "$ICECC_CMD" >&6; }
64631else
64632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64633$as_echo "no" >&6; }
64634fi
64635
64636
64637          if test "x$ICECC_CMD" = x; then
64638            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
64639          fi
64640        else
64641          # Otherwise we believe it is a complete path. Use it as it is.
64642          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
64643$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
64644          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
64645$as_echo_n "checking for ICECC_CMD... " >&6; }
64646          if test ! -x "$tool_specified"; then
64647            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
64648$as_echo "not found" >&6; }
64649            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
64650          fi
64651          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
64652$as_echo "$tool_specified" >&6; }
64653        fi
64654      fi
64655    fi
64656
64657  fi
64658
64659
64660
64661  if test "x$ICECC_CMD" = x; then
64662    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
64663  fi
64664
64665
64666    old_path="$PATH"
64667
64668    # Look for icecc-create-env in some known places
64669    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
64670
64671
64672
64673  # Publish this variable in the help.
64674
64675
64676  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
64677    # The variable is not set by user, try to locate tool using the code snippet
64678    for ac_prog in icecc-create-env
64679do
64680  # Extract the first word of "$ac_prog", so it can be a program name with args.
64681set dummy $ac_prog; ac_word=$2
64682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64683$as_echo_n "checking for $ac_word... " >&6; }
64684if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64685  $as_echo_n "(cached) " >&6
64686else
64687  case $ICECC_CREATE_ENV in
64688  [\\/]* | ?:[\\/]*)
64689  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64690  ;;
64691  *)
64692  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64693for as_dir in $PATH
64694do
64695  IFS=$as_save_IFS
64696  test -z "$as_dir" && as_dir=.
64697    for ac_exec_ext in '' $ac_executable_extensions; do
64698  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64699    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64700    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64701    break 2
64702  fi
64703done
64704  done
64705IFS=$as_save_IFS
64706
64707  ;;
64708esac
64709fi
64710ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64711if test -n "$ICECC_CREATE_ENV"; then
64712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64713$as_echo "$ICECC_CREATE_ENV" >&6; }
64714else
64715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64716$as_echo "no" >&6; }
64717fi
64718
64719
64720  test -n "$ICECC_CREATE_ENV" && break
64721done
64722
64723  else
64724    # The variable is set, but is it from the command line or the environment?
64725
64726    # Try to remove the string !ICECC_CREATE_ENV! from our list.
64727    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
64728    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64729      # If it failed, the variable was not from the command line. Ignore it,
64730      # but warn the user (except for BASH, which is always set by the calling BASH).
64731      if test "xICECC_CREATE_ENV" != xBASH; then
64732        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
64733$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
64734      fi
64735      # Try to locate tool using the code snippet
64736      for ac_prog in icecc-create-env
64737do
64738  # Extract the first word of "$ac_prog", so it can be a program name with args.
64739set dummy $ac_prog; ac_word=$2
64740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64741$as_echo_n "checking for $ac_word... " >&6; }
64742if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64743  $as_echo_n "(cached) " >&6
64744else
64745  case $ICECC_CREATE_ENV in
64746  [\\/]* | ?:[\\/]*)
64747  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64748  ;;
64749  *)
64750  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64751for as_dir in $PATH
64752do
64753  IFS=$as_save_IFS
64754  test -z "$as_dir" && as_dir=.
64755    for ac_exec_ext in '' $ac_executable_extensions; do
64756  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64757    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64758    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64759    break 2
64760  fi
64761done
64762  done
64763IFS=$as_save_IFS
64764
64765  ;;
64766esac
64767fi
64768ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64769if test -n "$ICECC_CREATE_ENV"; then
64770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64771$as_echo "$ICECC_CREATE_ENV" >&6; }
64772else
64773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64774$as_echo "no" >&6; }
64775fi
64776
64777
64778  test -n "$ICECC_CREATE_ENV" && break
64779done
64780
64781    else
64782      # If it succeeded, then it was overridden by the user. We will use it
64783      # for the tool.
64784
64785      # First remove it from the list of overridden variables, so we can test
64786      # for unknown variables in the end.
64787      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64788
64789      # Check if we try to supply an empty value
64790      if test "x$ICECC_CREATE_ENV" = x; then
64791        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
64792$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
64793        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
64794$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
64795        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64796$as_echo "disabled" >&6; }
64797      else
64798        # Check if the provided tool contains a complete path.
64799        tool_specified="$ICECC_CREATE_ENV"
64800        tool_basename="${tool_specified##*/}"
64801        if test "x$tool_basename" = "x$tool_specified"; then
64802          # A command without a complete path is provided, search $PATH.
64803          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
64804$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
64805          # Extract the first word of "$tool_basename", so it can be a program name with args.
64806set dummy $tool_basename; ac_word=$2
64807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64808$as_echo_n "checking for $ac_word... " >&6; }
64809if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64810  $as_echo_n "(cached) " >&6
64811else
64812  case $ICECC_CREATE_ENV in
64813  [\\/]* | ?:[\\/]*)
64814  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64815  ;;
64816  *)
64817  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64818for as_dir in $PATH
64819do
64820  IFS=$as_save_IFS
64821  test -z "$as_dir" && as_dir=.
64822    for ac_exec_ext in '' $ac_executable_extensions; do
64823  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64824    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64825    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64826    break 2
64827  fi
64828done
64829  done
64830IFS=$as_save_IFS
64831
64832  ;;
64833esac
64834fi
64835ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64836if test -n "$ICECC_CREATE_ENV"; then
64837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64838$as_echo "$ICECC_CREATE_ENV" >&6; }
64839else
64840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64841$as_echo "no" >&6; }
64842fi
64843
64844
64845          if test "x$ICECC_CREATE_ENV" = x; then
64846            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
64847          fi
64848        else
64849          # Otherwise we believe it is a complete path. Use it as it is.
64850          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
64851$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
64852          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
64853$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
64854          if test ! -x "$tool_specified"; then
64855            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
64856$as_echo "not found" >&6; }
64857            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
64858          fi
64859          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
64860$as_echo "$tool_specified" >&6; }
64861        fi
64862      fi
64863    fi
64864
64865  fi
64866
64867
64868
64869  if test "x$ICECC_CREATE_ENV" = x; then
64870    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
64871  fi
64872
64873
64874    # Use icecc-create-env to create a minimal compilation environment that can
64875    # be sent to the other hosts in the icecream cluster.
64876    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
64877    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
64878    # Older versions of icecc does not have the --gcc parameter
64879    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
64880      icecc_gcc_arg="--gcc"
64881    fi
64882    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
64883
64884  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
64885      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
64886          ${icecc_create_env_log} 2>&1 )
64887  if test "$?" != "0"; then
64888    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
64889$as_echo "$as_me: icecc-create-env output:" >&6;}
64890    cat \
64891          ${icecc_create_env_log}
64892    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
64893  fi
64894
64895    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
64896      # For clang, the icecc compilerwrapper is needed. It usually resides next
64897      # to icecc-create-env.
64898
64899
64900
64901  # Publish this variable in the help.
64902
64903
64904  if [ -z "${ICECC_WRAPPER+x}" ]; then
64905    # The variable is not set by user, try to locate tool using the code snippet
64906    for ac_prog in compilerwrapper
64907do
64908  # Extract the first word of "$ac_prog", so it can be a program name with args.
64909set dummy $ac_prog; ac_word=$2
64910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64911$as_echo_n "checking for $ac_word... " >&6; }
64912if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
64913  $as_echo_n "(cached) " >&6
64914else
64915  case $ICECC_WRAPPER in
64916  [\\/]* | ?:[\\/]*)
64917  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
64918  ;;
64919  *)
64920  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64921for as_dir in $PATH
64922do
64923  IFS=$as_save_IFS
64924  test -z "$as_dir" && as_dir=.
64925    for ac_exec_ext in '' $ac_executable_extensions; do
64926  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64927    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
64928    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64929    break 2
64930  fi
64931done
64932  done
64933IFS=$as_save_IFS
64934
64935  ;;
64936esac
64937fi
64938ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
64939if test -n "$ICECC_WRAPPER"; then
64940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
64941$as_echo "$ICECC_WRAPPER" >&6; }
64942else
64943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64944$as_echo "no" >&6; }
64945fi
64946
64947
64948  test -n "$ICECC_WRAPPER" && break
64949done
64950
64951  else
64952    # The variable is set, but is it from the command line or the environment?
64953
64954    # Try to remove the string !ICECC_WRAPPER! from our list.
64955    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
64956    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64957      # If it failed, the variable was not from the command line. Ignore it,
64958      # but warn the user (except for BASH, which is always set by the calling BASH).
64959      if test "xICECC_WRAPPER" != xBASH; then
64960        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
64961$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
64962      fi
64963      # Try to locate tool using the code snippet
64964      for ac_prog in compilerwrapper
64965do
64966  # Extract the first word of "$ac_prog", so it can be a program name with args.
64967set dummy $ac_prog; ac_word=$2
64968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64969$as_echo_n "checking for $ac_word... " >&6; }
64970if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
64971  $as_echo_n "(cached) " >&6
64972else
64973  case $ICECC_WRAPPER in
64974  [\\/]* | ?:[\\/]*)
64975  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
64976  ;;
64977  *)
64978  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64979for as_dir in $PATH
64980do
64981  IFS=$as_save_IFS
64982  test -z "$as_dir" && as_dir=.
64983    for ac_exec_ext in '' $ac_executable_extensions; do
64984  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64985    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
64986    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64987    break 2
64988  fi
64989done
64990  done
64991IFS=$as_save_IFS
64992
64993  ;;
64994esac
64995fi
64996ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
64997if test -n "$ICECC_WRAPPER"; then
64998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
64999$as_echo "$ICECC_WRAPPER" >&6; }
65000else
65001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65002$as_echo "no" >&6; }
65003fi
65004
65005
65006  test -n "$ICECC_WRAPPER" && break
65007done
65008
65009    else
65010      # If it succeeded, then it was overridden by the user. We will use it
65011      # for the tool.
65012
65013      # First remove it from the list of overridden variables, so we can test
65014      # for unknown variables in the end.
65015      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65016
65017      # Check if we try to supply an empty value
65018      if test "x$ICECC_WRAPPER" = x; then
65019        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
65020$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
65021        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65022$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65023        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65024$as_echo "disabled" >&6; }
65025      else
65026        # Check if the provided tool contains a complete path.
65027        tool_specified="$ICECC_WRAPPER"
65028        tool_basename="${tool_specified##*/}"
65029        if test "x$tool_basename" = "x$tool_specified"; then
65030          # A command without a complete path is provided, search $PATH.
65031          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
65032$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
65033          # Extract the first word of "$tool_basename", so it can be a program name with args.
65034set dummy $tool_basename; ac_word=$2
65035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65036$as_echo_n "checking for $ac_word... " >&6; }
65037if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65038  $as_echo_n "(cached) " >&6
65039else
65040  case $ICECC_WRAPPER in
65041  [\\/]* | ?:[\\/]*)
65042  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65043  ;;
65044  *)
65045  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65046for as_dir in $PATH
65047do
65048  IFS=$as_save_IFS
65049  test -z "$as_dir" && as_dir=.
65050    for ac_exec_ext in '' $ac_executable_extensions; do
65051  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65052    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65053    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65054    break 2
65055  fi
65056done
65057  done
65058IFS=$as_save_IFS
65059
65060  ;;
65061esac
65062fi
65063ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65064if test -n "$ICECC_WRAPPER"; then
65065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65066$as_echo "$ICECC_WRAPPER" >&6; }
65067else
65068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65069$as_echo "no" >&6; }
65070fi
65071
65072
65073          if test "x$ICECC_WRAPPER" = x; then
65074            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65075          fi
65076        else
65077          # Otherwise we believe it is a complete path. Use it as it is.
65078          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
65079$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
65080          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65081$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65082          if test ! -x "$tool_specified"; then
65083            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65084$as_echo "not found" >&6; }
65085            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
65086          fi
65087          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65088$as_echo "$tool_specified" >&6; }
65089        fi
65090      fi
65091    fi
65092
65093  fi
65094
65095
65096
65097  if test "x$ICECC_WRAPPER" = x; then
65098    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
65099  fi
65100
65101
65102
65103  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65104      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
65105  if test "$?" != "0"; then
65106    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65107$as_echo "$as_me: icecc-create-env output:" >&6;}
65108    cat ${icecc_create_env_log}
65109    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65110  fi
65111
65112    else
65113      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
65114    fi
65115    PATH="$old_path"
65116    # The bundle with the compiler gets a name based on checksums. Parse log file
65117    # to find it.
65118    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
65119    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65120    if test ! -f ${ICECC_ENV_BUNDLE}; then
65121      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65122    fi
65123    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
65124$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
65125    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65126$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65127    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
65128
65129    if test "x${COMPILE_TYPE}" = "xcross"; then
65130      # If cross compiling, create a separate env package for the build compiler
65131      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
65132      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
65133      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
65134
65135  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65136      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
65137            ${icecc_create_env_log_build} 2>&1 )
65138  if test "$?" != "0"; then
65139    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65140$as_echo "$as_me: icecc-create-env output:" >&6;}
65141    cat \
65142            ${icecc_create_env_log_build}
65143    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65144  fi
65145
65146      elif test "x${BUILD_CC##*/}" = "xclang"; then
65147
65148  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65149      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
65150  if test "$?" != "0"; then
65151    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65152$as_echo "$as_me: icecc-create-env output:" >&6;}
65153    cat ${icecc_create_env_log_build}
65154    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65155  fi
65156
65157      else
65158        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
65159      fi
65160      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
65161      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65162      if test ! -f ${ICECC_ENV_BUNDLE}; then
65163        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65164      fi
65165      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
65166$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
65167      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65168$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65169      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
65170          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
65171    else
65172      BUILD_ICECC="${ICECC}"
65173    fi
65174
65175
65176  fi
65177
65178
65179# Can the C/C++ compiler use precompiled headers?
65180
65181
65182  ###############################################################################
65183  #
65184  # Can the C/C++ compiler use precompiled headers?
65185  #
65186  # Check whether --enable-precompiled-headers was given.
65187if test "${enable_precompiled_headers+set}" = set; then :
65188  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
65189else
65190  ENABLE_PRECOMPH=yes
65191fi
65192
65193
65194  USE_PRECOMPILED_HEADER=1
65195  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
65196$as_echo_n "checking If precompiled header is enabled... " >&6; }
65197  if test "x$ENABLE_PRECOMPH" = xno; then
65198    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65199$as_echo "no, forced" >&6; }
65200    USE_PRECOMPILED_HEADER=0
65201  elif test "x$ICECC" != "x"; then
65202    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
65203$as_echo "no, does not work effectively with icecc" >&6; }
65204    USE_PRECOMPILED_HEADER=0
65205  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
65206    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
65207$as_echo "no, does not work with Solaris Studio" >&6; }
65208    USE_PRECOMPILED_HEADER=0
65209  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
65210    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with xlc" >&5
65211$as_echo "no, does not work with xlc" >&6; }
65212    USE_PRECOMPILED_HEADER=0
65213  else
65214    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65215$as_echo "yes" >&6; }
65216  fi
65217
65218  if test "x$ENABLE_PRECOMPH" = xyes; then
65219    # Check that the compiler actually supports precomp headers.
65220    if test "x$TOOLCHAIN_TYPE" = xgcc; then
65221      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
65222$as_echo_n "checking that precompiled headers work... " >&6; }
65223      echo "int alfa();" > conftest.h
65224      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
65225      if test ! -f conftest.hpp.gch; then
65226        USE_PRECOMPILED_HEADER=0
65227        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65228$as_echo "no" >&6; }
65229      else
65230        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65231$as_echo "yes" >&6; }
65232      fi
65233      $RM conftest.h conftest.hpp.gch
65234    fi
65235  fi
65236
65237
65238
65239
65240# Setup use of ccache, if available
65241
65242  # Check whether --enable-ccache was given.
65243if test "${enable_ccache+set}" = set; then :
65244  enableval=$enable_ccache;
65245fi
65246
65247
65248  CCACHE_STATUS=
65249  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
65250$as_echo_n "checking is ccache enabled... " >&6; }
65251  if test "x$enable_ccache" = xyes; then
65252    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
65253      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65254$as_echo "yes" >&6; }
65255      OLD_PATH="$PATH"
65256      if test "x$TOOLCHAIN_PATH" != x; then
65257        PATH=$TOOLCHAIN_PATH:$PATH
65258      fi
65259
65260
65261
65262  # Publish this variable in the help.
65263
65264
65265  if [ -z "${CCACHE+x}" ]; then
65266    # The variable is not set by user, try to locate tool using the code snippet
65267    for ac_prog in ccache
65268do
65269  # Extract the first word of "$ac_prog", so it can be a program name with args.
65270set dummy $ac_prog; ac_word=$2
65271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65272$as_echo_n "checking for $ac_word... " >&6; }
65273if ${ac_cv_path_CCACHE+:} false; then :
65274  $as_echo_n "(cached) " >&6
65275else
65276  case $CCACHE in
65277  [\\/]* | ?:[\\/]*)
65278  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65279  ;;
65280  *)
65281  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65282for as_dir in $PATH
65283do
65284  IFS=$as_save_IFS
65285  test -z "$as_dir" && as_dir=.
65286    for ac_exec_ext in '' $ac_executable_extensions; do
65287  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65288    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65289    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65290    break 2
65291  fi
65292done
65293  done
65294IFS=$as_save_IFS
65295
65296  ;;
65297esac
65298fi
65299CCACHE=$ac_cv_path_CCACHE
65300if test -n "$CCACHE"; then
65301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65302$as_echo "$CCACHE" >&6; }
65303else
65304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65305$as_echo "no" >&6; }
65306fi
65307
65308
65309  test -n "$CCACHE" && break
65310done
65311
65312  else
65313    # The variable is set, but is it from the command line or the environment?
65314
65315    # Try to remove the string !CCACHE! from our list.
65316    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
65317    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65318      # If it failed, the variable was not from the command line. Ignore it,
65319      # but warn the user (except for BASH, which is always set by the calling BASH).
65320      if test "xCCACHE" != xBASH; then
65321        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
65322$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
65323      fi
65324      # Try to locate tool using the code snippet
65325      for ac_prog in ccache
65326do
65327  # Extract the first word of "$ac_prog", so it can be a program name with args.
65328set dummy $ac_prog; ac_word=$2
65329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65330$as_echo_n "checking for $ac_word... " >&6; }
65331if ${ac_cv_path_CCACHE+:} false; then :
65332  $as_echo_n "(cached) " >&6
65333else
65334  case $CCACHE in
65335  [\\/]* | ?:[\\/]*)
65336  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65337  ;;
65338  *)
65339  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65340for as_dir in $PATH
65341do
65342  IFS=$as_save_IFS
65343  test -z "$as_dir" && as_dir=.
65344    for ac_exec_ext in '' $ac_executable_extensions; do
65345  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65346    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65347    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65348    break 2
65349  fi
65350done
65351  done
65352IFS=$as_save_IFS
65353
65354  ;;
65355esac
65356fi
65357CCACHE=$ac_cv_path_CCACHE
65358if test -n "$CCACHE"; then
65359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65360$as_echo "$CCACHE" >&6; }
65361else
65362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65363$as_echo "no" >&6; }
65364fi
65365
65366
65367  test -n "$CCACHE" && break
65368done
65369
65370    else
65371      # If it succeeded, then it was overridden by the user. We will use it
65372      # for the tool.
65373
65374      # First remove it from the list of overridden variables, so we can test
65375      # for unknown variables in the end.
65376      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65377
65378      # Check if we try to supply an empty value
65379      if test "x$CCACHE" = x; then
65380        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
65381$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
65382        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65383$as_echo_n "checking for CCACHE... " >&6; }
65384        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65385$as_echo "disabled" >&6; }
65386      else
65387        # Check if the provided tool contains a complete path.
65388        tool_specified="$CCACHE"
65389        tool_basename="${tool_specified##*/}"
65390        if test "x$tool_basename" = "x$tool_specified"; then
65391          # A command without a complete path is provided, search $PATH.
65392          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
65393$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
65394          # Extract the first word of "$tool_basename", so it can be a program name with args.
65395set dummy $tool_basename; ac_word=$2
65396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65397$as_echo_n "checking for $ac_word... " >&6; }
65398if ${ac_cv_path_CCACHE+:} false; then :
65399  $as_echo_n "(cached) " >&6
65400else
65401  case $CCACHE in
65402  [\\/]* | ?:[\\/]*)
65403  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65404  ;;
65405  *)
65406  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65407for as_dir in $PATH
65408do
65409  IFS=$as_save_IFS
65410  test -z "$as_dir" && as_dir=.
65411    for ac_exec_ext in '' $ac_executable_extensions; do
65412  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65413    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65414    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65415    break 2
65416  fi
65417done
65418  done
65419IFS=$as_save_IFS
65420
65421  ;;
65422esac
65423fi
65424CCACHE=$ac_cv_path_CCACHE
65425if test -n "$CCACHE"; then
65426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65427$as_echo "$CCACHE" >&6; }
65428else
65429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65430$as_echo "no" >&6; }
65431fi
65432
65433
65434          if test "x$CCACHE" = x; then
65435            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65436          fi
65437        else
65438          # Otherwise we believe it is a complete path. Use it as it is.
65439          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
65440$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
65441          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65442$as_echo_n "checking for CCACHE... " >&6; }
65443          if test ! -x "$tool_specified"; then
65444            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65445$as_echo "not found" >&6; }
65446            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
65447          fi
65448          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65449$as_echo "$tool_specified" >&6; }
65450        fi
65451      fi
65452    fi
65453
65454  fi
65455
65456
65457
65458  if test "x$CCACHE" = x; then
65459    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
65460  fi
65461
65462
65463      PATH="$OLD_PATH"
65464      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
65465      CCACHE_STATUS="Active ($CCACHE_VERSION)"
65466    else
65467      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65468$as_echo "no" >&6; }
65469      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
65470$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
65471    fi
65472  elif test "x$enable_ccache" = xno; then
65473    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
65474$as_echo "no, explicitly disabled" >&6; }
65475    CCACHE_STATUS="Disabled"
65476  elif test "x$enable_ccache" = x; then
65477    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65478$as_echo "no" >&6; }
65479  else
65480    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
65481$as_echo "unknown" >&6; }
65482    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
65483  fi
65484
65485
65486
65487# Check whether --with-ccache-dir was given.
65488if test "${with_ccache_dir+set}" = set; then :
65489  withval=$with_ccache_dir;
65490fi
65491
65492
65493  if test "x$with_ccache_dir" != x; then
65494    # When using a non home ccache directory, assume the use is to share ccache files
65495    # with other users. Thus change the umask.
65496    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
65497    if test "x$CCACHE" = x; then
65498      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
65499$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
65500    fi
65501  fi
65502
65503  if test "x$CCACHE" != x; then
65504
65505  if test "x$CCACHE" != x; then
65506    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
65507      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
65508          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
65509      if test "x$HAS_BAD_CCACHE" != "x"; then
65510        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
65511      fi
65512      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
65513$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
65514      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
65515      PUSHED_FLAGS="$CXXFLAGS"
65516      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
65517      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65518/* end confdefs.h.  */
65519
65520int
65521main ()
65522{
65523
65524  ;
65525  return 0;
65526}
65527_ACEOF
65528if ac_fn_cxx_try_compile "$LINENO"; then :
65529  CC_KNOWS_CCACHE_TRICK=yes
65530else
65531  CC_KNOWS_CCACHE_TRICK=no
65532fi
65533rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
65534      CXXFLAGS="$PUSHED_FLAGS"
65535      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
65536        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65537$as_echo "yes" >&6; }
65538        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
65539
65540        CCACHE_SLOPPINESS=pch_defines,time_macros
65541      else
65542        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65543$as_echo "no" >&6; }
65544        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
65545      fi
65546    fi
65547
65548    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
65549        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
65550
65551    if test "x$SET_CCACHE_DIR" != x; then
65552      mkdir -p $CCACHE_DIR > /dev/null 2>&1
65553      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
65554    fi
65555  fi
65556
65557  fi
65558
65559
65560###############################################################################
65561#
65562# And now the finish...
65563#
65564###############################################################################
65565
65566# Check for some common pitfalls
65567
65568  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65569    file_to_test="$SRC_ROOT/LICENSE"
65570    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
65571      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
65572    fi
65573  fi
65574
65575
65576  # Did user specify any unknown variables?
65577
65578  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
65579    # Replace the separating ! with spaces before presenting for end user.
65580    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
65581    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
65582$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
65583  fi
65584
65585
65586  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
65587$as_echo_n "checking if build directory is on local disk... " >&6; }
65588
65589  # df -l lists only local disks; if the given directory is not found then
65590  # a non-zero exit code is given
65591  if test "x$DF" = x; then
65592    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65593      # msys does not have df; use Windows "net use" instead.
65594      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
65595      if test "x$IS_NETWORK_DISK" = x; then
65596        OUTPUT_DIR_IS_LOCAL="yes"
65597      else
65598        OUTPUT_DIR_IS_LOCAL="no"
65599      fi
65600    else
65601      # No df here, say it's local
65602      OUTPUT_DIR_IS_LOCAL="yes"
65603    fi
65604  else
65605    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
65606      OUTPUT_DIR_IS_LOCAL="yes"
65607    else
65608      OUTPUT_DIR_IS_LOCAL="no"
65609    fi
65610  fi
65611
65612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
65613$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
65614
65615
65616
65617  # Check if the user has any old-style ALT_ variables set.
65618  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
65619
65620  # Before generating output files, test if they exist. If they do, this is a reconfigure.
65621  # Since we can't properly handle the dependencies for this, warn the user about the situation
65622  if test -e $OUTPUT_ROOT/spec.gmk; then
65623    IS_RECONFIGURE=yes
65624  else
65625    IS_RECONFIGURE=no
65626  fi
65627
65628
65629# At the end, call the custom hook. (Dummy macro if no custom sources available)
65630
65631
65632# This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
65633
65634  # Keep feature lists sorted and free of duplicates
65635  JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
65636  JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
65637  JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
65638  JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
65639  JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
65640  JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
65641  JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
65642
65643  # Validate features
65644  for variant in $JVM_VARIANTS; do
65645    { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
65646$as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
65647    features_var_name=JVM_FEATURES_$variant
65648    JVM_FEATURES_TO_TEST=${!features_var_name}
65649    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
65650$as_echo "$JVM_FEATURES_TO_TEST" >&6; }
65651    NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
65652    STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
65653    INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
65654    if test "x$INVALID_FEATURES" != x; then
65655      as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
65656    fi
65657  done
65658
65659
65660# We're messing a bit with internal autoconf variables to put the config.status
65661# in the output directory instead of the current directory.
65662CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
65663
65664# Create the actual output files. Now the main work of configure is done.
65665cat >confcache <<\_ACEOF
65666# This file is a shell script that caches the results of configure
65667# tests run on this system so they can be shared between configure
65668# scripts and configure runs, see configure's option --config-cache.
65669# It is not useful on other systems.  If it contains results you don't
65670# want to keep, you may remove or edit it.
65671#
65672# config.status only pays attention to the cache file if you give it
65673# the --recheck option to rerun configure.
65674#
65675# `ac_cv_env_foo' variables (set or unset) will be overridden when
65676# loading this file, other *unset* `ac_cv_foo' will be assigned the
65677# following values.
65678
65679_ACEOF
65680
65681# The following way of writing the cache mishandles newlines in values,
65682# but we know of no workaround that is simple, portable, and efficient.
65683# So, we kill variables containing newlines.
65684# Ultrix sh set writes to stderr and can't be redirected directly,
65685# and sets the high bit in the cache file unless we assign to the vars.
65686(
65687  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
65688    eval ac_val=\$$ac_var
65689    case $ac_val in #(
65690    *${as_nl}*)
65691      case $ac_var in #(
65692      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
65693$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
65694      esac
65695      case $ac_var in #(
65696      _ | IFS | as_nl) ;; #(
65697      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
65698      *) { eval $ac_var=; unset $ac_var;} ;;
65699      esac ;;
65700    esac
65701  done
65702
65703  (set) 2>&1 |
65704    case $as_nl`(ac_space=' '; set) 2>&1` in #(
65705    *${as_nl}ac_space=\ *)
65706      # `set' does not quote correctly, so add quotes: double-quote
65707      # substitution turns \\\\ into \\, and sed turns \\ into \.
65708      sed -n \
65709	"s/'/'\\\\''/g;
65710	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
65711      ;; #(
65712    *)
65713      # `set' quotes correctly as required by POSIX, so do not add quotes.
65714      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
65715      ;;
65716    esac |
65717    sort
65718) |
65719  sed '
65720     /^ac_cv_env_/b end
65721     t clear
65722     :clear
65723     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
65724     t end
65725     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
65726     :end' >>confcache
65727if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
65728  if test -w "$cache_file"; then
65729    if test "x$cache_file" != "x/dev/null"; then
65730      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
65731$as_echo "$as_me: updating cache $cache_file" >&6;}
65732      if test ! -f "$cache_file" || test -h "$cache_file"; then
65733	cat confcache >"$cache_file"
65734      else
65735        case $cache_file in #(
65736        */* | ?:*)
65737	  mv -f confcache "$cache_file"$$ &&
65738	  mv -f "$cache_file"$$ "$cache_file" ;; #(
65739        *)
65740	  mv -f confcache "$cache_file" ;;
65741	esac
65742      fi
65743    fi
65744  else
65745    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
65746$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
65747  fi
65748fi
65749rm -f confcache
65750
65751test "x$prefix" = xNONE && prefix=$ac_default_prefix
65752# Let make expand exec_prefix.
65753test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
65754
65755# Transform confdefs.h into DEFS.
65756# Protect against shell expansion while executing Makefile rules.
65757# Protect against Makefile macro expansion.
65758#
65759# If the first sed substitution is executed (which looks for macros that
65760# take arguments), then branch to the quote section.  Otherwise,
65761# look for a macro that doesn't take arguments.
65762ac_script='
65763:mline
65764/\\$/{
65765 N
65766 s,\\\n,,
65767 b mline
65768}
65769t clear
65770:clear
65771s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
65772t quote
65773s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
65774t quote
65775b any
65776:quote
65777s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
65778s/\[/\\&/g
65779s/\]/\\&/g
65780s/\$/$$/g
65781H
65782:any
65783${
65784	g
65785	s/^\n//
65786	s/\n/ /g
65787	p
65788}
65789'
65790DEFS=`sed -n "$ac_script" confdefs.h`
65791
65792
65793ac_libobjs=
65794ac_ltlibobjs=
65795U=
65796for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
65797  # 1. Remove the extension, and $U if already installed.
65798  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
65799  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
65800  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
65801  #    will be set to the directory where LIBOBJS objects are built.
65802  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
65803  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
65804done
65805LIBOBJS=$ac_libobjs
65806
65807LTLIBOBJS=$ac_ltlibobjs
65808
65809
65810
65811: "${CONFIG_STATUS=./config.status}"
65812ac_write_fail=0
65813ac_clean_files_save=$ac_clean_files
65814ac_clean_files="$ac_clean_files $CONFIG_STATUS"
65815{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
65816$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
65817as_write_fail=0
65818cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
65819#! $SHELL
65820# Generated by $as_me.
65821# Run this file to recreate the current configuration.
65822# Compiler output produced by configure, useful for debugging
65823# configure, is in config.log if it exists.
65824
65825debug=false
65826ac_cs_recheck=false
65827ac_cs_silent=false
65828
65829SHELL=\${CONFIG_SHELL-$SHELL}
65830export SHELL
65831_ASEOF
65832cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
65833## -------------------- ##
65834## M4sh Initialization. ##
65835## -------------------- ##
65836
65837# Be more Bourne compatible
65838DUALCASE=1; export DUALCASE # for MKS sh
65839if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
65840  emulate sh
65841  NULLCMD=:
65842  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
65843  # is contrary to our usage.  Disable this feature.
65844  alias -g '${1+"$@"}'='"$@"'
65845  setopt NO_GLOB_SUBST
65846else
65847  case `(set -o) 2>/dev/null` in #(
65848  *posix*) :
65849    set -o posix ;; #(
65850  *) :
65851     ;;
65852esac
65853fi
65854
65855
65856as_nl='
65857'
65858export as_nl
65859# Printing a long string crashes Solaris 7 /usr/bin/printf.
65860as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
65861as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
65862as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
65863# Prefer a ksh shell builtin over an external printf program on Solaris,
65864# but without wasting forks for bash or zsh.
65865if test -z "$BASH_VERSION$ZSH_VERSION" \
65866    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
65867  as_echo='print -r --'
65868  as_echo_n='print -rn --'
65869elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
65870  as_echo='printf %s\n'
65871  as_echo_n='printf %s'
65872else
65873  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
65874    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
65875    as_echo_n='/usr/ucb/echo -n'
65876  else
65877    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
65878    as_echo_n_body='eval
65879      arg=$1;
65880      case $arg in #(
65881      *"$as_nl"*)
65882	expr "X$arg" : "X\\(.*\\)$as_nl";
65883	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
65884      esac;
65885      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
65886    '
65887    export as_echo_n_body
65888    as_echo_n='sh -c $as_echo_n_body as_echo'
65889  fi
65890  export as_echo_body
65891  as_echo='sh -c $as_echo_body as_echo'
65892fi
65893
65894# The user is always right.
65895if test "${PATH_SEPARATOR+set}" != set; then
65896  PATH_SEPARATOR=:
65897  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
65898    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
65899      PATH_SEPARATOR=';'
65900  }
65901fi
65902
65903
65904# IFS
65905# We need space, tab and new line, in precisely that order.  Quoting is
65906# there to prevent editors from complaining about space-tab.
65907# (If _AS_PATH_WALK were called with IFS unset, it would disable word
65908# splitting by setting IFS to empty value.)
65909IFS=" ""	$as_nl"
65910
65911# Find who we are.  Look in the path if we contain no directory separator.
65912as_myself=
65913case $0 in #((
65914  *[\\/]* ) as_myself=$0 ;;
65915  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65916for as_dir in $PATH
65917do
65918  IFS=$as_save_IFS
65919  test -z "$as_dir" && as_dir=.
65920    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
65921  done
65922IFS=$as_save_IFS
65923
65924     ;;
65925esac
65926# We did not find ourselves, most probably we were run as `sh COMMAND'
65927# in which case we are not to be found in the path.
65928if test "x$as_myself" = x; then
65929  as_myself=$0
65930fi
65931if test ! -f "$as_myself"; then
65932  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
65933  exit 1
65934fi
65935
65936# Unset variables that we do not need and which cause bugs (e.g. in
65937# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
65938# suppresses any "Segmentation fault" message there.  '((' could
65939# trigger a bug in pdksh 5.2.14.
65940for as_var in BASH_ENV ENV MAIL MAILPATH
65941do eval test x\${$as_var+set} = xset \
65942  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
65943done
65944PS1='$ '
65945PS2='> '
65946PS4='+ '
65947
65948# NLS nuisances.
65949LC_ALL=C
65950export LC_ALL
65951LANGUAGE=C
65952export LANGUAGE
65953
65954# CDPATH.
65955(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
65956
65957
65958# as_fn_error STATUS ERROR [LINENO LOG_FD]
65959# ----------------------------------------
65960# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
65961# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
65962# script with STATUS, using 1 if that was 0.
65963as_fn_error ()
65964{
65965  as_status=$1; test $as_status -eq 0 && as_status=1
65966  if test "$4"; then
65967    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
65968    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
65969  fi
65970  $as_echo "$as_me: error: $2" >&2
65971  as_fn_exit $as_status
65972} # as_fn_error
65973
65974
65975# as_fn_set_status STATUS
65976# -----------------------
65977# Set $? to STATUS, without forking.
65978as_fn_set_status ()
65979{
65980  return $1
65981} # as_fn_set_status
65982
65983# as_fn_exit STATUS
65984# -----------------
65985# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
65986as_fn_exit ()
65987{
65988  set +e
65989  as_fn_set_status $1
65990  exit $1
65991} # as_fn_exit
65992
65993# as_fn_unset VAR
65994# ---------------
65995# Portably unset VAR.
65996as_fn_unset ()
65997{
65998  { eval $1=; unset $1;}
65999}
66000as_unset=as_fn_unset
66001# as_fn_append VAR VALUE
66002# ----------------------
66003# Append the text in VALUE to the end of the definition contained in VAR. Take
66004# advantage of any shell optimizations that allow amortized linear growth over
66005# repeated appends, instead of the typical quadratic growth present in naive
66006# implementations.
66007if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
66008  eval 'as_fn_append ()
66009  {
66010    eval $1+=\$2
66011  }'
66012else
66013  as_fn_append ()
66014  {
66015    eval $1=\$$1\$2
66016  }
66017fi # as_fn_append
66018
66019# as_fn_arith ARG...
66020# ------------------
66021# Perform arithmetic evaluation on the ARGs, and store the result in the
66022# global $as_val. Take advantage of shells that can avoid forks. The arguments
66023# must be portable across $(()) and expr.
66024if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
66025  eval 'as_fn_arith ()
66026  {
66027    as_val=$(( $* ))
66028  }'
66029else
66030  as_fn_arith ()
66031  {
66032    as_val=`expr "$@" || test $? -eq 1`
66033  }
66034fi # as_fn_arith
66035
66036
66037if expr a : '\(a\)' >/dev/null 2>&1 &&
66038   test "X`expr 00001 : '.*\(...\)'`" = X001; then
66039  as_expr=expr
66040else
66041  as_expr=false
66042fi
66043
66044if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
66045  as_basename=basename
66046else
66047  as_basename=false
66048fi
66049
66050if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
66051  as_dirname=dirname
66052else
66053  as_dirname=false
66054fi
66055
66056as_me=`$as_basename -- "$0" ||
66057$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
66058	 X"$0" : 'X\(//\)$' \| \
66059	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
66060$as_echo X/"$0" |
66061    sed '/^.*\/\([^/][^/]*\)\/*$/{
66062	    s//\1/
66063	    q
66064	  }
66065	  /^X\/\(\/\/\)$/{
66066	    s//\1/
66067	    q
66068	  }
66069	  /^X\/\(\/\).*/{
66070	    s//\1/
66071	    q
66072	  }
66073	  s/.*/./; q'`
66074
66075# Avoid depending upon Character Ranges.
66076as_cr_letters='abcdefghijklmnopqrstuvwxyz'
66077as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
66078as_cr_Letters=$as_cr_letters$as_cr_LETTERS
66079as_cr_digits='0123456789'
66080as_cr_alnum=$as_cr_Letters$as_cr_digits
66081
66082ECHO_C= ECHO_N= ECHO_T=
66083case `echo -n x` in #(((((
66084-n*)
66085  case `echo 'xy\c'` in
66086  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
66087  xy)  ECHO_C='\c';;
66088  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
66089       ECHO_T='	';;
66090  esac;;
66091*)
66092  ECHO_N='-n';;
66093esac
66094
66095rm -f conf$$ conf$$.exe conf$$.file
66096if test -d conf$$.dir; then
66097  rm -f conf$$.dir/conf$$.file
66098else
66099  rm -f conf$$.dir
66100  mkdir conf$$.dir 2>/dev/null
66101fi
66102if (echo >conf$$.file) 2>/dev/null; then
66103  if ln -s conf$$.file conf$$ 2>/dev/null; then
66104    as_ln_s='ln -s'
66105    # ... but there are two gotchas:
66106    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
66107    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
66108    # In both cases, we have to default to `cp -pR'.
66109    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
66110      as_ln_s='cp -pR'
66111  elif ln conf$$.file conf$$ 2>/dev/null; then
66112    as_ln_s=ln
66113  else
66114    as_ln_s='cp -pR'
66115  fi
66116else
66117  as_ln_s='cp -pR'
66118fi
66119rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
66120rmdir conf$$.dir 2>/dev/null
66121
66122
66123# as_fn_mkdir_p
66124# -------------
66125# Create "$as_dir" as a directory, including parents if necessary.
66126as_fn_mkdir_p ()
66127{
66128
66129  case $as_dir in #(
66130  -*) as_dir=./$as_dir;;
66131  esac
66132  test -d "$as_dir" || eval $as_mkdir_p || {
66133    as_dirs=
66134    while :; do
66135      case $as_dir in #(
66136      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
66137      *) as_qdir=$as_dir;;
66138      esac
66139      as_dirs="'$as_qdir' $as_dirs"
66140      as_dir=`$as_dirname -- "$as_dir" ||
66141$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66142	 X"$as_dir" : 'X\(//\)[^/]' \| \
66143	 X"$as_dir" : 'X\(//\)$' \| \
66144	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
66145$as_echo X"$as_dir" |
66146    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66147	    s//\1/
66148	    q
66149	  }
66150	  /^X\(\/\/\)[^/].*/{
66151	    s//\1/
66152	    q
66153	  }
66154	  /^X\(\/\/\)$/{
66155	    s//\1/
66156	    q
66157	  }
66158	  /^X\(\/\).*/{
66159	    s//\1/
66160	    q
66161	  }
66162	  s/.*/./; q'`
66163      test -d "$as_dir" && break
66164    done
66165    test -z "$as_dirs" || eval "mkdir $as_dirs"
66166  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
66167
66168
66169} # as_fn_mkdir_p
66170if mkdir -p . 2>/dev/null; then
66171  as_mkdir_p='mkdir -p "$as_dir"'
66172else
66173  test -d ./-p && rmdir ./-p
66174  as_mkdir_p=false
66175fi
66176
66177
66178# as_fn_executable_p FILE
66179# -----------------------
66180# Test if FILE is an executable regular file.
66181as_fn_executable_p ()
66182{
66183  test -f "$1" && test -x "$1"
66184} # as_fn_executable_p
66185as_test_x='test -x'
66186as_executable_p=as_fn_executable_p
66187
66188# Sed expression to map a string onto a valid CPP name.
66189as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
66190
66191# Sed expression to map a string onto a valid variable name.
66192as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
66193
66194
66195exec 6>&1
66196## ----------------------------------- ##
66197## Main body of $CONFIG_STATUS script. ##
66198## ----------------------------------- ##
66199_ASEOF
66200test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
66201
66202cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66203# Save the log message, to keep $0 and so on meaningful, and to
66204# report actual input values of CONFIG_FILES etc. instead of their
66205# values after options handling.
66206ac_log="
66207This file was extended by OpenJDK $as_me jdk9, which was
66208generated by GNU Autoconf 2.69.  Invocation command line was
66209
66210  CONFIG_FILES    = $CONFIG_FILES
66211  CONFIG_HEADERS  = $CONFIG_HEADERS
66212  CONFIG_LINKS    = $CONFIG_LINKS
66213  CONFIG_COMMANDS = $CONFIG_COMMANDS
66214  $ $0 $@
66215
66216on `(hostname || uname -n) 2>/dev/null | sed 1q`
66217"
66218
66219_ACEOF
66220
66221case $ac_config_files in *"
66222"*) set x $ac_config_files; shift; ac_config_files=$*;;
66223esac
66224
66225
66226
66227cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66228# Files that config.status was made for.
66229config_files="$ac_config_files"
66230
66231_ACEOF
66232
66233cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66234ac_cs_usage="\
66235\`$as_me' instantiates files and other configuration actions
66236from templates according to the current configuration.  Unless the files
66237and actions are specified as TAGs, all are instantiated by default.
66238
66239Usage: $0 [OPTION]... [TAG]...
66240
66241  -h, --help       print this help, then exit
66242  -V, --version    print version number and configuration settings, then exit
66243      --config     print configuration, then exit
66244  -q, --quiet, --silent
66245                   do not print progress messages
66246  -d, --debug      don't remove temporary files
66247      --recheck    update $as_me by reconfiguring in the same conditions
66248      --file=FILE[:TEMPLATE]
66249                   instantiate the configuration file FILE
66250
66251Configuration files:
66252$config_files
66253
66254Report bugs to <build-dev@openjdk.java.net>.
66255OpenJDK home page: <http://openjdk.java.net>."
66256
66257_ACEOF
66258cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66259ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
66260ac_cs_version="\\
66261OpenJDK config.status jdk9
66262configured by $0, generated by GNU Autoconf 2.69,
66263  with options \\"\$ac_cs_config\\"
66264
66265Copyright (C) 2012 Free Software Foundation, Inc.
66266This config.status script is free software; the Free Software Foundation
66267gives unlimited permission to copy, distribute and modify it."
66268
66269ac_pwd='$ac_pwd'
66270srcdir='$srcdir'
66271AWK='$AWK'
66272test -n "\$AWK" || AWK=awk
66273_ACEOF
66274
66275cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66276# The default lists apply if the user does not specify any file.
66277ac_need_defaults=:
66278while test $# != 0
66279do
66280  case $1 in
66281  --*=?*)
66282    ac_option=`expr "X$1" : 'X\([^=]*\)='`
66283    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
66284    ac_shift=:
66285    ;;
66286  --*=)
66287    ac_option=`expr "X$1" : 'X\([^=]*\)='`
66288    ac_optarg=
66289    ac_shift=:
66290    ;;
66291  *)
66292    ac_option=$1
66293    ac_optarg=$2
66294    ac_shift=shift
66295    ;;
66296  esac
66297
66298  case $ac_option in
66299  # Handling of the options.
66300  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
66301    ac_cs_recheck=: ;;
66302  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
66303    $as_echo "$ac_cs_version"; exit ;;
66304  --config | --confi | --conf | --con | --co | --c )
66305    $as_echo "$ac_cs_config"; exit ;;
66306  --debug | --debu | --deb | --de | --d | -d )
66307    debug=: ;;
66308  --file | --fil | --fi | --f )
66309    $ac_shift
66310    case $ac_optarg in
66311    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
66312    '') as_fn_error $? "missing file argument" ;;
66313    esac
66314    as_fn_append CONFIG_FILES " '$ac_optarg'"
66315    ac_need_defaults=false;;
66316  --he | --h |  --help | --hel | -h )
66317    $as_echo "$ac_cs_usage"; exit ;;
66318  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
66319  | -silent | --silent | --silen | --sile | --sil | --si | --s)
66320    ac_cs_silent=: ;;
66321
66322  # This is an error.
66323  -*) as_fn_error $? "unrecognized option: \`$1'
66324Try \`$0 --help' for more information." ;;
66325
66326  *) as_fn_append ac_config_targets " $1"
66327     ac_need_defaults=false ;;
66328
66329  esac
66330  shift
66331done
66332
66333ac_configure_extra_args=
66334
66335if $ac_cs_silent; then
66336  exec 6>/dev/null
66337  ac_configure_extra_args="$ac_configure_extra_args --silent"
66338fi
66339
66340_ACEOF
66341cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66342if \$ac_cs_recheck; then
66343  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
66344  shift
66345  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
66346  CONFIG_SHELL='$SHELL'
66347  export CONFIG_SHELL
66348  exec "\$@"
66349fi
66350
66351_ACEOF
66352cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66353exec 5>>config.log
66354{
66355  echo
66356  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
66357## Running $as_me. ##
66358_ASBOX
66359  $as_echo "$ac_log"
66360} >&5
66361
66362_ACEOF
66363cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66364_ACEOF
66365
66366cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66367
66368# Handling of arguments.
66369for ac_config_target in $ac_config_targets
66370do
66371  case $ac_config_target in
66372    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
66373    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
66374    "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
66375    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
66376    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
66377
66378  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
66379  esac
66380done
66381
66382
66383# If the user did not use the arguments to specify the items to instantiate,
66384# then the envvar interface is used.  Set only those that are not.
66385# We use the long form for the default assignment because of an extremely
66386# bizarre bug on SunOS 4.1.3.
66387if $ac_need_defaults; then
66388  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
66389fi
66390
66391# Have a temporary directory for convenience.  Make it in the build tree
66392# simply because there is no reason against having it here, and in addition,
66393# creating and moving files from /tmp can sometimes cause problems.
66394# Hook for its removal unless debugging.
66395# Note that there is a small window in which the directory will not be cleaned:
66396# after its creation but before its name has been assigned to `$tmp'.
66397$debug ||
66398{
66399  tmp= ac_tmp=
66400  trap 'exit_status=$?
66401  : "${ac_tmp:=$tmp}"
66402  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
66403' 0
66404  trap 'as_fn_exit 1' 1 2 13 15
66405}
66406# Create a (secure) tmp directory for tmp files.
66407
66408{
66409  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
66410  test -d "$tmp"
66411}  ||
66412{
66413  tmp=./conf$$-$RANDOM
66414  (umask 077 && mkdir "$tmp")
66415} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
66416ac_tmp=$tmp
66417
66418# Set up the scripts for CONFIG_FILES section.
66419# No need to generate them if there are no CONFIG_FILES.
66420# This happens for instance with `./config.status config.h'.
66421if test -n "$CONFIG_FILES"; then
66422
66423
66424ac_cr=`echo X | tr X '\015'`
66425# On cygwin, bash can eat \r inside `` if the user requested igncr.
66426# But we know of no other shell where ac_cr would be empty at this
66427# point, so we can use a bashism as a fallback.
66428if test "x$ac_cr" = x; then
66429  eval ac_cr=\$\'\\r\'
66430fi
66431ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
66432if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
66433  ac_cs_awk_cr='\\r'
66434else
66435  ac_cs_awk_cr=$ac_cr
66436fi
66437
66438echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
66439_ACEOF
66440
66441
66442{
66443  echo "cat >conf$$subs.awk <<_ACEOF" &&
66444  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
66445  echo "_ACEOF"
66446} >conf$$subs.sh ||
66447  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66448ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
66449ac_delim='%!_!# '
66450for ac_last_try in false false false false false :; do
66451  . ./conf$$subs.sh ||
66452    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66453
66454  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
66455  if test $ac_delim_n = $ac_delim_num; then
66456    break
66457  elif $ac_last_try; then
66458    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66459  else
66460    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
66461  fi
66462done
66463rm -f conf$$subs.sh
66464
66465cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66466cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
66467_ACEOF
66468sed -n '
66469h
66470s/^/S["/; s/!.*/"]=/
66471p
66472g
66473s/^[^!]*!//
66474:repl
66475t repl
66476s/'"$ac_delim"'$//
66477t delim
66478:nl
66479h
66480s/\(.\{148\}\)..*/\1/
66481t more1
66482s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
66483p
66484n
66485b repl
66486:more1
66487s/["\\]/\\&/g; s/^/"/; s/$/"\\/
66488p
66489g
66490s/.\{148\}//
66491t nl
66492:delim
66493h
66494s/\(.\{148\}\)..*/\1/
66495t more2
66496s/["\\]/\\&/g; s/^/"/; s/$/"/
66497p
66498b
66499:more2
66500s/["\\]/\\&/g; s/^/"/; s/$/"\\/
66501p
66502g
66503s/.\{148\}//
66504t delim
66505' <conf$$subs.awk | sed '
66506/^[^""]/{
66507  N
66508  s/\n//
66509}
66510' >>$CONFIG_STATUS || ac_write_fail=1
66511rm -f conf$$subs.awk
66512cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66513_ACAWK
66514cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
66515  for (key in S) S_is_set[key] = 1
66516  FS = ""
66517
66518}
66519{
66520  line = $ 0
66521  nfields = split(line, field, "@")
66522  substed = 0
66523  len = length(field[1])
66524  for (i = 2; i < nfields; i++) {
66525    key = field[i]
66526    keylen = length(key)
66527    if (S_is_set[key]) {
66528      value = S[key]
66529      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
66530      len += length(value) + length(field[++i])
66531      substed = 1
66532    } else
66533      len += 1 + keylen
66534  }
66535
66536  print line
66537}
66538
66539_ACAWK
66540_ACEOF
66541cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66542if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
66543  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
66544else
66545  cat
66546fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
66547  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
66548_ACEOF
66549
66550# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
66551# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
66552# trailing colons and then remove the whole line if VPATH becomes empty
66553# (actually we leave an empty line to preserve line numbers).
66554if test "x$srcdir" = x.; then
66555  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
66556h
66557s///
66558s/^/:/
66559s/[	 ]*$/:/
66560s/:\$(srcdir):/:/g
66561s/:\${srcdir}:/:/g
66562s/:@srcdir@:/:/g
66563s/^:*//
66564s/:*$//
66565x
66566s/\(=[	 ]*\).*/\1/
66567G
66568s/\n//
66569s/^[^=]*=[	 ]*$//
66570}'
66571fi
66572
66573cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66574fi # test -n "$CONFIG_FILES"
66575
66576
66577eval set X "  :F $CONFIG_FILES      "
66578shift
66579for ac_tag
66580do
66581  case $ac_tag in
66582  :[FHLC]) ac_mode=$ac_tag; continue;;
66583  esac
66584  case $ac_mode$ac_tag in
66585  :[FHL]*:*);;
66586  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
66587  :[FH]-) ac_tag=-:-;;
66588  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
66589  esac
66590  ac_save_IFS=$IFS
66591  IFS=:
66592  set x $ac_tag
66593  IFS=$ac_save_IFS
66594  shift
66595  ac_file=$1
66596  shift
66597
66598  case $ac_mode in
66599  :L) ac_source=$1;;
66600  :[FH])
66601    ac_file_inputs=
66602    for ac_f
66603    do
66604      case $ac_f in
66605      -) ac_f="$ac_tmp/stdin";;
66606      *) # Look for the file first in the build tree, then in the source tree
66607	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
66608	 # because $ac_f cannot contain `:'.
66609	 test -f "$ac_f" ||
66610	   case $ac_f in
66611	   [\\/$]*) false;;
66612	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
66613	   esac ||
66614	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
66615      esac
66616      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
66617      as_fn_append ac_file_inputs " '$ac_f'"
66618    done
66619
66620    # Let's still pretend it is `configure' which instantiates (i.e., don't
66621    # use $as_me), people would be surprised to read:
66622    #    /* config.h.  Generated by config.status.  */
66623    configure_input='Generated from '`
66624	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
66625	`' by configure.'
66626    if test x"$ac_file" != x-; then
66627      configure_input="$ac_file.  $configure_input"
66628      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
66629$as_echo "$as_me: creating $ac_file" >&6;}
66630    fi
66631    # Neutralize special characters interpreted by sed in replacement strings.
66632    case $configure_input in #(
66633    *\&* | *\|* | *\\* )
66634       ac_sed_conf_input=`$as_echo "$configure_input" |
66635       sed 's/[\\\\&|]/\\\\&/g'`;; #(
66636    *) ac_sed_conf_input=$configure_input;;
66637    esac
66638
66639    case $ac_tag in
66640    *:-:* | *:-) cat >"$ac_tmp/stdin" \
66641      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
66642    esac
66643    ;;
66644  esac
66645
66646  ac_dir=`$as_dirname -- "$ac_file" ||
66647$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66648	 X"$ac_file" : 'X\(//\)[^/]' \| \
66649	 X"$ac_file" : 'X\(//\)$' \| \
66650	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
66651$as_echo X"$ac_file" |
66652    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66653	    s//\1/
66654	    q
66655	  }
66656	  /^X\(\/\/\)[^/].*/{
66657	    s//\1/
66658	    q
66659	  }
66660	  /^X\(\/\/\)$/{
66661	    s//\1/
66662	    q
66663	  }
66664	  /^X\(\/\).*/{
66665	    s//\1/
66666	    q
66667	  }
66668	  s/.*/./; q'`
66669  as_dir="$ac_dir"; as_fn_mkdir_p
66670  ac_builddir=.
66671
66672case "$ac_dir" in
66673.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
66674*)
66675  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
66676  # A ".." for each directory in $ac_dir_suffix.
66677  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
66678  case $ac_top_builddir_sub in
66679  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
66680  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
66681  esac ;;
66682esac
66683ac_abs_top_builddir=$ac_pwd
66684ac_abs_builddir=$ac_pwd$ac_dir_suffix
66685# for backward compatibility:
66686ac_top_builddir=$ac_top_build_prefix
66687
66688case $srcdir in
66689  .)  # We are building in place.
66690    ac_srcdir=.
66691    ac_top_srcdir=$ac_top_builddir_sub
66692    ac_abs_top_srcdir=$ac_pwd ;;
66693  [\\/]* | ?:[\\/]* )  # Absolute name.
66694    ac_srcdir=$srcdir$ac_dir_suffix;
66695    ac_top_srcdir=$srcdir
66696    ac_abs_top_srcdir=$srcdir ;;
66697  *) # Relative name.
66698    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
66699    ac_top_srcdir=$ac_top_build_prefix$srcdir
66700    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
66701esac
66702ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
66703
66704
66705  case $ac_mode in
66706  :F)
66707  #
66708  # CONFIG_FILE
66709  #
66710
66711_ACEOF
66712
66713cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66714# If the template does not know about datarootdir, expand it.
66715# FIXME: This hack should be removed a few years after 2.60.
66716ac_datarootdir_hack=; ac_datarootdir_seen=
66717ac_sed_dataroot='
66718/datarootdir/ {
66719  p
66720  q
66721}
66722/@datadir@/p
66723/@docdir@/p
66724/@infodir@/p
66725/@localedir@/p
66726/@mandir@/p'
66727case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
66728*datarootdir*) ac_datarootdir_seen=yes;;
66729*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
66730  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
66731$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
66732_ACEOF
66733cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66734  ac_datarootdir_hack='
66735  s&@datadir@&$datadir&g
66736  s&@docdir@&$docdir&g
66737  s&@infodir@&$infodir&g
66738  s&@localedir@&$localedir&g
66739  s&@mandir@&$mandir&g
66740  s&\\\${datarootdir}&$datarootdir&g' ;;
66741esac
66742_ACEOF
66743
66744# Neutralize VPATH when `$srcdir' = `.'.
66745# Shell code in configure.ac might set extrasub.
66746# FIXME: do we really want to maintain this feature?
66747cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66748ac_sed_extra="$ac_vpsub
66749$extrasub
66750_ACEOF
66751cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66752:t
66753/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
66754s|@configure_input@|$ac_sed_conf_input|;t t
66755s&@top_builddir@&$ac_top_builddir_sub&;t t
66756s&@top_build_prefix@&$ac_top_build_prefix&;t t
66757s&@srcdir@&$ac_srcdir&;t t
66758s&@abs_srcdir@&$ac_abs_srcdir&;t t
66759s&@top_srcdir@&$ac_top_srcdir&;t t
66760s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
66761s&@builddir@&$ac_builddir&;t t
66762s&@abs_builddir@&$ac_abs_builddir&;t t
66763s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
66764$ac_datarootdir_hack
66765"
66766eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
66767  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
66768
66769test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
66770  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
66771  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
66772      "$ac_tmp/out"`; test -z "$ac_out"; } &&
66773  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
66774which seems to be undefined.  Please make sure it is defined" >&5
66775$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
66776which seems to be undefined.  Please make sure it is defined" >&2;}
66777
66778  rm -f "$ac_tmp/stdin"
66779  case $ac_file in
66780  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
66781  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
66782  esac \
66783  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
66784 ;;
66785
66786
66787
66788  esac
66789
66790done # for ac_tag
66791
66792
66793as_fn_exit 0
66794_ACEOF
66795ac_clean_files=$ac_clean_files_save
66796
66797test $ac_write_fail = 0 ||
66798  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
66799
66800
66801# configure is writing to config.log, and then calls config.status.
66802# config.status does its own redirection, appending to config.log.
66803# Unfortunately, on DOS this fails, as config.log is still kept open
66804# by configure, so config.status won't be able to write to it; its
66805# output is simply discarded.  So we exec the FD to /dev/null,
66806# effectively closing config.log, so it can be properly (re)opened and
66807# appended to by config.status.  When coming back to configure, we
66808# need to make the FD available again.
66809if test "$no_create" != yes; then
66810  ac_cs_success=:
66811  ac_config_status_args=
66812  test "$silent" = yes &&
66813    ac_config_status_args="$ac_config_status_args --quiet"
66814  exec 5>/dev/null
66815  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
66816  exec 5>>config.log
66817  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
66818  # would make configure fail if this is the last instruction.
66819  $ac_cs_success || as_fn_exit 1
66820fi
66821if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
66822  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
66823$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
66824fi
66825
66826
66827# After AC_OUTPUT, we need to do final work
66828
66829
66830  # Try to move config.log (generated by autoconf) to the configure-support directory.
66831  if test -e ./config.log; then
66832    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
66833  fi
66834
66835  # Rotate our log file (configure.log)
66836  if test -e "$OUTPUT_ROOT/configure.log.old"; then
66837    $RM -f "$OUTPUT_ROOT/configure.log.old"
66838  fi
66839  if test -e "$OUTPUT_ROOT/configure.log"; then
66840    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
66841  fi
66842
66843  # Move configure.log from current directory to the build output root
66844  if test -e ./configure.log; then
66845    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
66846  fi
66847
66848  # Make the compare script executable
66849  $CHMOD +x $OUTPUT_ROOT/compare.sh
66850
66851
66852# Finally output some useful information to the user
66853
66854  # Finally output some useful information to the user
66855
66856  printf "\n"
66857  printf "====================================================\n"
66858  if test "x$no_create" != "xyes"; then
66859    if test "x$IS_RECONFIGURE" != "xyes"; then
66860      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
66861    else
66862      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
66863    fi
66864  else
66865    if test "x$IS_RECONFIGURE" != "xyes"; then
66866      printf "A configuration has been successfully checked but not created\n"
66867    else
66868      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
66869    fi
66870  fi
66871  if test "x$CONFIGURE_COMMAND_LINE" != x; then
66872    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
66873  else
66874    printf "using default settings.\n"
66875  fi
66876
66877  printf "\n"
66878  printf "Configuration summary:\n"
66879  printf "* Debug level:    $DEBUG_LEVEL\n"
66880  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
66881  printf "* JDK variant:    $JDK_VARIANT\n"
66882  printf "* JVM variants:   $JVM_VARIANTS\n"
66883  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
66884  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
66885
66886  printf "\n"
66887  printf "Tools summary:\n"
66888  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
66889    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
66890  fi
66891  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
66892  if test "x$TOOLCHAIN_VERSION" != "x"; then
66893    print_version=" $TOOLCHAIN_VERSION"
66894  fi
66895  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
66896  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
66897  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
66898
66899  printf "\n"
66900  printf "Build performance summary:\n"
66901  printf "* Cores to use:   $JOBS\n"
66902  printf "* Memory limit:   $MEMORY_SIZE MB\n"
66903  if test "x$CCACHE_STATUS" != "x"; then
66904    printf "* ccache status:  $CCACHE_STATUS\n"
66905  fi
66906  printf "\n"
66907
66908  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
66909    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
66910    printf "will result in longer build times.\n"
66911    printf "\n"
66912  fi
66913
66914  if test "x$FOUND_ALT_VARIABLES" != "x"; then
66915    printf "WARNING: You have old-style ALT_ environment variables set.\n"
66916    printf "These are not respected, and will be ignored. It is recommended\n"
66917    printf "that you clean your environment. The following variables are set:\n"
66918    printf "$FOUND_ALT_VARIABLES\n"
66919    printf "\n"
66920  fi
66921
66922  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
66923    printf "WARNING: Your build output directory is not on a local disk.\n"
66924    printf "This will severely degrade build performance!\n"
66925    printf "It is recommended that you create an output directory on a local disk,\n"
66926    printf "and run the configure script again from that directory.\n"
66927    printf "\n"
66928  fi
66929
66930  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
66931    printf "WARNING: The result of this configuration has overridden an older\n"
66932    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
66933    printf "proper build. Failure to do so might result in strange build problems.\n"
66934    printf "\n"
66935  fi
66936
66937  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
66938    printf "WARNING: The result of this configuration was not saved.\n"
66939    printf "You should run without '--no-create | -n' to create the configuration.\n"
66940    printf "\n"
66941  fi
66942
66943
66944
66945  # Locate config.log.
66946  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
66947    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
66948  elif test -e "./config.log"; then
66949    CONFIG_LOG_PATH="."
66950  fi
66951
66952  if test -e "$CONFIG_LOG_PATH/config.log"; then
66953    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
66954    if test $? -eq 0; then
66955      printf "The following warnings were produced. Repeated here for convenience:\n"
66956      # We must quote sed expression (using []) to stop m4 from eating the [].
66957      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
66958      printf "\n"
66959    fi
66960  fi
66961
66962