generated-configure.sh revision 2367:03e45f8d5325
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
703ZIP_EXTERNAL_DEBUG_SYMBOLS
704COPY_DEBUG_SYMBOLS
705COMPILE_WITH_DEBUG_SYMBOLS
706CFLAGS_WARNINGS_ARE_ERRORS
707BUILD_CC_DISABLE_WARNING_PREFIX
708DISABLE_WARNING_PREFIX
709HOTSPOT_SET_WARNINGS_AS_ERRORS
710WARNINGS_AS_ERRORS
711COMPILER_SUPPORTS_TARGET_BITS_FLAG
712ZERO_ARCHFLAG
713LDFLAGS_TESTEXE
714LDFLAGS_TESTLIB
715CXXFLAGS_TESTEXE
716CXXFLAGS_TESTLIB
717CFLAGS_TESTEXE
718CFLAGS_TESTLIB
719OPENJDK_BUILD_JVM_LIBS
720OPENJDK_BUILD_JVM_ASFLAGS
721OPENJDK_BUILD_JVM_LDFLAGS
722OPENJDK_BUILD_JVM_CFLAGS
723OPENJDK_BUILD_LDFLAGS_HASH_STYLE
724OPENJDK_BUILD_LDFLAGS_CXX_JDK
725OPENJDK_BUILD_JDKEXE_LIBS
726OPENJDK_BUILD_JDKLIB_LIBS
727OPENJDK_BUILD_LDFLAGS_JDKEXE
728OPENJDK_BUILD_LDFLAGS_JDKLIB
729OPENJDK_BUILD_CXXFLAGS_JDKEXE
730OPENJDK_BUILD_CXXFLAGS_JDKLIB
731OPENJDK_BUILD_CFLAGS_JDKEXE
732OPENJDK_BUILD_CFLAGS_JDKLIB
733OPENJDK_BUILD_CXXSTD_CXXFLAG
734JVM_LIBS
735JVM_ASFLAGS
736JVM_LDFLAGS
737JVM_CFLAGS
738LDFLAGS_HASH_STYLE
739LDFLAGS_CXX_JDK
740JDKEXE_LIBS
741JDKLIB_LIBS
742LDFLAGS_JDKEXE
743LDFLAGS_JDKLIB
744CXXFLAGS_JDKEXE
745CXXFLAGS_JDKLIB
746CFLAGS_JDKEXE
747CFLAGS_JDKLIB
748MACOSX_VERSION_MIN
749CXXSTD_CXXFLAG
750CXX_O_FLAG_SIZE
751CXX_O_FLAG_NONE
752CXX_O_FLAG_DEBUG
753CXX_O_FLAG_NORM
754CXX_O_FLAG_HI
755CXX_O_FLAG_HIGHEST
756CXX_O_FLAG_HIGHEST_JVM
757C_O_FLAG_SIZE
758C_O_FLAG_NONE
759C_O_FLAG_DEBUG
760C_O_FLAG_NORM
761C_O_FLAG_HI
762C_O_FLAG_HIGHEST
763C_O_FLAG_HIGHEST_JVM
764JVM_CFLAGS_SYMBOLS
765CXXFLAGS_DEBUG_SYMBOLS
766CFLAGS_DEBUG_SYMBOLS
767CXX_FLAG_DEPS
768C_FLAG_DEPS
769SHARED_LIBRARY_FLAGS
770SET_SHARED_LIBRARY_MAPFILE
771SET_SHARED_LIBRARY_NAME
772SET_SHARED_LIBRARY_ORIGIN
773SET_EXECUTABLE_ORIGIN
774CXX_FLAG_REORDER
775C_FLAG_REORDER
776JVM_RCFLAGS
777RC_FLAGS
778AR_OUT_OPTION
779LD_OUT_OPTION
780EXE_OUT_OPTION
781CC_OUT_OPTION
782STRIPFLAGS
783ARFLAGS
784COMPILER_BINDCMD_FILE_FLAG
785COMPILER_COMMAND_FILE_FLAG
786COMPILER_TARGET_BITS_FLAG
787JT_HOME
788JTREGEXE
789HOTSPOT_TOOLCHAIN_TYPE
790USING_BROKEN_SUSE_LD
791PACKAGE_PATH
792BUILD_AS
793BUILD_LDCXX
794BUILD_LD
795BUILD_STRIP
796BUILD_OBJCOPY
797BUILD_AR
798BUILD_NM
799BUILD_CXX
800BUILD_CC
801BUILD_SYSROOT_LDFLAGS
802BUILD_SYSROOT_CFLAGS
803ac_ct_OBJDUMP
804OBJDUMP
805ac_ct_OBJCOPY
806OBJCOPY
807ac_ct_NM
808ac_ct_STRIP
809GNM
810NM
811STRIP
812MSBUILD
813DUMPBIN
814RC
815MT
816LIPO
817ac_ct_AR
818AR
819AS
820LDCXX
821LD
822CXXCPP
823CPP
824CXX_VERSION_NUMBER
825CC_VERSION_NUMBER
826ac_ct_CXX
827CXXFLAGS
828CXX
829TOOLCHAIN_PATH_CXX
830POTENTIAL_CXX
831OBJEXT
832EXEEXT
833ac_ct_CC
834CPPFLAGS
835LDFLAGS
836CFLAGS
837CC
838TOOLCHAIN_PATH_CC
839POTENTIAL_CC
840TOOLCHAIN_VERSION
841VS_LIB
842VS_INCLUDE
843VS_PATH
844CYGWIN_LINK
845SYSROOT_LDFLAGS
846SYSROOT_CFLAGS
847EXTRA_LDFLAGS
848EXTRA_CXXFLAGS
849EXTRA_CFLAGS
850LEGACY_EXTRA_LDFLAGS
851LEGACY_EXTRA_CXXFLAGS
852LEGACY_EXTRA_CFLAGS
853EXE_SUFFIX
854OBJ_SUFFIX
855STATIC_LIBRARY
856SHARED_LIBRARY
857STATIC_LIBRARY_SUFFIX
858SHARED_LIBRARY_SUFFIX
859LIBRARY_PREFIX
860TOOLCHAIN_TYPE
861STATIC_BUILD
862IMPORT_MODULES_MAKE
863IMPORT_MODULES_SRC
864IMPORT_MODULES_CONF
865IMPORT_MODULES_LIBS
866IMPORT_MODULES_CMDS
867IMPORT_MODULES_CLASSES
868BUILD_HOTSPOT
869HOTSPOT_DIST
870BUILD_OUTPUT
871JDK_TOPDIR
872NASHORN_TOPDIR
873HOTSPOT_TOPDIR
874JAXWS_TOPDIR
875JAXP_TOPDIR
876CORBA_TOPDIR
877LANGTOOLS_TOPDIR
878EXTERNAL_BUILDJDK
879BUILD_JDK
880CREATE_BUILDJDK
881JLINK
882JMOD
883BOOT_JDK_BITS
884JAVAC_FLAGS
885BOOT_JDK_MODULAR
886BOOT_JDK_SOURCETARGET
887JARSIGNER
888JAR
889JAVAH
890JAVAC
891JAVA
892BOOT_JDK
893JAVA_CHECK
894JAVAC_CHECK
895VERSION_IS_GA
896VERSION_SHORT
897VERSION_STRING
898VERSION_NUMBER_FOUR_POSITIONS
899VERSION_NUMBER
900VERSION_OPT
901VERSION_BUILD
902VERSION_PRE
903VERSION_PATCH
904VERSION_SECURITY
905VERSION_MINOR
906VERSION_MAJOR
907MACOSX_BUNDLE_ID_BASE
908MACOSX_BUNDLE_NAME_BASE
909HOTSPOT_VM_DISTRO
910COMPANY_NAME
911JDK_RC_PLATFORM_NAME
912PRODUCT_SUFFIX
913PRODUCT_NAME
914LAUNCHER_NAME
915JLINK_KEEP_PACKAGED_MODULES
916COPYRIGHT_YEAR
917COMPRESS_JARS
918INCLUDE_SA
919UNLIMITED_CRYPTO
920CACERTS_FILE
921ENABLE_HEADLESS_ONLY
922DEFAULT_MAKE_TARGET
923OS_VERSION_MICRO
924OS_VERSION_MINOR
925OS_VERSION_MAJOR
926PKG_CONFIG
927BASH_ARGS
928SETFILE
929CODESIGN
930XATTR
931DSYMUTIL
932IS_GNU_TIME
933PATCH
934DTRACE
935TIME
936STAT
937HG
938READELF
939OTOOL
940LDD
941ZIPEXE
942UNZIP
943TAR_SUPPORTS_TRANSFORM
944TAR_INCLUDE_PARAM
945TAR_CREATE_EXTRA_PARAM
946TAR_TYPE
947FIND_DELETE
948OUTPUT_SYNC
949OUTPUT_SYNC_SUPPORTED
950CHECK_TOOLSDIR_MAKE
951CHECK_TOOLSDIR_GMAKE
952CHECK_MAKE
953CHECK_GMAKE
954MAKE
955PKGHANDLER
956CONFIGURESUPPORT_OUTPUTDIR
957OUTPUT_ROOT
958CONF_NAME
959SPEC
960SDKROOT
961XCODEBUILD
962VALID_JVM_VARIANTS
963JVM_VARIANTS
964DEBUG_LEVEL
965HOTSPOT_DEBUG_LEVEL
966JDK_VARIANT
967USERNAME
968CANONICAL_TOPDIR
969ORIGINAL_TOPDIR
970TOPDIR
971PATH_SEP
972ZERO_ARCHDEF
973HOTSPOT_BUILD_CPU_DEFINE
974HOTSPOT_BUILD_CPU_ARCH
975HOTSPOT_BUILD_CPU
976HOTSPOT_BUILD_OS_TYPE
977HOTSPOT_BUILD_OS
978OPENJDK_BUILD_BUNDLE_PLATFORM
979OPENJDK_BUILD_CPU_BUNDLE
980OPENJDK_BUILD_OS_BUNDLE
981OPENJDK_BUILD_OS_EXPORT_DIR
982OPENJDK_BUILD_CPU_JLI_CFLAGS
983OPENJDK_BUILD_CPU_OSARCH
984OPENJDK_BUILD_CPU_ISADIR
985OPENJDK_BUILD_CPU_LIBDIR
986OPENJDK_BUILD_CPU_LEGACY_LIB
987OPENJDK_BUILD_CPU_LEGACY
988HOTSPOT_TARGET_CPU_DEFINE
989HOTSPOT_TARGET_CPU_ARCH
990HOTSPOT_TARGET_CPU
991HOTSPOT_TARGET_OS_TYPE
992HOTSPOT_TARGET_OS
993DEFINE_CROSS_COMPILE_ARCH
994LP64
995OPENJDK_TARGET_BUNDLE_PLATFORM
996OPENJDK_TARGET_CPU_BUNDLE
997OPENJDK_TARGET_OS_BUNDLE
998OPENJDK_TARGET_OS_EXPORT_DIR
999OPENJDK_TARGET_CPU_JLI_CFLAGS
1000OPENJDK_TARGET_CPU_OSARCH
1001OPENJDK_TARGET_CPU_ISADIR
1002OPENJDK_TARGET_CPU_LIBDIR
1003OPENJDK_TARGET_CPU_LEGACY_LIB
1004OPENJDK_TARGET_CPU_LEGACY
1005REQUIRED_OS_VERSION
1006REQUIRED_OS_NAME
1007COMPILE_TYPE
1008OPENJDK_TARGET_CPU_ENDIAN
1009OPENJDK_TARGET_CPU_BITS
1010OPENJDK_TARGET_CPU_ARCH
1011OPENJDK_TARGET_CPU
1012OPENJDK_TARGET_OS_ENV
1013OPENJDK_TARGET_OS_TYPE
1014OPENJDK_TARGET_OS
1015OPENJDK_BUILD_CPU_ENDIAN
1016OPENJDK_BUILD_CPU_BITS
1017OPENJDK_BUILD_CPU_ARCH
1018OPENJDK_BUILD_CPU
1019OPENJDK_BUILD_OS_ENV
1020OPENJDK_BUILD_OS_TYPE
1021OPENJDK_BUILD_OS
1022OPENJDK_BUILD_AUTOCONF_NAME
1023OPENJDK_TARGET_AUTOCONF_NAME
1024target_os
1025target_vendor
1026target_cpu
1027target
1028host_os
1029host_vendor
1030host_cpu
1031host
1032build_os
1033build_vendor
1034build_cpu
1035build
1036NICE
1037CPIO
1038DF
1039READLINK
1040CYGPATH
1041SED
1042FGREP
1043EGREP
1044GREP
1045AWK
1046XARGS
1047WHICH
1048WC
1049UNIQ
1050UNAME
1051TR
1052TOUCH
1053TEE
1054TAR
1055TAIL
1056SORT
1057SH
1058RMDIR
1059RM
1060PRINTF
1061NAWK
1062MV
1063MKTEMP
1064MKDIR
1065LS
1066LN
1067GZIP
1068GUNZIP
1069HEAD
1070FIND
1071FILE
1072EXPR
1073ECHO
1074DIRNAME
1075DIFF
1076DATE
1077CUT
1078CP
1079COMM
1080CMP
1081CHMOD
1082CAT
1083BASH
1084BASENAME
1085DATE_WHEN_CONFIGURED
1086ORIGINAL_PATH
1087CONFIGURE_COMMAND_LINE
1088target_alias
1089host_alias
1090build_alias
1091LIBS
1092ECHO_T
1093ECHO_N
1094ECHO_C
1095DEFS
1096mandir
1097localedir
1098libdir
1099psdir
1100pdfdir
1101dvidir
1102htmldir
1103infodir
1104docdir
1105oldincludedir
1106includedir
1107localstatedir
1108sharedstatedir
1109sysconfdir
1110datadir
1111datarootdir
1112libexecdir
1113sbindir
1114bindir
1115program_transform_name
1116prefix
1117exec_prefix
1118PACKAGE_URL
1119PACKAGE_BUGREPORT
1120PACKAGE_STRING
1121PACKAGE_VERSION
1122PACKAGE_TARNAME
1123PACKAGE_NAME
1124PATH_SEPARATOR
1125SHELL'
1126ac_subst_files=''
1127ac_user_opts='
1128enable_option_checking
1129with_target_bits
1130enable_openjdk_only
1131with_custom_make_dir
1132with_jdk_variant
1133enable_debug
1134with_debug_level
1135with_jvm_variants
1136with_devkit
1137with_sys_root
1138with_sysroot
1139with_tools_dir
1140with_toolchain_path
1141with_extra_path
1142with_sdk_name
1143with_conf_name
1144with_output_sync
1145with_default_make_target
1146enable_headless_only
1147with_cacerts_file
1148enable_unlimited_crypto
1149with_copyright_year
1150enable_keep_packaged_modules
1151with_milestone
1152with_update_version
1153with_user_release_suffix
1154with_build_number
1155with_version_string
1156with_version_pre
1157with_version_opt
1158with_version_build
1159with_version_major
1160with_version_minor
1161with_version_security
1162with_version_patch
1163with_boot_jdk
1164with_build_jdk
1165with_add_source_root
1166with_override_source_root
1167with_adds_and_overrides
1168with_override_langtools
1169with_override_corba
1170with_override_jaxp
1171with_override_jaxws
1172with_override_hotspot
1173with_override_nashorn
1174with_override_jdk
1175with_import_hotspot
1176with_import_modules
1177enable_static_build
1178with_toolchain_type
1179with_extra_cflags
1180with_extra_cxxflags
1181with_extra_ldflags
1182with_toolchain_version
1183with_build_devkit
1184with_jtreg
1185enable_warnings_as_errors
1186with_native_debug_symbols
1187enable_debug_symbols
1188enable_zip_debug_info
1189enable_native_coverage
1190enable_dtrace
1191with_jvm_features
1192with_jvm_interpreter
1193enable_hotspot_gtest
1194with_stdc__lib
1195with_msvcr_dll
1196with_msvcp_dll
1197with_x
1198with_cups
1199with_cups_include
1200with_freetype
1201with_freetype_include
1202with_freetype_lib
1203with_freetype_src
1204enable_freetype_bundling
1205with_alsa
1206with_alsa_include
1207with_alsa_lib
1208with_libffi
1209with_libffi_include
1210with_libffi_lib
1211with_libjpeg
1212with_giflib
1213with_libpng
1214with_zlib
1215with_lcms
1216with_dxsdk
1217with_dxsdk_lib
1218with_dxsdk_include
1219enable_jtreg_failure_handler
1220enable_generate_classlist
1221with_num_cores
1222with_memory_size
1223with_jobs
1224with_test_jobs
1225with_boot_jdk_jvmargs
1226with_sjavac_server_java
1227enable_sjavac
1228enable_javac_server
1229enable_icecc
1230enable_precompiled_headers
1231enable_ccache
1232with_ccache_dir
1233'
1234      ac_precious_vars='build_alias
1235host_alias
1236target_alias
1237BASENAME
1238BASH
1239CAT
1240CHMOD
1241CMP
1242COMM
1243CP
1244CUT
1245DATE
1246DIFF
1247DIRNAME
1248ECHO
1249EXPR
1250FILE
1251FIND
1252HEAD
1253GUNZIP
1254GZIP
1255LN
1256LS
1257MKDIR
1258MKTEMP
1259MV
1260NAWK
1261PRINTF
1262RM
1263RMDIR
1264SH
1265SORT
1266TAIL
1267TAR
1268TEE
1269TOUCH
1270TR
1271UNAME
1272UNIQ
1273WC
1274WHICH
1275XARGS
1276AWK
1277GREP
1278EGREP
1279FGREP
1280SED
1281CYGPATH
1282READLINK
1283DF
1284CPIO
1285NICE
1286MAKE
1287UNZIP
1288ZIPEXE
1289LDD
1290OTOOL
1291READELF
1292HG
1293STAT
1294TIME
1295DTRACE
1296PATCH
1297DSYMUTIL
1298XATTR
1299CODESIGN
1300SETFILE
1301PKG_CONFIG
1302JAVA
1303JAVAC
1304JAVAH
1305JAR
1306JARSIGNER
1307CC
1308CFLAGS
1309LDFLAGS
1310LIBS
1311CPPFLAGS
1312CXX
1313CXXFLAGS
1314CCC
1315CPP
1316CXXCPP
1317AS
1318AR
1319LIPO
1320STRIP
1321NM
1322GNM
1323OBJCOPY
1324OBJDUMP
1325BUILD_CC
1326BUILD_CXX
1327BUILD_NM
1328BUILD_AR
1329BUILD_OBJCOPY
1330BUILD_STRIP
1331JTREGEXE
1332XMKMF
1333FREETYPE_CFLAGS
1334FREETYPE_LIBS
1335ALSA_CFLAGS
1336ALSA_LIBS
1337LIBFFI_CFLAGS
1338LIBFFI_LIBS
1339PNG_CFLAGS
1340PNG_LIBS
1341LCMS_CFLAGS
1342LCMS_LIBS
1343ICECC_CMD
1344ICECC_CREATE_ENV
1345ICECC_WRAPPER
1346CCACHE'
1347
1348
1349# Initialize some variables set by options.
1350ac_init_help=
1351ac_init_version=false
1352ac_unrecognized_opts=
1353ac_unrecognized_sep=
1354# The variables have the same names as the options, with
1355# dashes changed to underlines.
1356cache_file=/dev/null
1357exec_prefix=NONE
1358no_create=
1359no_recursion=
1360prefix=NONE
1361program_prefix=NONE
1362program_suffix=NONE
1363program_transform_name=s,x,x,
1364silent=
1365site=
1366srcdir=
1367verbose=
1368x_includes=NONE
1369x_libraries=NONE
1370
1371# Installation directory options.
1372# These are left unexpanded so users can "make install exec_prefix=/foo"
1373# and all the variables that are supposed to be based on exec_prefix
1374# by default will actually change.
1375# Use braces instead of parens because sh, perl, etc. also accept them.
1376# (The list follows the same order as the GNU Coding Standards.)
1377bindir='${exec_prefix}/bin'
1378sbindir='${exec_prefix}/sbin'
1379libexecdir='${exec_prefix}/libexec'
1380datarootdir='${prefix}/share'
1381datadir='${datarootdir}'
1382sysconfdir='${prefix}/etc'
1383sharedstatedir='${prefix}/com'
1384localstatedir='${prefix}/var'
1385includedir='${prefix}/include'
1386oldincludedir='/usr/include'
1387docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1388infodir='${datarootdir}/info'
1389htmldir='${docdir}'
1390dvidir='${docdir}'
1391pdfdir='${docdir}'
1392psdir='${docdir}'
1393libdir='${exec_prefix}/lib'
1394localedir='${datarootdir}/locale'
1395mandir='${datarootdir}/man'
1396
1397ac_prev=
1398ac_dashdash=
1399for ac_option
1400do
1401  # If the previous option needs an argument, assign it.
1402  if test -n "$ac_prev"; then
1403    eval $ac_prev=\$ac_option
1404    ac_prev=
1405    continue
1406  fi
1407
1408  case $ac_option in
1409  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1410  *=)   ac_optarg= ;;
1411  *)    ac_optarg=yes ;;
1412  esac
1413
1414  # Accept the important Cygnus configure options, so we can diagnose typos.
1415
1416  case $ac_dashdash$ac_option in
1417  --)
1418    ac_dashdash=yes ;;
1419
1420  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1421    ac_prev=bindir ;;
1422  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1423    bindir=$ac_optarg ;;
1424
1425  -build | --build | --buil | --bui | --bu)
1426    ac_prev=build_alias ;;
1427  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1428    build_alias=$ac_optarg ;;
1429
1430  -cache-file | --cache-file | --cache-fil | --cache-fi \
1431  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1432    ac_prev=cache_file ;;
1433  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1434  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1435    cache_file=$ac_optarg ;;
1436
1437  --config-cache | -C)
1438    cache_file=config.cache ;;
1439
1440  -datadir | --datadir | --datadi | --datad)
1441    ac_prev=datadir ;;
1442  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1443    datadir=$ac_optarg ;;
1444
1445  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1446  | --dataroo | --dataro | --datar)
1447    ac_prev=datarootdir ;;
1448  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1449  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1450    datarootdir=$ac_optarg ;;
1451
1452  -disable-* | --disable-*)
1453    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1454    # Reject names that are not valid shell variable names.
1455    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1456      as_fn_error $? "invalid feature name: $ac_useropt"
1457    ac_useropt_orig=$ac_useropt
1458    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1459    case $ac_user_opts in
1460      *"
1461"enable_$ac_useropt"
1462"*) ;;
1463      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1464	 ac_unrecognized_sep=', ';;
1465    esac
1466    eval enable_$ac_useropt=no ;;
1467
1468  -docdir | --docdir | --docdi | --doc | --do)
1469    ac_prev=docdir ;;
1470  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1471    docdir=$ac_optarg ;;
1472
1473  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1474    ac_prev=dvidir ;;
1475  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1476    dvidir=$ac_optarg ;;
1477
1478  -enable-* | --enable-*)
1479    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1480    # Reject names that are not valid shell variable names.
1481    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1482      as_fn_error $? "invalid feature name: $ac_useropt"
1483    ac_useropt_orig=$ac_useropt
1484    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1485    case $ac_user_opts in
1486      *"
1487"enable_$ac_useropt"
1488"*) ;;
1489      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1490	 ac_unrecognized_sep=', ';;
1491    esac
1492    eval enable_$ac_useropt=\$ac_optarg ;;
1493
1494  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1495  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1496  | --exec | --exe | --ex)
1497    ac_prev=exec_prefix ;;
1498  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1499  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1500  | --exec=* | --exe=* | --ex=*)
1501    exec_prefix=$ac_optarg ;;
1502
1503  -gas | --gas | --ga | --g)
1504    # Obsolete; use --with-gas.
1505    with_gas=yes ;;
1506
1507  -help | --help | --hel | --he | -h)
1508    ac_init_help=long ;;
1509  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1510    ac_init_help=recursive ;;
1511  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1512    ac_init_help=short ;;
1513
1514  -host | --host | --hos | --ho)
1515    ac_prev=host_alias ;;
1516  -host=* | --host=* | --hos=* | --ho=*)
1517    host_alias=$ac_optarg ;;
1518
1519  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1520    ac_prev=htmldir ;;
1521  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1522  | --ht=*)
1523    htmldir=$ac_optarg ;;
1524
1525  -includedir | --includedir | --includedi | --included | --include \
1526  | --includ | --inclu | --incl | --inc)
1527    ac_prev=includedir ;;
1528  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1529  | --includ=* | --inclu=* | --incl=* | --inc=*)
1530    includedir=$ac_optarg ;;
1531
1532  -infodir | --infodir | --infodi | --infod | --info | --inf)
1533    ac_prev=infodir ;;
1534  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1535    infodir=$ac_optarg ;;
1536
1537  -libdir | --libdir | --libdi | --libd)
1538    ac_prev=libdir ;;
1539  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1540    libdir=$ac_optarg ;;
1541
1542  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1543  | --libexe | --libex | --libe)
1544    ac_prev=libexecdir ;;
1545  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1546  | --libexe=* | --libex=* | --libe=*)
1547    libexecdir=$ac_optarg ;;
1548
1549  -localedir | --localedir | --localedi | --localed | --locale)
1550    ac_prev=localedir ;;
1551  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1552    localedir=$ac_optarg ;;
1553
1554  -localstatedir | --localstatedir | --localstatedi | --localstated \
1555  | --localstate | --localstat | --localsta | --localst | --locals)
1556    ac_prev=localstatedir ;;
1557  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1558  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1559    localstatedir=$ac_optarg ;;
1560
1561  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1562    ac_prev=mandir ;;
1563  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1564    mandir=$ac_optarg ;;
1565
1566  -nfp | --nfp | --nf)
1567    # Obsolete; use --without-fp.
1568    with_fp=no ;;
1569
1570  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1571  | --no-cr | --no-c | -n)
1572    no_create=yes ;;
1573
1574  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1575  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1576    no_recursion=yes ;;
1577
1578  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1579  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1580  | --oldin | --oldi | --old | --ol | --o)
1581    ac_prev=oldincludedir ;;
1582  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1583  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1584  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1585    oldincludedir=$ac_optarg ;;
1586
1587  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1588    ac_prev=prefix ;;
1589  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1590    prefix=$ac_optarg ;;
1591
1592  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1593  | --program-pre | --program-pr | --program-p)
1594    ac_prev=program_prefix ;;
1595  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1596  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1597    program_prefix=$ac_optarg ;;
1598
1599  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1600  | --program-suf | --program-su | --program-s)
1601    ac_prev=program_suffix ;;
1602  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1603  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1604    program_suffix=$ac_optarg ;;
1605
1606  -program-transform-name | --program-transform-name \
1607  | --program-transform-nam | --program-transform-na \
1608  | --program-transform-n | --program-transform- \
1609  | --program-transform | --program-transfor \
1610  | --program-transfo | --program-transf \
1611  | --program-trans | --program-tran \
1612  | --progr-tra | --program-tr | --program-t)
1613    ac_prev=program_transform_name ;;
1614  -program-transform-name=* | --program-transform-name=* \
1615  | --program-transform-nam=* | --program-transform-na=* \
1616  | --program-transform-n=* | --program-transform-=* \
1617  | --program-transform=* | --program-transfor=* \
1618  | --program-transfo=* | --program-transf=* \
1619  | --program-trans=* | --program-tran=* \
1620  | --progr-tra=* | --program-tr=* | --program-t=*)
1621    program_transform_name=$ac_optarg ;;
1622
1623  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1624    ac_prev=pdfdir ;;
1625  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1626    pdfdir=$ac_optarg ;;
1627
1628  -psdir | --psdir | --psdi | --psd | --ps)
1629    ac_prev=psdir ;;
1630  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1631    psdir=$ac_optarg ;;
1632
1633  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1634  | -silent | --silent | --silen | --sile | --sil)
1635    silent=yes ;;
1636
1637  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1638    ac_prev=sbindir ;;
1639  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1640  | --sbi=* | --sb=*)
1641    sbindir=$ac_optarg ;;
1642
1643  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1644  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1645  | --sharedst | --shareds | --shared | --share | --shar \
1646  | --sha | --sh)
1647    ac_prev=sharedstatedir ;;
1648  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1649  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1650  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1651  | --sha=* | --sh=*)
1652    sharedstatedir=$ac_optarg ;;
1653
1654  -site | --site | --sit)
1655    ac_prev=site ;;
1656  -site=* | --site=* | --sit=*)
1657    site=$ac_optarg ;;
1658
1659  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1660    ac_prev=srcdir ;;
1661  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1662    srcdir=$ac_optarg ;;
1663
1664  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1665  | --syscon | --sysco | --sysc | --sys | --sy)
1666    ac_prev=sysconfdir ;;
1667  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1668  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1669    sysconfdir=$ac_optarg ;;
1670
1671  -target | --target | --targe | --targ | --tar | --ta | --t)
1672    ac_prev=target_alias ;;
1673  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1674    target_alias=$ac_optarg ;;
1675
1676  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1677    verbose=yes ;;
1678
1679  -version | --version | --versio | --versi | --vers | -V)
1680    ac_init_version=: ;;
1681
1682  -with-* | --with-*)
1683    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1684    # Reject names that are not valid shell variable names.
1685    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1686      as_fn_error $? "invalid package name: $ac_useropt"
1687    ac_useropt_orig=$ac_useropt
1688    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1689    case $ac_user_opts in
1690      *"
1691"with_$ac_useropt"
1692"*) ;;
1693      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1694	 ac_unrecognized_sep=', ';;
1695    esac
1696    eval with_$ac_useropt=\$ac_optarg ;;
1697
1698  -without-* | --without-*)
1699    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1700    # Reject names that are not valid shell variable names.
1701    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1702      as_fn_error $? "invalid package name: $ac_useropt"
1703    ac_useropt_orig=$ac_useropt
1704    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1705    case $ac_user_opts in
1706      *"
1707"with_$ac_useropt"
1708"*) ;;
1709      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1710	 ac_unrecognized_sep=', ';;
1711    esac
1712    eval with_$ac_useropt=no ;;
1713
1714  --x)
1715    # Obsolete; use --with-x.
1716    with_x=yes ;;
1717
1718  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1719  | --x-incl | --x-inc | --x-in | --x-i)
1720    ac_prev=x_includes ;;
1721  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1722  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1723    x_includes=$ac_optarg ;;
1724
1725  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1726  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1727    ac_prev=x_libraries ;;
1728  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1729  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1730    x_libraries=$ac_optarg ;;
1731
1732  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1733Try \`$0 --help' for more information"
1734    ;;
1735
1736  *=*)
1737    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1738    # Reject names that are not valid shell variable names.
1739    case $ac_envvar in #(
1740      '' | [0-9]* | *[!_$as_cr_alnum]* )
1741      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1742    esac
1743    eval $ac_envvar=\$ac_optarg
1744    export $ac_envvar ;;
1745
1746  *)
1747    # FIXME: should be removed in autoconf 3.0.
1748    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1749    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1750      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1751    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1752    ;;
1753
1754  esac
1755done
1756
1757if test -n "$ac_prev"; then
1758  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1759  as_fn_error $? "missing argument to $ac_option"
1760fi
1761
1762if test -n "$ac_unrecognized_opts"; then
1763  case $enable_option_checking in
1764    no) ;;
1765    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1766    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1767  esac
1768fi
1769
1770# Check all directory arguments for consistency.
1771for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1772		datadir sysconfdir sharedstatedir localstatedir includedir \
1773		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1774		libdir localedir mandir
1775do
1776  eval ac_val=\$$ac_var
1777  # Remove trailing slashes.
1778  case $ac_val in
1779    */ )
1780      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1781      eval $ac_var=\$ac_val;;
1782  esac
1783  # Be sure to have absolute directory names.
1784  case $ac_val in
1785    [\\/$]* | ?:[\\/]* )  continue;;
1786    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1787  esac
1788  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1789done
1790
1791# There might be people who depend on the old broken behavior: `$host'
1792# used to hold the argument of --host etc.
1793# FIXME: To remove some day.
1794build=$build_alias
1795host=$host_alias
1796target=$target_alias
1797
1798# FIXME: To remove some day.
1799if test "x$host_alias" != x; then
1800  if test "x$build_alias" = x; then
1801    cross_compiling=maybe
1802  elif test "x$build_alias" != "x$host_alias"; then
1803    cross_compiling=yes
1804  fi
1805fi
1806
1807ac_tool_prefix=
1808test -n "$host_alias" && ac_tool_prefix=$host_alias-
1809
1810test "$silent" = yes && exec 6>/dev/null
1811
1812
1813ac_pwd=`pwd` && test -n "$ac_pwd" &&
1814ac_ls_di=`ls -di .` &&
1815ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1816  as_fn_error $? "working directory cannot be determined"
1817test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1818  as_fn_error $? "pwd does not report name of working directory"
1819
1820
1821# Find the source files, if location was not specified.
1822if test -z "$srcdir"; then
1823  ac_srcdir_defaulted=yes
1824  # Try the directory containing this script, then the parent directory.
1825  ac_confdir=`$as_dirname -- "$as_myself" ||
1826$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1827	 X"$as_myself" : 'X\(//\)[^/]' \| \
1828	 X"$as_myself" : 'X\(//\)$' \| \
1829	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1830$as_echo X"$as_myself" |
1831    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1832	    s//\1/
1833	    q
1834	  }
1835	  /^X\(\/\/\)[^/].*/{
1836	    s//\1/
1837	    q
1838	  }
1839	  /^X\(\/\/\)$/{
1840	    s//\1/
1841	    q
1842	  }
1843	  /^X\(\/\).*/{
1844	    s//\1/
1845	    q
1846	  }
1847	  s/.*/./; q'`
1848  srcdir=$ac_confdir
1849  if test ! -r "$srcdir/$ac_unique_file"; then
1850    srcdir=..
1851  fi
1852else
1853  ac_srcdir_defaulted=no
1854fi
1855if test ! -r "$srcdir/$ac_unique_file"; then
1856  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1857  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1858fi
1859ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1860ac_abs_confdir=`(
1861	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1862	pwd)`
1863# When building in place, set srcdir=.
1864if test "$ac_abs_confdir" = "$ac_pwd"; then
1865  srcdir=.
1866fi
1867# Remove unnecessary trailing slashes from srcdir.
1868# Double slashes in file names in object file debugging info
1869# mess up M-x gdb in Emacs.
1870case $srcdir in
1871*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1872esac
1873for ac_var in $ac_precious_vars; do
1874  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1875  eval ac_env_${ac_var}_value=\$${ac_var}
1876  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1877  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1878done
1879
1880#
1881# Report the --help message.
1882#
1883if test "$ac_init_help" = "long"; then
1884  # Omit some internal or obsolete options to make the list less imposing.
1885  # This message is too long to be a string in the A/UX 3.1 sh.
1886  cat <<_ACEOF
1887\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1888
1889Usage: $0 [OPTION]... [VAR=VALUE]...
1890
1891To assign environment variables (e.g., CC, CFLAGS...), specify them as
1892VAR=VALUE.  See below for descriptions of some of the useful variables.
1893
1894Defaults for the options are specified in brackets.
1895
1896Configuration:
1897  -h, --help              display this help and exit
1898      --help=short        display options specific to this package
1899      --help=recursive    display the short help of all the included packages
1900  -V, --version           display version information and exit
1901  -q, --quiet, --silent   do not print \`checking ...' messages
1902      --cache-file=FILE   cache test results in FILE [disabled]
1903  -C, --config-cache      alias for \`--cache-file=config.cache'
1904  -n, --no-create         do not create output files
1905      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1906
1907Installation directories:
1908  --prefix=PREFIX         install architecture-independent files in PREFIX
1909                          [$ac_default_prefix]
1910  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1911                          [PREFIX]
1912
1913By default, \`make install' will install all the files in
1914\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1915an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1916for instance \`--prefix=\$HOME'.
1917
1918For better control, use the options below.
1919
1920Fine tuning of the installation directories:
1921  --bindir=DIR            user executables [EPREFIX/bin]
1922  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1923  --libexecdir=DIR        program executables [EPREFIX/libexec]
1924  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1925  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1926  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1927  --libdir=DIR            object code libraries [EPREFIX/lib]
1928  --includedir=DIR        C header files [PREFIX/include]
1929  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1930  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1931  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1932  --infodir=DIR           info documentation [DATAROOTDIR/info]
1933  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1934  --mandir=DIR            man documentation [DATAROOTDIR/man]
1935  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1936  --htmldir=DIR           html documentation [DOCDIR]
1937  --dvidir=DIR            dvi documentation [DOCDIR]
1938  --pdfdir=DIR            pdf documentation [DOCDIR]
1939  --psdir=DIR             ps documentation [DOCDIR]
1940_ACEOF
1941
1942  cat <<\_ACEOF
1943
1944X features:
1945  --x-includes=DIR    X include files are in DIR
1946  --x-libraries=DIR   X library files are in DIR
1947
1948System types:
1949  --build=BUILD     configure for building on BUILD [guessed]
1950  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1951  --target=TARGET   configure for building compilers for TARGET [HOST]
1952_ACEOF
1953fi
1954
1955if test -n "$ac_init_help"; then
1956  case $ac_init_help in
1957     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1958   esac
1959  cat <<\_ACEOF
1960
1961Optional Features:
1962  --disable-option-checking  ignore unrecognized --enable/--with options
1963  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1964  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1965  --enable-openjdk-only   suppress building custom source even if present
1966                          [disabled]
1967  --enable-debug          set the debug level to fastdebug (shorthand for
1968                          --with-debug-level=fastdebug) [disabled]
1969  --enable-headless-only  only build headless (no GUI) support [disabled]
1970  --disable-unlimited-crypto
1971                          Disable unlimited crypto policy [enabled]
1972  --disable-keep-packaged-modules
1973                          Do not keep packaged modules in jdk image [enable]
1974  --enable-static-build   enable static library build [disabled]
1975  --disable-warnings-as-errors
1976                          do not consider native warnings to be an error
1977                          [enabled]
1978  --enable-debug-symbols  Deprecated. Option is kept for backwards
1979                          compatibility and is ignored
1980  --enable-zip-debug-info Deprecated. Option is kept for backwards
1981                          compatibility and is ignored
1982  --enable-native-coverage
1983                          enable native compilation with code coverage
1984                          data[disabled]
1985  --enable-dtrace[=yes/no/auto]
1986                          enable dtrace. Default is auto, where dtrace is
1987                          enabled if all dependencies are present.
1988  --disable-hotspot-gtest Disables building of the Hotspot unit tests
1989  --disable-freetype-bundling
1990                          disable bundling of the freetype library with the
1991                          build result [enabled on Windows or when using
1992                          --with-freetype, disabled otherwise]
1993  --enable-jtreg-failure-handler
1994                          forces build of the jtreg failure handler to be
1995                          enabled, missing dependencies become fatal errors.
1996                          Default is auto, where the failure handler is built
1997                          if all dependencies are present and otherwise just
1998                          disabled.
1999  --disable-generate-classlist
2000                          forces enabling or disabling of the generation of a
2001                          CDS classlist at build time. Default is to generate
2002                          it when either the server or client JVMs are built.
2003  --enable-sjavac         use sjavac to do fast incremental compiles
2004                          [disabled]
2005  --disable-javac-server  disable javac server [enabled]
2006  --enable-icecc          enable distribted compilation of native code using
2007                          icecc/icecream [disabled]
2008  --disable-precompiled-headers
2009                          disable using precompiled headers when compiling C++
2010                          [enabled]
2011  --enable-ccache         enable using ccache to speed up recompilations
2012                          [disabled]
2013
2014Optional Packages:
2015  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2016  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2017  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
2018                          support it), e.g. --with-target-bits=32 [guessed]
2019  --with-custom-make-dir  Deprecated. Option is kept for backwards
2020                          compatibility and is ignored
2021  --with-jdk-variant      JDK variant to build (normal) [normal]
2022  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
2023                          optimized) [release]
2024  --with-jvm-variants     JVM variants (separated by commas) to build
2025                          (server,client,minimal,core,zero,zeroshark,custom)
2026                          [server]
2027  --with-devkit           use this devkit for compilers, tools and resources
2028  --with-sys-root         alias for --with-sysroot for backwards compatability
2029  --with-sysroot          use this directory as sysroot
2030  --with-tools-dir        alias for --with-toolchain-path for backwards
2031                          compatibility
2032  --with-toolchain-path   prepend these directories when searching for
2033                          toolchain binaries (compilers etc)
2034  --with-extra-path       prepend these directories to the default path
2035  --with-sdk-name         use the platform SDK of the given name. [macosx]
2036  --with-conf-name        use this as the name of the configuration [generated
2037                          from important configuration options]
2038  --with-output-sync      set make output sync type if supported by make.
2039                          [recurse]
2040  --with-default-make-target
2041                          set the default make target [exploded-image]
2042  --with-cacerts-file     specify alternative cacerts file
2043  --with-copyright-year   Set copyright year value for build [current year]
2044  --with-milestone        Deprecated. Option is kept for backwards
2045                          compatibility and is ignored
2046  --with-update-version   Deprecated. Option is kept for backwards
2047                          compatibility and is ignored
2048  --with-user-release-suffix
2049                          Deprecated. Option is kept for backwards
2050                          compatibility and is ignored
2051  --with-build-number     Deprecated. Option is kept for backwards
2052                          compatibility and is ignored
2053  --with-version-string   Set version string [calculated]
2054  --with-version-pre      Set the base part of the version 'PRE' field
2055                          (pre-release identifier) ['internal']
2056  --with-version-opt      Set version 'OPT' field (build metadata)
2057                          [<timestamp>.<user>.<dirname>]
2058  --with-version-build    Set version 'BUILD' field (build number) [not
2059                          specified]
2060  --with-version-major    Set version 'MAJOR' field (first number) [current
2061                          source value]
2062  --with-version-minor    Set version 'MINOR' field (second number) [current
2063                          source value]
2064  --with-version-security Set version 'SECURITY' field (third number) [current
2065                          source value]
2066  --with-version-patch    Set version 'PATCH' field (fourth number) [not
2067                          specified]
2068  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2069  --with-build-jdk        path to JDK of same version as is being built[the
2070                          newly built JDK]
2071  --with-add-source-root  Deprecated. Option is kept for backwards
2072                          compatibility and is ignored
2073  --with-override-source-root
2074                          Deprecated. Option is kept for backwards
2075                          compatibility and is ignored
2076  --with-adds-and-overrides
2077                          Deprecated. Option is kept for backwards
2078                          compatibility and is ignored
2079  --with-override-langtools
2080                          Deprecated. Option is kept for backwards
2081                          compatibility and is ignored
2082  --with-override-corba   Deprecated. Option is kept for backwards
2083                          compatibility and is ignored
2084  --with-override-jaxp    Deprecated. Option is kept for backwards
2085                          compatibility and is ignored
2086  --with-override-jaxws   Deprecated. Option is kept for backwards
2087                          compatibility and is ignored
2088  --with-override-hotspot Deprecated. Option is kept for backwards
2089                          compatibility and is ignored
2090  --with-override-nashorn Deprecated. Option is kept for backwards
2091                          compatibility and is ignored
2092  --with-override-jdk     Deprecated. Option is kept for backwards
2093                          compatibility and is ignored
2094  --with-import-hotspot   import hotspot binaries from this jdk image or
2095                          hotspot build dist dir instead of building from
2096                          source
2097  --with-import-modules   import a set of prebuilt modules either as a zip
2098                          file or an exploded directory
2099  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2100                          to show possible values [platform dependent]
2101  --with-extra-cflags     extra flags to be used when compiling jdk c-files
2102  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2103  --with-extra-ldflags    extra flags to be used when linking jdk
2104  --with-toolchain-version
2105                          the version of the toolchain to look for, use
2106                          '--help' to show possible values [platform
2107                          dependent]
2108  --with-build-devkit     Devkit to use for the build platform toolchain
2109  --with-jtreg            Regression Test Harness [probed]
2110  --with-native-debug-symbols
2111                          set the native debug symbol configuration (none,
2112                          internal, external, zipped) [varying]
2113  --with-jvm-features     additional JVM features to enable (separated by
2114                          comma), use '--help' to show possible values [none]
2115  --with-jvm-interpreter  Deprecated. Option is kept for backwards
2116                          compatibility and is ignored
2117  --with-stdc++lib=<static>,<dynamic>,<default>
2118                          force linking of the C++ runtime on Linux to either
2119                          static or dynamic, default is static with dynamic as
2120                          fallback
2121  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2122                          (Windows only) [probed]
2123  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2124                          (Windows only) [probed]
2125  --with-x                use the X Window System
2126  --with-cups             specify prefix directory for the cups package
2127                          (expecting the headers under PATH/include)
2128  --with-cups-include     specify directory for the cups include files
2129  --with-freetype         specify prefix directory for the freetype package
2130                          (expecting the libraries under PATH/lib and the
2131                          headers under PATH/include)
2132  --with-freetype-include specify directory for the freetype include files
2133  --with-freetype-lib     specify directory for the freetype library
2134  --with-freetype-src     specify directory with freetype sources to
2135                          automatically build the library (experimental,
2136                          Windows-only)
2137  --with-alsa             specify prefix directory for the alsa package
2138                          (expecting the libraries under PATH/lib and the
2139                          headers under PATH/include)
2140  --with-alsa-include     specify directory for the alsa include files
2141  --with-alsa-lib         specify directory for the alsa library
2142  --with-libffi           specify prefix directory for the libffi package
2143                          (expecting the libraries under PATH/lib and the
2144                          headers under PATH/include)
2145  --with-libffi-include   specify directory for the libffi include files
2146  --with-libffi-lib       specify directory for the libffi library
2147  --with-libjpeg          use libjpeg from build system or OpenJDK source
2148                          (system, bundled) [bundled]
2149  --with-giflib           use giflib from build system or OpenJDK source
2150                          (system, bundled) [bundled]
2151  --with-libpng           use libpng from build system or OpenJDK source
2152                          (system, bundled) [bundled]
2153  --with-zlib             use zlib from build system or OpenJDK source
2154                          (system, bundled) [bundled]
2155  --with-lcms             use lcms2 from build system or OpenJDK source
2156                          (system, bundled) [bundled]
2157  --with-dxsdk            Deprecated. Option is kept for backwards
2158                          compatibility and is ignored
2159  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2160                          compatibility and is ignored
2161  --with-dxsdk-include    Deprecated. Option is kept for backwards
2162                          compatibility and is ignored
2163  --with-num-cores        number of cores in the build system, e.g.
2164                          --with-num-cores=8 [probed]
2165  --with-memory-size      memory (in MB) available in the build system, e.g.
2166                          --with-memory-size=1024 [probed]
2167  --with-jobs             number of parallel jobs to let make run [calculated
2168                          based on cores and memory]
2169  --with-test-jobs        number of parallel tests jobs to run [based on build
2170                          jobs]
2171  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2172                          invocations of boot JDK, overriding the default
2173                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2174                          -enableassertions"
2175  --with-sjavac-server-java
2176                          use this java binary for running the sjavac
2177                          background server [Boot JDK java]
2178  --with-ccache-dir       where to store ccache files [~/.ccache]
2179
2180Some influential environment variables:
2181  BASENAME    Override default value for BASENAME
2182  BASH        Override default value for BASH
2183  CAT         Override default value for CAT
2184  CHMOD       Override default value for CHMOD
2185  CMP         Override default value for CMP
2186  COMM        Override default value for COMM
2187  CP          Override default value for CP
2188  CUT         Override default value for CUT
2189  DATE        Override default value for DATE
2190  DIFF        Override default value for DIFF
2191  DIRNAME     Override default value for DIRNAME
2192  ECHO        Override default value for ECHO
2193  EXPR        Override default value for EXPR
2194  FILE        Override default value for FILE
2195  FIND        Override default value for FIND
2196  HEAD        Override default value for HEAD
2197  GUNZIP      Override default value for GUNZIP
2198  GZIP        Override default value for GZIP
2199  LN          Override default value for LN
2200  LS          Override default value for LS
2201  MKDIR       Override default value for MKDIR
2202  MKTEMP      Override default value for MKTEMP
2203  MV          Override default value for MV
2204  NAWK        Override default value for NAWK
2205  PRINTF      Override default value for PRINTF
2206  RM          Override default value for RM
2207  RMDIR       Override default value for RMDIR
2208  SH          Override default value for SH
2209  SORT        Override default value for SORT
2210  TAIL        Override default value for TAIL
2211  TAR         Override default value for TAR
2212  TEE         Override default value for TEE
2213  TOUCH       Override default value for TOUCH
2214  TR          Override default value for TR
2215  UNAME       Override default value for UNAME
2216  UNIQ        Override default value for UNIQ
2217  WC          Override default value for WC
2218  WHICH       Override default value for WHICH
2219  XARGS       Override default value for XARGS
2220  AWK         Override default value for AWK
2221  GREP        Override default value for GREP
2222  EGREP       Override default value for EGREP
2223  FGREP       Override default value for FGREP
2224  SED         Override default value for SED
2225  CYGPATH     Override default value for CYGPATH
2226  READLINK    Override default value for READLINK
2227  DF          Override default value for DF
2228  CPIO        Override default value for CPIO
2229  NICE        Override default value for NICE
2230  MAKE        Override default value for MAKE
2231  UNZIP       Override default value for UNZIP
2232  ZIPEXE      Override default value for ZIPEXE
2233  LDD         Override default value for LDD
2234  OTOOL       Override default value for OTOOL
2235  READELF     Override default value for READELF
2236  HG          Override default value for HG
2237  STAT        Override default value for STAT
2238  TIME        Override default value for TIME
2239  DTRACE      Override default value for DTRACE
2240  PATCH       Override default value for PATCH
2241  DSYMUTIL    Override default value for DSYMUTIL
2242  XATTR       Override default value for XATTR
2243  CODESIGN    Override default value for CODESIGN
2244  SETFILE     Override default value for SETFILE
2245  PKG_CONFIG  path to pkg-config utility
2246  JAVA        Override default value for JAVA
2247  JAVAC       Override default value for JAVAC
2248  JAVAH       Override default value for JAVAH
2249  JAR         Override default value for JAR
2250  JARSIGNER   Override default value for JARSIGNER
2251  CC          C compiler command
2252  CFLAGS      C compiler flags
2253  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2254              nonstandard directory <lib dir>
2255  LIBS        libraries to pass to the linker, e.g. -l<library>
2256  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2257              you have headers in a nonstandard directory <include dir>
2258  CXX         C++ compiler command
2259  CXXFLAGS    C++ compiler flags
2260  CPP         C preprocessor
2261  CXXCPP      C++ preprocessor
2262  AS          Override default value for AS
2263  AR          Override default value for AR
2264  LIPO        Override default value for LIPO
2265  STRIP       Override default value for STRIP
2266  NM          Override default value for NM
2267  GNM         Override default value for GNM
2268  OBJCOPY     Override default value for OBJCOPY
2269  OBJDUMP     Override default value for OBJDUMP
2270  BUILD_CC    Override default value for BUILD_CC
2271  BUILD_CXX   Override default value for BUILD_CXX
2272  BUILD_NM    Override default value for BUILD_NM
2273  BUILD_AR    Override default value for BUILD_AR
2274  BUILD_OBJCOPY
2275              Override default value for BUILD_OBJCOPY
2276  BUILD_STRIP Override default value for BUILD_STRIP
2277  JTREGEXE    Override default value for JTREGEXE
2278  XMKMF       Path to xmkmf, Makefile generator for X Window System
2279  FREETYPE_CFLAGS
2280              C compiler flags for FREETYPE, overriding pkg-config
2281  FREETYPE_LIBS
2282              linker flags for FREETYPE, overriding pkg-config
2283  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2284  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2285  LIBFFI_CFLAGS
2286              C compiler flags for LIBFFI, overriding pkg-config
2287  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2288  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2289  PNG_LIBS    linker flags for PNG, overriding pkg-config
2290  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2291  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2292  ICECC_CMD   Override default value for ICECC_CMD
2293  ICECC_CREATE_ENV
2294              Override default value for ICECC_CREATE_ENV
2295  ICECC_WRAPPER
2296              Override default value for ICECC_WRAPPER
2297  CCACHE      Override default value for CCACHE
2298
2299Use these variables to override the choices made by `configure' or to help
2300it to find libraries and programs with nonstandard names/locations.
2301
2302Report bugs to <build-dev@openjdk.java.net>.
2303OpenJDK home page: <http://openjdk.java.net>.
2304_ACEOF
2305ac_status=$?
2306fi
2307
2308if test "$ac_init_help" = "recursive"; then
2309  # If there are subdirs, report their specific --help.
2310  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2311    test -d "$ac_dir" ||
2312      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2313      continue
2314    ac_builddir=.
2315
2316case "$ac_dir" in
2317.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2318*)
2319  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2320  # A ".." for each directory in $ac_dir_suffix.
2321  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2322  case $ac_top_builddir_sub in
2323  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2324  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2325  esac ;;
2326esac
2327ac_abs_top_builddir=$ac_pwd
2328ac_abs_builddir=$ac_pwd$ac_dir_suffix
2329# for backward compatibility:
2330ac_top_builddir=$ac_top_build_prefix
2331
2332case $srcdir in
2333  .)  # We are building in place.
2334    ac_srcdir=.
2335    ac_top_srcdir=$ac_top_builddir_sub
2336    ac_abs_top_srcdir=$ac_pwd ;;
2337  [\\/]* | ?:[\\/]* )  # Absolute name.
2338    ac_srcdir=$srcdir$ac_dir_suffix;
2339    ac_top_srcdir=$srcdir
2340    ac_abs_top_srcdir=$srcdir ;;
2341  *) # Relative name.
2342    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2343    ac_top_srcdir=$ac_top_build_prefix$srcdir
2344    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2345esac
2346ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2347
2348    cd "$ac_dir" || { ac_status=$?; continue; }
2349    # Check for guested configure.
2350    if test -f "$ac_srcdir/configure.gnu"; then
2351      echo &&
2352      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2353    elif test -f "$ac_srcdir/configure"; then
2354      echo &&
2355      $SHELL "$ac_srcdir/configure" --help=recursive
2356    else
2357      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2358    fi || ac_status=$?
2359    cd "$ac_pwd" || { ac_status=$?; break; }
2360  done
2361fi
2362
2363test -n "$ac_init_help" && exit $ac_status
2364if $ac_init_version; then
2365  cat <<\_ACEOF
2366OpenJDK configure jdk9
2367generated by GNU Autoconf 2.69
2368
2369Copyright (C) 2012 Free Software Foundation, Inc.
2370This configure script is free software; the Free Software Foundation
2371gives unlimited permission to copy, distribute and modify it.
2372_ACEOF
2373  exit
2374fi
2375
2376## ------------------------ ##
2377## Autoconf initialization. ##
2378## ------------------------ ##
2379
2380# ac_fn_c_try_compile LINENO
2381# --------------------------
2382# Try to compile conftest.$ac_ext, and return whether this succeeded.
2383ac_fn_c_try_compile ()
2384{
2385  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2386  rm -f conftest.$ac_objext
2387  if { { ac_try="$ac_compile"
2388case "(($ac_try" in
2389  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2390  *) ac_try_echo=$ac_try;;
2391esac
2392eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2393$as_echo "$ac_try_echo"; } >&5
2394  (eval "$ac_compile") 2>conftest.err
2395  ac_status=$?
2396  if test -s conftest.err; then
2397    grep -v '^ *+' conftest.err >conftest.er1
2398    cat conftest.er1 >&5
2399    mv -f conftest.er1 conftest.err
2400  fi
2401  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2402  test $ac_status = 0; } && {
2403	 test -z "$ac_c_werror_flag" ||
2404	 test ! -s conftest.err
2405       } && test -s conftest.$ac_objext; then :
2406  ac_retval=0
2407else
2408  $as_echo "$as_me: failed program was:" >&5
2409sed 's/^/| /' conftest.$ac_ext >&5
2410
2411	ac_retval=1
2412fi
2413  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2414  as_fn_set_status $ac_retval
2415
2416} # ac_fn_c_try_compile
2417
2418# ac_fn_cxx_try_compile LINENO
2419# ----------------------------
2420# Try to compile conftest.$ac_ext, and return whether this succeeded.
2421ac_fn_cxx_try_compile ()
2422{
2423  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2424  rm -f conftest.$ac_objext
2425  if { { ac_try="$ac_compile"
2426case "(($ac_try" in
2427  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2428  *) ac_try_echo=$ac_try;;
2429esac
2430eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2431$as_echo "$ac_try_echo"; } >&5
2432  (eval "$ac_compile") 2>conftest.err
2433  ac_status=$?
2434  if test -s conftest.err; then
2435    grep -v '^ *+' conftest.err >conftest.er1
2436    cat conftest.er1 >&5
2437    mv -f conftest.er1 conftest.err
2438  fi
2439  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2440  test $ac_status = 0; } && {
2441	 test -z "$ac_cxx_werror_flag" ||
2442	 test ! -s conftest.err
2443       } && test -s conftest.$ac_objext; then :
2444  ac_retval=0
2445else
2446  $as_echo "$as_me: failed program was:" >&5
2447sed 's/^/| /' conftest.$ac_ext >&5
2448
2449	ac_retval=1
2450fi
2451  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2452  as_fn_set_status $ac_retval
2453
2454} # ac_fn_cxx_try_compile
2455
2456# ac_fn_c_try_cpp LINENO
2457# ----------------------
2458# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2459ac_fn_c_try_cpp ()
2460{
2461  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2462  if { { ac_try="$ac_cpp conftest.$ac_ext"
2463case "(($ac_try" in
2464  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2465  *) ac_try_echo=$ac_try;;
2466esac
2467eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2468$as_echo "$ac_try_echo"; } >&5
2469  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2470  ac_status=$?
2471  if test -s conftest.err; then
2472    grep -v '^ *+' conftest.err >conftest.er1
2473    cat conftest.er1 >&5
2474    mv -f conftest.er1 conftest.err
2475  fi
2476  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2477  test $ac_status = 0; } > conftest.i && {
2478	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2479	 test ! -s conftest.err
2480       }; then :
2481  ac_retval=0
2482else
2483  $as_echo "$as_me: failed program was:" >&5
2484sed 's/^/| /' conftest.$ac_ext >&5
2485
2486    ac_retval=1
2487fi
2488  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2489  as_fn_set_status $ac_retval
2490
2491} # ac_fn_c_try_cpp
2492
2493# ac_fn_cxx_try_cpp LINENO
2494# ------------------------
2495# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2496ac_fn_cxx_try_cpp ()
2497{
2498  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2499  if { { ac_try="$ac_cpp conftest.$ac_ext"
2500case "(($ac_try" in
2501  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2502  *) ac_try_echo=$ac_try;;
2503esac
2504eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2505$as_echo "$ac_try_echo"; } >&5
2506  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2507  ac_status=$?
2508  if test -s conftest.err; then
2509    grep -v '^ *+' conftest.err >conftest.er1
2510    cat conftest.er1 >&5
2511    mv -f conftest.er1 conftest.err
2512  fi
2513  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2514  test $ac_status = 0; } > conftest.i && {
2515	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2516	 test ! -s conftest.err
2517       }; then :
2518  ac_retval=0
2519else
2520  $as_echo "$as_me: failed program was:" >&5
2521sed 's/^/| /' conftest.$ac_ext >&5
2522
2523    ac_retval=1
2524fi
2525  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2526  as_fn_set_status $ac_retval
2527
2528} # ac_fn_cxx_try_cpp
2529
2530# ac_fn_c_try_link LINENO
2531# -----------------------
2532# Try to link conftest.$ac_ext, and return whether this succeeded.
2533ac_fn_c_try_link ()
2534{
2535  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2536  rm -f conftest.$ac_objext conftest$ac_exeext
2537  if { { ac_try="$ac_link"
2538case "(($ac_try" in
2539  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2540  *) ac_try_echo=$ac_try;;
2541esac
2542eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2543$as_echo "$ac_try_echo"; } >&5
2544  (eval "$ac_link") 2>conftest.err
2545  ac_status=$?
2546  if test -s conftest.err; then
2547    grep -v '^ *+' conftest.err >conftest.er1
2548    cat conftest.er1 >&5
2549    mv -f conftest.er1 conftest.err
2550  fi
2551  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2552  test $ac_status = 0; } && {
2553	 test -z "$ac_c_werror_flag" ||
2554	 test ! -s conftest.err
2555       } && test -s conftest$ac_exeext && {
2556	 test "$cross_compiling" = yes ||
2557	 test -x conftest$ac_exeext
2558       }; then :
2559  ac_retval=0
2560else
2561  $as_echo "$as_me: failed program was:" >&5
2562sed 's/^/| /' conftest.$ac_ext >&5
2563
2564	ac_retval=1
2565fi
2566  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2567  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2568  # interfere with the next link command; also delete a directory that is
2569  # left behind by Apple's compiler.  We do this before executing the actions.
2570  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2571  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2572  as_fn_set_status $ac_retval
2573
2574} # ac_fn_c_try_link
2575
2576# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2577# ---------------------------------------------------------
2578# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2579# the include files in INCLUDES and setting the cache variable VAR
2580# accordingly.
2581ac_fn_cxx_check_header_mongrel ()
2582{
2583  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2584  if eval \${$3+:} false; then :
2585  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2586$as_echo_n "checking for $2... " >&6; }
2587if eval \${$3+:} false; then :
2588  $as_echo_n "(cached) " >&6
2589fi
2590eval ac_res=\$$3
2591	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2592$as_echo "$ac_res" >&6; }
2593else
2594  # Is the header compilable?
2595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2596$as_echo_n "checking $2 usability... " >&6; }
2597cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2598/* end confdefs.h.  */
2599$4
2600#include <$2>
2601_ACEOF
2602if ac_fn_cxx_try_compile "$LINENO"; then :
2603  ac_header_compiler=yes
2604else
2605  ac_header_compiler=no
2606fi
2607rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2609$as_echo "$ac_header_compiler" >&6; }
2610
2611# Is the header present?
2612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2613$as_echo_n "checking $2 presence... " >&6; }
2614cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2615/* end confdefs.h.  */
2616#include <$2>
2617_ACEOF
2618if ac_fn_cxx_try_cpp "$LINENO"; then :
2619  ac_header_preproc=yes
2620else
2621  ac_header_preproc=no
2622fi
2623rm -f conftest.err conftest.i conftest.$ac_ext
2624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2625$as_echo "$ac_header_preproc" >&6; }
2626
2627# So?  What about this header?
2628case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2629  yes:no: )
2630    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2631$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2632    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2633$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2634    ;;
2635  no:yes:* )
2636    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2637$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2638    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2639$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2640    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2641$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2642    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2643$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2644    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2645$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2646( $as_echo "## ----------------------------------------- ##
2647## Report this to build-dev@openjdk.java.net ##
2648## ----------------------------------------- ##"
2649     ) | sed "s/^/$as_me: WARNING:     /" >&2
2650    ;;
2651esac
2652  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2653$as_echo_n "checking for $2... " >&6; }
2654if eval \${$3+:} false; then :
2655  $as_echo_n "(cached) " >&6
2656else
2657  eval "$3=\$ac_header_compiler"
2658fi
2659eval ac_res=\$$3
2660	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2661$as_echo "$ac_res" >&6; }
2662fi
2663  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2664
2665} # ac_fn_cxx_check_header_mongrel
2666
2667# ac_fn_cxx_try_run LINENO
2668# ------------------------
2669# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2670# that executables *can* be run.
2671ac_fn_cxx_try_run ()
2672{
2673  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2674  if { { ac_try="$ac_link"
2675case "(($ac_try" in
2676  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2677  *) ac_try_echo=$ac_try;;
2678esac
2679eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2680$as_echo "$ac_try_echo"; } >&5
2681  (eval "$ac_link") 2>&5
2682  ac_status=$?
2683  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2684  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2685  { { case "(($ac_try" in
2686  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2687  *) ac_try_echo=$ac_try;;
2688esac
2689eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2690$as_echo "$ac_try_echo"; } >&5
2691  (eval "$ac_try") 2>&5
2692  ac_status=$?
2693  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2694  test $ac_status = 0; }; }; then :
2695  ac_retval=0
2696else
2697  $as_echo "$as_me: program exited with status $ac_status" >&5
2698       $as_echo "$as_me: failed program was:" >&5
2699sed 's/^/| /' conftest.$ac_ext >&5
2700
2701       ac_retval=$ac_status
2702fi
2703  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2704  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2705  as_fn_set_status $ac_retval
2706
2707} # ac_fn_cxx_try_run
2708
2709# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2710# ---------------------------------------------------------
2711# Tests whether HEADER exists and can be compiled using the include files in
2712# INCLUDES, setting the cache variable VAR accordingly.
2713ac_fn_cxx_check_header_compile ()
2714{
2715  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2716  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2717$as_echo_n "checking for $2... " >&6; }
2718if eval \${$3+:} false; then :
2719  $as_echo_n "(cached) " >&6
2720else
2721  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2722/* end confdefs.h.  */
2723$4
2724#include <$2>
2725_ACEOF
2726if ac_fn_cxx_try_compile "$LINENO"; then :
2727  eval "$3=yes"
2728else
2729  eval "$3=no"
2730fi
2731rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2732fi
2733eval ac_res=\$$3
2734	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2735$as_echo "$ac_res" >&6; }
2736  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2737
2738} # ac_fn_cxx_check_header_compile
2739
2740# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2741# ----------------------------------------------
2742# Tries to find the compile-time value of EXPR in a program that includes
2743# INCLUDES, setting VAR accordingly. Returns whether the value could be
2744# computed
2745ac_fn_cxx_compute_int ()
2746{
2747  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2748  if test "$cross_compiling" = yes; then
2749    # Depending upon the size, compute the lo and hi bounds.
2750cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2751/* end confdefs.h.  */
2752$4
2753int
2754main ()
2755{
2756static int test_array [1 - 2 * !(($2) >= 0)];
2757test_array [0] = 0;
2758return test_array [0];
2759
2760  ;
2761  return 0;
2762}
2763_ACEOF
2764if ac_fn_cxx_try_compile "$LINENO"; then :
2765  ac_lo=0 ac_mid=0
2766  while :; do
2767    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2768/* end confdefs.h.  */
2769$4
2770int
2771main ()
2772{
2773static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2774test_array [0] = 0;
2775return test_array [0];
2776
2777  ;
2778  return 0;
2779}
2780_ACEOF
2781if ac_fn_cxx_try_compile "$LINENO"; then :
2782  ac_hi=$ac_mid; break
2783else
2784  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2785			if test $ac_lo -le $ac_mid; then
2786			  ac_lo= ac_hi=
2787			  break
2788			fi
2789			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2790fi
2791rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2792  done
2793else
2794  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2795/* end confdefs.h.  */
2796$4
2797int
2798main ()
2799{
2800static int test_array [1 - 2 * !(($2) < 0)];
2801test_array [0] = 0;
2802return test_array [0];
2803
2804  ;
2805  return 0;
2806}
2807_ACEOF
2808if ac_fn_cxx_try_compile "$LINENO"; then :
2809  ac_hi=-1 ac_mid=-1
2810  while :; do
2811    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2812/* end confdefs.h.  */
2813$4
2814int
2815main ()
2816{
2817static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2818test_array [0] = 0;
2819return test_array [0];
2820
2821  ;
2822  return 0;
2823}
2824_ACEOF
2825if ac_fn_cxx_try_compile "$LINENO"; then :
2826  ac_lo=$ac_mid; break
2827else
2828  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2829			if test $ac_mid -le $ac_hi; then
2830			  ac_lo= ac_hi=
2831			  break
2832			fi
2833			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2834fi
2835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2836  done
2837else
2838  ac_lo= ac_hi=
2839fi
2840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2841fi
2842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2843# Binary search between lo and hi bounds.
2844while test "x$ac_lo" != "x$ac_hi"; do
2845  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2846  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2847/* end confdefs.h.  */
2848$4
2849int
2850main ()
2851{
2852static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2853test_array [0] = 0;
2854return test_array [0];
2855
2856  ;
2857  return 0;
2858}
2859_ACEOF
2860if ac_fn_cxx_try_compile "$LINENO"; then :
2861  ac_hi=$ac_mid
2862else
2863  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2864fi
2865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2866done
2867case $ac_lo in #((
2868?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2869'') ac_retval=1 ;;
2870esac
2871  else
2872    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2873/* end confdefs.h.  */
2874$4
2875static long int longval () { return $2; }
2876static unsigned long int ulongval () { return $2; }
2877#include <stdio.h>
2878#include <stdlib.h>
2879int
2880main ()
2881{
2882
2883  FILE *f = fopen ("conftest.val", "w");
2884  if (! f)
2885    return 1;
2886  if (($2) < 0)
2887    {
2888      long int i = longval ();
2889      if (i != ($2))
2890	return 1;
2891      fprintf (f, "%ld", i);
2892    }
2893  else
2894    {
2895      unsigned long int i = ulongval ();
2896      if (i != ($2))
2897	return 1;
2898      fprintf (f, "%lu", i);
2899    }
2900  /* Do not output a trailing newline, as this causes \r\n confusion
2901     on some platforms.  */
2902  return ferror (f) || fclose (f) != 0;
2903
2904  ;
2905  return 0;
2906}
2907_ACEOF
2908if ac_fn_cxx_try_run "$LINENO"; then :
2909  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2910else
2911  ac_retval=1
2912fi
2913rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2914  conftest.$ac_objext conftest.beam conftest.$ac_ext
2915rm -f conftest.val
2916
2917  fi
2918  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2919  as_fn_set_status $ac_retval
2920
2921} # ac_fn_cxx_compute_int
2922
2923# ac_fn_cxx_try_link LINENO
2924# -------------------------
2925# Try to link conftest.$ac_ext, and return whether this succeeded.
2926ac_fn_cxx_try_link ()
2927{
2928  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2929  rm -f conftest.$ac_objext conftest$ac_exeext
2930  if { { ac_try="$ac_link"
2931case "(($ac_try" in
2932  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2933  *) ac_try_echo=$ac_try;;
2934esac
2935eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2936$as_echo "$ac_try_echo"; } >&5
2937  (eval "$ac_link") 2>conftest.err
2938  ac_status=$?
2939  if test -s conftest.err; then
2940    grep -v '^ *+' conftest.err >conftest.er1
2941    cat conftest.er1 >&5
2942    mv -f conftest.er1 conftest.err
2943  fi
2944  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2945  test $ac_status = 0; } && {
2946	 test -z "$ac_cxx_werror_flag" ||
2947	 test ! -s conftest.err
2948       } && test -s conftest$ac_exeext && {
2949	 test "$cross_compiling" = yes ||
2950	 test -x conftest$ac_exeext
2951       }; then :
2952  ac_retval=0
2953else
2954  $as_echo "$as_me: failed program was:" >&5
2955sed 's/^/| /' conftest.$ac_ext >&5
2956
2957	ac_retval=1
2958fi
2959  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2960  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2961  # interfere with the next link command; also delete a directory that is
2962  # left behind by Apple's compiler.  We do this before executing the actions.
2963  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2964  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2965  as_fn_set_status $ac_retval
2966
2967} # ac_fn_cxx_try_link
2968
2969# ac_fn_cxx_check_func LINENO FUNC VAR
2970# ------------------------------------
2971# Tests whether FUNC exists, setting the cache variable VAR accordingly
2972ac_fn_cxx_check_func ()
2973{
2974  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2975  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2976$as_echo_n "checking for $2... " >&6; }
2977if eval \${$3+:} false; then :
2978  $as_echo_n "(cached) " >&6
2979else
2980  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2981/* end confdefs.h.  */
2982/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2983   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2984#define $2 innocuous_$2
2985
2986/* System header to define __stub macros and hopefully few prototypes,
2987    which can conflict with char $2 (); below.
2988    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2989    <limits.h> exists even on freestanding compilers.  */
2990
2991#ifdef __STDC__
2992# include <limits.h>
2993#else
2994# include <assert.h>
2995#endif
2996
2997#undef $2
2998
2999/* Override any GCC internal prototype to avoid an error.
3000   Use char because int might match the return type of a GCC
3001   builtin and then its argument prototype would still apply.  */
3002#ifdef __cplusplus
3003extern "C"
3004#endif
3005char $2 ();
3006/* The GNU C library defines this for functions which it implements
3007    to always fail with ENOSYS.  Some functions are actually named
3008    something starting with __ and the normal name is an alias.  */
3009#if defined __stub_$2 || defined __stub___$2
3010choke me
3011#endif
3012
3013int
3014main ()
3015{
3016return $2 ();
3017  ;
3018  return 0;
3019}
3020_ACEOF
3021if ac_fn_cxx_try_link "$LINENO"; then :
3022  eval "$3=yes"
3023else
3024  eval "$3=no"
3025fi
3026rm -f core conftest.err conftest.$ac_objext \
3027    conftest$ac_exeext conftest.$ac_ext
3028fi
3029eval ac_res=\$$3
3030	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3031$as_echo "$ac_res" >&6; }
3032  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3033
3034} # ac_fn_cxx_check_func
3035
3036# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3037# -------------------------------------------------------
3038# Tests whether HEADER exists and can be compiled using the include files in
3039# INCLUDES, setting the cache variable VAR accordingly.
3040ac_fn_c_check_header_compile ()
3041{
3042  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3043  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3044$as_echo_n "checking for $2... " >&6; }
3045if eval \${$3+:} false; then :
3046  $as_echo_n "(cached) " >&6
3047else
3048  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3049/* end confdefs.h.  */
3050$4
3051#include <$2>
3052_ACEOF
3053if ac_fn_c_try_compile "$LINENO"; then :
3054  eval "$3=yes"
3055else
3056  eval "$3=no"
3057fi
3058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3059fi
3060eval ac_res=\$$3
3061	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3062$as_echo "$ac_res" >&6; }
3063  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3064
3065} # ac_fn_c_check_header_compile
3066cat >config.log <<_ACEOF
3067This file contains any messages produced by compilers while
3068running configure, to aid debugging if configure makes a mistake.
3069
3070It was created by OpenJDK $as_me jdk9, which was
3071generated by GNU Autoconf 2.69.  Invocation command line was
3072
3073  $ $0 $@
3074
3075_ACEOF
3076exec 5>>config.log
3077{
3078cat <<_ASUNAME
3079## --------- ##
3080## Platform. ##
3081## --------- ##
3082
3083hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3084uname -m = `(uname -m) 2>/dev/null || echo unknown`
3085uname -r = `(uname -r) 2>/dev/null || echo unknown`
3086uname -s = `(uname -s) 2>/dev/null || echo unknown`
3087uname -v = `(uname -v) 2>/dev/null || echo unknown`
3088
3089/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3090/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3091
3092/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3093/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3094/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3095/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3096/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3097/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3098/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3099
3100_ASUNAME
3101
3102as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3103for as_dir in $PATH
3104do
3105  IFS=$as_save_IFS
3106  test -z "$as_dir" && as_dir=.
3107    $as_echo "PATH: $as_dir"
3108  done
3109IFS=$as_save_IFS
3110
3111} >&5
3112
3113cat >&5 <<_ACEOF
3114
3115
3116## ----------- ##
3117## Core tests. ##
3118## ----------- ##
3119
3120_ACEOF
3121
3122
3123# Keep a trace of the command line.
3124# Strip out --no-create and --no-recursion so they do not pile up.
3125# Strip out --silent because we don't want to record it for future runs.
3126# Also quote any args containing shell meta-characters.
3127# Make two passes to allow for proper duplicate-argument suppression.
3128ac_configure_args=
3129ac_configure_args0=
3130ac_configure_args1=
3131ac_must_keep_next=false
3132for ac_pass in 1 2
3133do
3134  for ac_arg
3135  do
3136    case $ac_arg in
3137    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3138    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3139    | -silent | --silent | --silen | --sile | --sil)
3140      continue ;;
3141    *\'*)
3142      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3143    esac
3144    case $ac_pass in
3145    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3146    2)
3147      as_fn_append ac_configure_args1 " '$ac_arg'"
3148      if test $ac_must_keep_next = true; then
3149	ac_must_keep_next=false # Got value, back to normal.
3150      else
3151	case $ac_arg in
3152	  *=* | --config-cache | -C | -disable-* | --disable-* \
3153	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3154	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3155	  | -with-* | --with-* | -without-* | --without-* | --x)
3156	    case "$ac_configure_args0 " in
3157	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3158	    esac
3159	    ;;
3160	  -* ) ac_must_keep_next=true ;;
3161	esac
3162      fi
3163      as_fn_append ac_configure_args " '$ac_arg'"
3164      ;;
3165    esac
3166  done
3167done
3168{ ac_configure_args0=; unset ac_configure_args0;}
3169{ ac_configure_args1=; unset ac_configure_args1;}
3170
3171# When interrupted or exit'd, cleanup temporary files, and complete
3172# config.log.  We remove comments because anyway the quotes in there
3173# would cause problems or look ugly.
3174# WARNING: Use '\'' to represent an apostrophe within the trap.
3175# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3176trap 'exit_status=$?
3177  # Save into config.log some information that might help in debugging.
3178  {
3179    echo
3180
3181    $as_echo "## ---------------- ##
3182## Cache variables. ##
3183## ---------------- ##"
3184    echo
3185    # The following way of writing the cache mishandles newlines in values,
3186(
3187  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3188    eval ac_val=\$$ac_var
3189    case $ac_val in #(
3190    *${as_nl}*)
3191      case $ac_var in #(
3192      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3193$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3194      esac
3195      case $ac_var in #(
3196      _ | IFS | as_nl) ;; #(
3197      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3198      *) { eval $ac_var=; unset $ac_var;} ;;
3199      esac ;;
3200    esac
3201  done
3202  (set) 2>&1 |
3203    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3204    *${as_nl}ac_space=\ *)
3205      sed -n \
3206	"s/'\''/'\''\\\\'\'''\''/g;
3207	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3208      ;; #(
3209    *)
3210      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3211      ;;
3212    esac |
3213    sort
3214)
3215    echo
3216
3217    $as_echo "## ----------------- ##
3218## Output variables. ##
3219## ----------------- ##"
3220    echo
3221    for ac_var in $ac_subst_vars
3222    do
3223      eval ac_val=\$$ac_var
3224      case $ac_val in
3225      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3226      esac
3227      $as_echo "$ac_var='\''$ac_val'\''"
3228    done | sort
3229    echo
3230
3231    if test -n "$ac_subst_files"; then
3232      $as_echo "## ------------------- ##
3233## File substitutions. ##
3234## ------------------- ##"
3235      echo
3236      for ac_var in $ac_subst_files
3237      do
3238	eval ac_val=\$$ac_var
3239	case $ac_val in
3240	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3241	esac
3242	$as_echo "$ac_var='\''$ac_val'\''"
3243      done | sort
3244      echo
3245    fi
3246
3247    if test -s confdefs.h; then
3248      $as_echo "## ----------- ##
3249## confdefs.h. ##
3250## ----------- ##"
3251      echo
3252      cat confdefs.h
3253      echo
3254    fi
3255    test "$ac_signal" != 0 &&
3256      $as_echo "$as_me: caught signal $ac_signal"
3257    $as_echo "$as_me: exit $exit_status"
3258  } >&5
3259  rm -f core *.core core.conftest.* &&
3260    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3261    exit $exit_status
3262' 0
3263for ac_signal in 1 2 13 15; do
3264  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3265done
3266ac_signal=0
3267
3268# confdefs.h avoids OS command line length limits that DEFS can exceed.
3269rm -f -r conftest* confdefs.h
3270
3271$as_echo "/* confdefs.h */" > confdefs.h
3272
3273# Predefined preprocessor variables.
3274
3275cat >>confdefs.h <<_ACEOF
3276#define PACKAGE_NAME "$PACKAGE_NAME"
3277_ACEOF
3278
3279cat >>confdefs.h <<_ACEOF
3280#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3281_ACEOF
3282
3283cat >>confdefs.h <<_ACEOF
3284#define PACKAGE_VERSION "$PACKAGE_VERSION"
3285_ACEOF
3286
3287cat >>confdefs.h <<_ACEOF
3288#define PACKAGE_STRING "$PACKAGE_STRING"
3289_ACEOF
3290
3291cat >>confdefs.h <<_ACEOF
3292#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3293_ACEOF
3294
3295cat >>confdefs.h <<_ACEOF
3296#define PACKAGE_URL "$PACKAGE_URL"
3297_ACEOF
3298
3299
3300# Let the site file select an alternate cache file if it wants to.
3301# Prefer an explicitly selected file to automatically selected ones.
3302ac_site_file1=NONE
3303ac_site_file2=NONE
3304if test -n "$CONFIG_SITE"; then
3305  # We do not want a PATH search for config.site.
3306  case $CONFIG_SITE in #((
3307    -*)  ac_site_file1=./$CONFIG_SITE;;
3308    */*) ac_site_file1=$CONFIG_SITE;;
3309    *)   ac_site_file1=./$CONFIG_SITE;;
3310  esac
3311elif test "x$prefix" != xNONE; then
3312  ac_site_file1=$prefix/share/config.site
3313  ac_site_file2=$prefix/etc/config.site
3314else
3315  ac_site_file1=$ac_default_prefix/share/config.site
3316  ac_site_file2=$ac_default_prefix/etc/config.site
3317fi
3318for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3319do
3320  test "x$ac_site_file" = xNONE && continue
3321  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3322    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3323$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3324    sed 's/^/| /' "$ac_site_file" >&5
3325    . "$ac_site_file" \
3326      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3327$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3328as_fn_error $? "failed to load site script $ac_site_file
3329See \`config.log' for more details" "$LINENO" 5; }
3330  fi
3331done
3332
3333if test -r "$cache_file"; then
3334  # Some versions of bash will fail to source /dev/null (special files
3335  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3336  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3337    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3338$as_echo "$as_me: loading cache $cache_file" >&6;}
3339    case $cache_file in
3340      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3341      *)                      . "./$cache_file";;
3342    esac
3343  fi
3344else
3345  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3346$as_echo "$as_me: creating cache $cache_file" >&6;}
3347  >$cache_file
3348fi
3349
3350# Check that the precious variables saved in the cache have kept the same
3351# value.
3352ac_cache_corrupted=false
3353for ac_var in $ac_precious_vars; do
3354  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3355  eval ac_new_set=\$ac_env_${ac_var}_set
3356  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3357  eval ac_new_val=\$ac_env_${ac_var}_value
3358  case $ac_old_set,$ac_new_set in
3359    set,)
3360      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3361$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3362      ac_cache_corrupted=: ;;
3363    ,set)
3364      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3365$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3366      ac_cache_corrupted=: ;;
3367    ,);;
3368    *)
3369      if test "x$ac_old_val" != "x$ac_new_val"; then
3370	# differences in whitespace do not lead to failure.
3371	ac_old_val_w=`echo x $ac_old_val`
3372	ac_new_val_w=`echo x $ac_new_val`
3373	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3374	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3375$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3376	  ac_cache_corrupted=:
3377	else
3378	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3379$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3380	  eval $ac_var=\$ac_old_val
3381	fi
3382	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3383$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3384	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3385$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3386      fi;;
3387  esac
3388  # Pass precious variables to config.status.
3389  if test "$ac_new_set" = set; then
3390    case $ac_new_val in
3391    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3392    *) ac_arg=$ac_var=$ac_new_val ;;
3393    esac
3394    case " $ac_configure_args " in
3395      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3396      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3397    esac
3398  fi
3399done
3400if $ac_cache_corrupted; then
3401  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3402$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3403  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3404$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3405  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3406fi
3407## -------------------- ##
3408## Main body of script. ##
3409## -------------------- ##
3410
3411ac_ext=c
3412ac_cpp='$CPP $CPPFLAGS'
3413ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3414ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3415ac_compiler_gnu=$ac_cv_c_compiler_gnu
3416
3417
3418
3419ac_aux_dir=
3420for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3421  if test -f "$ac_dir/install-sh"; then
3422    ac_aux_dir=$ac_dir
3423    ac_install_sh="$ac_aux_dir/install-sh -c"
3424    break
3425  elif test -f "$ac_dir/install.sh"; then
3426    ac_aux_dir=$ac_dir
3427    ac_install_sh="$ac_aux_dir/install.sh -c"
3428    break
3429  elif test -f "$ac_dir/shtool"; then
3430    ac_aux_dir=$ac_dir
3431    ac_install_sh="$ac_aux_dir/shtool install -c"
3432    break
3433  fi
3434done
3435if test -z "$ac_aux_dir"; then
3436  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
3437fi
3438
3439# These three variables are undocumented and unsupported,
3440# and are intended to be withdrawn in a future Autoconf release.
3441# They can cause serious problems if a builder's source tree is in a directory
3442# whose full name contains unusual characters.
3443ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3444ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3445ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3446
3447
3448# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3449
3450#
3451# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3452# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3453#
3454# This code is free software; you can redistribute it and/or modify it
3455# under the terms of the GNU General Public License version 2 only, as
3456# published by the Free Software Foundation.  Oracle designates this
3457# particular file as subject to the "Classpath" exception as provided
3458# by Oracle in the LICENSE file that accompanied this code.
3459#
3460# This code is distributed in the hope that it will be useful, but WITHOUT
3461# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3462# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3463# version 2 for more details (a copy is included in the LICENSE file that
3464# accompanied this code).
3465#
3466# You should have received a copy of the GNU General Public License version
3467# 2 along with this work; if not, write to the Free Software Foundation,
3468# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3469#
3470# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3471# or visit www.oracle.com if you need additional information or have any
3472# questions.
3473#
3474
3475#
3476# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3477#
3478# This program is free software; you can redistribute it and/or modify
3479# it under the terms of the GNU General Public License as published by
3480# the Free Software Foundation; either version 2 of the License, or
3481# (at your option) any later version.
3482#
3483# This program is distributed in the hope that it will be useful, but
3484# WITHOUT ANY WARRANTY; without even the implied warranty of
3485# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3486# General Public License for more details.
3487#
3488# You should have received a copy of the GNU General Public License
3489# along with this program; if not, write to the Free Software
3490# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3491#
3492# As a special exception to the GNU General Public License, if you
3493# distribute this file as part of a program that contains a
3494# configuration script generated by Autoconf, you may include it under
3495# the same distribution terms that you use for the rest of that program.
3496
3497# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3498# ----------------------------------
3499# PKG_PROG_PKG_CONFIG
3500
3501# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3502#
3503# Check to see whether a particular set of modules exists.  Similar
3504# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3505#
3506#
3507# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3508# this or PKG_CHECK_MODULES is called, or make sure to call
3509# PKG_CHECK_EXISTS manually
3510# --------------------------------------------------------------
3511
3512
3513
3514# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3515# ---------------------------------------------
3516# _PKG_CONFIG
3517
3518# _PKG_SHORT_ERRORS_SUPPORTED
3519# -----------------------------
3520# _PKG_SHORT_ERRORS_SUPPORTED
3521
3522
3523# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3524# [ACTION-IF-NOT-FOUND])
3525#
3526#
3527# Note that if there is a possibility the first call to
3528# PKG_CHECK_MODULES might not happen, you should be sure to include an
3529# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3530#
3531#
3532# --------------------------------------------------------------
3533# PKG_CHECK_MODULES
3534
3535
3536# Include these first...
3537#
3538# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3539# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3540#
3541# This code is free software; you can redistribute it and/or modify it
3542# under the terms of the GNU General Public License version 2 only, as
3543# published by the Free Software Foundation.  Oracle designates this
3544# particular file as subject to the "Classpath" exception as provided
3545# by Oracle in the LICENSE file that accompanied this code.
3546#
3547# This code is distributed in the hope that it will be useful, but WITHOUT
3548# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3549# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3550# version 2 for more details (a copy is included in the LICENSE file that
3551# accompanied this code).
3552#
3553# You should have received a copy of the GNU General Public License version
3554# 2 along with this work; if not, write to the Free Software Foundation,
3555# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3556#
3557# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3558# or visit www.oracle.com if you need additional information or have any
3559# questions.
3560#
3561
3562# Create a function/macro that takes a series of named arguments. The call is
3563# similar to AC_DEFUN, but the setup of the function looks like this:
3564# BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3565# ... do something
3566#   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3567# ])
3568# A star (*) in front of a named argument means that it is required and it's
3569# presence will be verified. To pass e.g. the first value as a normal indexed
3570# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3571# arguments are referenced in the function by their name prefixed by ARG_, e.g.
3572# "ARG_FOO".
3573#
3574# The generated function can be called like this:
3575# MYFUNC(FOO: [foo-val],
3576#     BAR: [
3577#         $ECHO hello world
3578#     ])
3579# Note that the argument value must start on the same line as the argument name.
3580#
3581# Argument 1: Name of the function to define
3582# Argument 2: List of legal named arguments, with a * prefix for required arguments
3583# Argument 3: Argument array to treat as named, typically $@
3584# Argument 4: The main function body
3585
3586
3587# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3588# If so, then append $1 to $2 \
3589# Also set JVM_ARG_OK to true/false depending on outcome.
3590
3591
3592# Appends a string to a path variable, only adding the : when needed.
3593
3594
3595# Prepends a string to a path variable, only adding the : when needed.
3596
3597
3598# This will make sure the given variable points to a full and proper
3599# path. This means:
3600# 1) There will be no spaces in the path. On unix platforms,
3601#    spaces in the path will result in an error. On Windows,
3602#    the path will be rewritten using short-style to be space-free.
3603# 2) The path will be absolute, and it will be in unix-style (on
3604#     cygwin).
3605# $1: The name of the variable to fix
3606
3607
3608# This will make sure the given variable points to a executable
3609# with a full and proper path. This means:
3610# 1) There will be no spaces in the path. On unix platforms,
3611#    spaces in the path will result in an error. On Windows,
3612#    the path will be rewritten using short-style to be space-free.
3613# 2) The path will be absolute, and it will be in unix-style (on
3614#     cygwin).
3615# Any arguments given to the executable is preserved.
3616# If the input variable does not have a directory specification, then
3617# it need to be in the PATH.
3618# $1: The name of the variable to fix
3619
3620
3621
3622
3623# Register a --with argument but mark it as deprecated
3624# $1: The name of the with argument to deprecate, not including --with-
3625
3626
3627# Register a --enable argument but mark it as deprecated
3628# $1: The name of the with argument to deprecate, not including --enable-
3629# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3630# $3: Messages to user.
3631
3632
3633
3634
3635# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3636# $1: variable to check
3637
3638
3639# Check that there are no unprocessed overridden variables left.
3640# If so, they are an incorrect argument and we will exit with an error.
3641
3642
3643# Setup a tool for the given variable. If correctly specified by the user,
3644# use that value, otherwise search for the tool using the supplied code snippet.
3645# $1: variable to set
3646# $2: code snippet to call to look for the tool
3647# $3: code snippet to call if variable was used to find tool
3648
3649
3650# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3651# $1: variable to set
3652# $2: executable name (or list of names) to look for
3653# $3: [path]
3654
3655
3656# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3657# $1: variable to set
3658# $2: executable name (or list of names) to look for
3659
3660
3661# Like BASIC_PATH_PROGS but fails if no tool was found.
3662# $1: variable to set
3663# $2: executable name (or list of names) to look for
3664# $3: [path]
3665
3666
3667# Like BASIC_SETUP_TOOL but fails if no tool was found.
3668# $1: variable to set
3669# $2: autoconf macro to call to look for the special tool
3670
3671
3672# Setup the most fundamental tools that relies on not much else to set up,
3673# but is used by much of the early bootstrap code.
3674
3675
3676# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3677
3678
3679# Evaluates platform specific overrides for devkit variables.
3680# $1: Name of variable
3681
3682
3683
3684
3685
3686
3687#%%% Simple tools %%%
3688
3689# Check if we have found a usable version of make
3690# $1: the path to a potential make binary (or empty)
3691# $2: the description on how we found this
3692
3693
3694
3695
3696# Goes looking for a usable version of GNU make.
3697
3698
3699
3700
3701
3702
3703
3704
3705# Check if build directory is on local disk. If not possible to determine,
3706# we prefer to claim it's local.
3707# Argument 1: directory to test
3708# Argument 2: what to do if it is on local disk
3709# Argument 3: what to do otherwise (remote disk or failure)
3710
3711
3712# Check that source files have basic read permissions set. This might
3713# not be the case in cygwin in certain conditions.
3714
3715
3716
3717
3718# Check for support for specific options in bash
3719
3720
3721################################################################################
3722#
3723# Default make target
3724#
3725
3726
3727# Code to run after AC_OUTPUT
3728
3729
3730#
3731# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3732# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3733#
3734# This code is free software; you can redistribute it and/or modify it
3735# under the terms of the GNU General Public License version 2 only, as
3736# published by the Free Software Foundation.  Oracle designates this
3737# particular file as subject to the "Classpath" exception as provided
3738# by Oracle in the LICENSE file that accompanied this code.
3739#
3740# This code is distributed in the hope that it will be useful, but WITHOUT
3741# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3742# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3743# version 2 for more details (a copy is included in the LICENSE file that
3744# accompanied this code).
3745#
3746# You should have received a copy of the GNU General Public License version
3747# 2 along with this work; if not, write to the Free Software Foundation,
3748# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3749#
3750# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3751# or visit www.oracle.com if you need additional information or have any
3752# questions.
3753#
3754
3755
3756
3757
3758
3759# Helper function which possibly converts a path using DOS-style short mode.
3760# If so, the updated path is stored in $new_path.
3761# $1: The path to check
3762
3763
3764# Helper function which possibly converts a path using DOS-style short mode.
3765# If so, the updated path is stored in $new_path.
3766# $1: The path to check
3767
3768
3769# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3770# and could probably be heavily simplified. However, all changes in this
3771# area tend to need lot of testing in different scenarios, and in lack of
3772# proper unit testing, cleaning this up has not been deemed worth the effort
3773# at the moment.
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3784
3785
3786
3787
3788# ... then the rest
3789#
3790# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3791# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3792#
3793# This code is free software; you can redistribute it and/or modify it
3794# under the terms of the GNU General Public License version 2 only, as
3795# published by the Free Software Foundation.  Oracle designates this
3796# particular file as subject to the "Classpath" exception as provided
3797# by Oracle in the LICENSE file that accompanied this code.
3798#
3799# This code is distributed in the hope that it will be useful, but WITHOUT
3800# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3801# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3802# version 2 for more details (a copy is included in the LICENSE file that
3803# accompanied this code).
3804#
3805# You should have received a copy of the GNU General Public License version
3806# 2 along with this work; if not, write to the Free Software Foundation,
3807# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3808#
3809# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3810# or visit www.oracle.com if you need additional information or have any
3811# questions.
3812#
3813
3814########################################################################
3815# This file handles detection of the Boot JDK. The Boot JDK detection
3816# process has been developed as a response to solve a complex real-world
3817# problem. Initially, it was simple, but it has grown as platform after
3818# platform, idiosyncracy after idiosyncracy has been supported.
3819#
3820# The basic idea is this:
3821# 1) You need an acceptable *) JDK to use as a Boot JDK
3822# 2) There are several ways to locate a JDK, that are mostly platform
3823#    dependent **)
3824# 3) You can have multiple JDKs installed
3825# 4) If possible, configure should try to dig out an acceptable JDK
3826#    automatically, without having to resort to command-line options
3827#
3828# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3829#     javac) and not a JRE, etc.
3830#
3831# **) On Windows we typically use a well-known path.
3832#     On MacOSX we typically use the tool java_home.
3833#     On Linux we typically find javac in the $PATH, and then follow a
3834#     chain of symlinks that often ends up in a real JDK.
3835#
3836# This leads to the code where we check in different ways to locate a
3837# JDK, and if one is found, check if it is acceptable. If not, we print
3838# our reasons for rejecting it (useful when debugging non-working
3839# configure situations) and continue checking the next one.
3840########################################################################
3841
3842# Execute the check given as argument, and verify the result
3843# If the Boot JDK was previously found, do nothing
3844# $1 A command line (typically autoconf macro) to execute
3845
3846
3847# Test: Is bootjdk explicitly set by command line arguments?
3848
3849
3850# Test: Is $JAVA_HOME set?
3851
3852
3853# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3854
3855
3856# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3857# $1: Argument to the java_home binary (optional)
3858
3859
3860# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3861
3862
3863# Look for a jdk in the given path. If there are multiple, try to select the newest.
3864# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3865# $1 = Path to directory containing jdk installations.
3866# $2 = String to append to the found JDK directory to get the proper JDK home
3867
3868
3869# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3870# environmental variable as base for where to look.
3871# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3872
3873
3874# Test: Is there a JDK installed in default, well-known locations?
3875
3876
3877# Check that a command-line tool in the Boot JDK is correct
3878# $1 = name of variable to assign
3879# $2 = name of binary
3880
3881
3882###############################################################################
3883#
3884# We need a Boot JDK to bootstrap the build.
3885#
3886
3887
3888
3889
3890
3891# BUILD_JDK: the location of the latest JDK that can run
3892#   on the host system and supports the target class file version
3893#   generated in this JDK build.  This variable should only be
3894#   used after the launchers are built.
3895#
3896
3897# Execute the check given as argument, and verify the result.
3898# If the JDK was previously found, do nothing.
3899# $1 A command line (typically autoconf macro) to execute
3900
3901
3902# By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3903# is different than the host system doing the build (e.g. cross-compilation),
3904# a special BUILD_JDK is built as part of the build process.  An external
3905# prebuilt BUILD_JDK can also be supplied.
3906
3907
3908#
3909# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3910# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3911#
3912# This code is free software; you can redistribute it and/or modify it
3913# under the terms of the GNU General Public License version 2 only, as
3914# published by the Free Software Foundation.  Oracle designates this
3915# particular file as subject to the "Classpath" exception as provided
3916# by Oracle in the LICENSE file that accompanied this code.
3917#
3918# This code is distributed in the hope that it will be useful, but WITHOUT
3919# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3920# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3921# version 2 for more details (a copy is included in the LICENSE file that
3922# accompanied this code).
3923#
3924# You should have received a copy of the GNU General Public License version
3925# 2 along with this work; if not, write to the Free Software Foundation,
3926# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3927#
3928# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3929# or visit www.oracle.com if you need additional information or have any
3930# questions.
3931#
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949################################################################################
3950#
3951# Runs icecc-create-env once and prints the error if it fails
3952#
3953# $1: arguments to icecc-create-env
3954# $2: log file
3955#
3956
3957
3958################################################################################
3959#
3960# Optionally enable distributed compilation of native code using icecc/icecream
3961#
3962
3963
3964
3965
3966
3967
3968
3969#
3970# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3971# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3972#
3973# This code is free software; you can redistribute it and/or modify it
3974# under the terms of the GNU General Public License version 2 only, as
3975# published by the Free Software Foundation.  Oracle designates this
3976# particular file as subject to the "Classpath" exception as provided
3977# by Oracle in the LICENSE file that accompanied this code.
3978#
3979# This code is distributed in the hope that it will be useful, but WITHOUT
3980# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3981# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3982# version 2 for more details (a copy is included in the LICENSE file that
3983# accompanied this code).
3984#
3985# You should have received a copy of the GNU General Public License version
3986# 2 along with this work; if not, write to the Free Software Foundation,
3987# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3988#
3989# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3990# or visit www.oracle.com if you need additional information or have any
3991# questions.
3992#
3993
3994# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
3995# corresponding configure arguments instead
3996
3997
3998# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
3999# that configure can use them while detecting compilers.
4000# TOOLCHAIN_TYPE is available here.
4001# Param 1 - Optional prefix to all variables. (e.g BUILD_)
4002
4003
4004
4005
4006
4007
4008# Documentation on common flags used for solstudio in HIGHEST.
4009#
4010# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
4011#          done with care, there are some assumptions below that need to
4012#          be understood about the use of pointers, and IEEE behavior.
4013#
4014# -fns: Use non-standard floating point mode (not IEEE 754)
4015# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4016# -fsingle: Use single precision floating point with 'float'
4017# -xalias_level=basic: Assume memory references via basic pointer types do not alias
4018#   (Source with excessing pointer casting and data access with mixed
4019#    pointer types are not recommended)
4020# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4021#   (If you expect perfect errno behavior, do not use this)
4022# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4023# -xrestrict: Pointer parameters to functions do not overlap
4024#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4025#    If you pass in multiple pointers to the same data, do not use this)
4026# -xlibmil: Inline some library routines
4027#   (If you expect perfect errno behavior, do not use this)
4028# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4029#   (If you expect perfect errno behavior, do not use this)
4030#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4031
4032    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4033    # Bug?
4034    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4035    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4036    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4037    #fi
4038
4039
4040
4041
4042
4043
4044################################################################################
4045# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4046#      conditionals against.
4047# $2 - Optional prefix for each variable defined.
4048
4049
4050# FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4051#                                  IF_FALSE: [RUN-IF-FALSE])
4052# ------------------------------------------------------------
4053# Check that the C compiler supports an argument
4054
4055
4056
4057
4058# FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4059#                                    IF_FALSE: [RUN-IF-FALSE])
4060# ------------------------------------------------------------
4061# Check that the C++ compiler supports an argument
4062
4063
4064
4065
4066# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4067#                                IF_FALSE: [RUN-IF-FALSE])
4068# ------------------------------------------------------------
4069# Check that the C and C++ compilers support an argument
4070
4071
4072
4073
4074# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4075#                                   IF_FALSE: [RUN-IF-FALSE])
4076# ------------------------------------------------------------
4077# Check that the linker support an argument
4078
4079
4080
4081
4082
4083
4084# FLAGS_SETUP_GCC6_COMPILER_FLAGS([PREFIX])
4085# Arguments:
4086# $1 - Optional prefix for each variable defined.
4087
4088
4089#
4090# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4091# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4092#
4093# This code is free software; you can redistribute it and/or modify it
4094# under the terms of the GNU General Public License version 2 only, as
4095# published by the Free Software Foundation.  Oracle designates this
4096# particular file as subject to the "Classpath" exception as provided
4097# by Oracle in the LICENSE file that accompanied this code.
4098#
4099# This code is distributed in the hope that it will be useful, but WITHOUT
4100# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4101# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4102# version 2 for more details (a copy is included in the LICENSE file that
4103# accompanied this code).
4104#
4105# You should have received a copy of the GNU General Public License version
4106# 2 along with this work; if not, write to the Free Software Foundation,
4107# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4108#
4109# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4110# or visit www.oracle.com if you need additional information or have any
4111# questions.
4112#
4113
4114
4115
4116
4117
4118cygwin_help() {
4119  case $1 in
4120    unzip)
4121      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4122      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4123      ;;
4124    zip)
4125      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4126      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4127      ;;
4128    make)
4129      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4130      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4131      ;;
4132    freetype)
4133      HELP_MSG="
4134The freetype library can now be build during the configure process.
4135Download the freetype sources and unpack them into an arbitrary directory:
4136
4137wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4138tar -xzf freetype-2.5.3.tar.gz
4139
4140Then run configure with '--with-freetype-src=<freetype_src>'. This will
4141automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4142builds or into '<freetype_src>/lib32' for 32-bit builds.
4143Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4144and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4145
4146Alternatively you can unpack the sources like this to use the default directory:
4147
4148tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4149      ;;
4150  esac
4151}
4152
4153msys_help() {
4154  PKGHANDLER_COMMAND=""
4155}
4156
4157apt_help() {
4158  case $1 in
4159    reduced)
4160      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4161    devkit)
4162      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4163    openjdk)
4164      PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4165    alsa)
4166      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4167    cups)
4168      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4169    freetype)
4170      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4171    ffi)
4172      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4173    x11)
4174      PKGHANDLER_COMMAND="sudo apt-get install libx11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4175    ccache)
4176      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4177    dtrace)
4178      PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4179  esac
4180}
4181
4182yum_help() {
4183  case $1 in
4184    devkit)
4185      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4186    openjdk)
4187      PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4188    alsa)
4189      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4190    cups)
4191      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4192    freetype)
4193      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4194    x11)
4195      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4196    ccache)
4197      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4198  esac
4199}
4200
4201port_help() {
4202  PKGHANDLER_COMMAND=""
4203}
4204
4205pkgutil_help() {
4206  PKGHANDLER_COMMAND=""
4207}
4208
4209pkgadd_help() {
4210  PKGHANDLER_COMMAND=""
4211}
4212
4213# This function will check if we're called from the "configure" wrapper while
4214# printing --help. If so, we will print out additional information that can
4215# only be extracted within the autoconf script, and then exit. This must be
4216# called at the very beginning in configure.ac.
4217
4218
4219
4220
4221
4222
4223#
4224# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4225# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4226#
4227# This code is free software; you can redistribute it and/or modify it
4228# under the terms of the GNU General Public License version 2 only, as
4229# published by the Free Software Foundation.  Oracle designates this
4230# particular file as subject to the "Classpath" exception as provided
4231# by Oracle in the LICENSE file that accompanied this code.
4232#
4233# This code is distributed in the hope that it will be useful, but WITHOUT
4234# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4235# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4236# version 2 for more details (a copy is included in the LICENSE file that
4237# accompanied this code).
4238#
4239# You should have received a copy of the GNU General Public License version
4240# 2 along with this work; if not, write to the Free Software Foundation,
4241# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4242#
4243# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4244# or visit www.oracle.com if you need additional information or have any
4245# questions.
4246#
4247
4248# All valid JVM features, regardless of platform
4249VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4250    fprof vm-structs jni-check services management all-gcs nmt cds static-build"
4251
4252# All valid JVM variants
4253VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4254
4255###############################################################################
4256# Check if the specified JVM variant should be built. To be used in shell if
4257# constructs, like this:
4258# if HOTSPOT_CHECK_JVM_VARIANT(server); then
4259#
4260# Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4261
4262# Definition kept in one line to allow inlining in if statements.
4263# Additional [] needed to keep m4 from mangling shell constructs.
4264
4265
4266###############################################################################
4267# Check if the specified JVM features are explicitly enabled. To be used in
4268# shell if constructs, like this:
4269# if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4270#
4271# Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4272
4273# Definition kept in one line to allow inlining in if statements.
4274# Additional [] needed to keep m4 from mangling shell constructs.
4275
4276
4277###############################################################################
4278# Check which variants of the JVM that we want to build. Available variants are:
4279#   server: normal interpreter, and a tiered C1/C2 compiler
4280#   client: normal interpreter, and C1 (no C2 compiler)
4281#   minimal: reduced form of client with optional features stripped out
4282#   core: normal interpreter only, no compiler
4283#   zero: C++ based interpreter only, no compiler
4284#   zeroshark: C++ based interpreter, and a llvm-based compiler
4285#   custom: baseline JVM with no default features
4286#
4287
4288
4289###############################################################################
4290# Check if dtrace should be enabled and has all prerequisites present.
4291#
4292
4293
4294###############################################################################
4295# Set up all JVM features for each JVM variant.
4296#
4297
4298
4299###############################################################################
4300# Validate JVM features once all setup is complete, including custom setup.
4301#
4302
4303
4304################################################################################
4305# Check if gtest should be built
4306#
4307
4308
4309#
4310# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4311# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4312#
4313# This code is free software; you can redistribute it and/or modify it
4314# under the terms of the GNU General Public License version 2 only, as
4315# published by the Free Software Foundation.  Oracle designates this
4316# particular file as subject to the "Classpath" exception as provided
4317# by Oracle in the LICENSE file that accompanied this code.
4318#
4319# This code is distributed in the hope that it will be useful, but WITHOUT
4320# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4321# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4322# version 2 for more details (a copy is included in the LICENSE file that
4323# accompanied this code).
4324#
4325# You should have received a copy of the GNU General Public License version
4326# 2 along with this work; if not, write to the Free Software Foundation,
4327# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4328#
4329# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4330# or visit www.oracle.com if you need additional information or have any
4331# questions.
4332#
4333
4334###############################################################################
4335# Check which variant of the JDK that we want to build.
4336# Currently we have:
4337#    normal:   standard edition
4338# but the custom make system may add other variants
4339#
4340# Effectively the JDK variant gives a name to a specific set of
4341# modules to compile into the JDK.
4342
4343
4344###############################################################################
4345# Set the debug level
4346#    release: no debug information, all optimizations, no asserts.
4347#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4348#    fastdebug: debug information (-g), all optimizations, all asserts
4349#    slowdebug: debug information (-g), no optimizations, all asserts
4350
4351
4352###############################################################################
4353#
4354# Should we build only OpenJDK even if closed sources are present?
4355#
4356
4357
4358
4359
4360###############################################################################
4361#
4362# Enable or disable the elliptic curve crypto implementation
4363#
4364
4365
4366
4367
4368################################################################################
4369#
4370# Gcov coverage data for hotspot
4371#
4372
4373
4374################################################################################
4375#
4376# Static build support.  When enabled will generate static
4377# libraries instead of shared libraries for all JDK libs.
4378#
4379
4380
4381################################################################################
4382#
4383# jlink options.
4384# We always keep packaged modules in JDK image.
4385#
4386
4387
4388################################################################################
4389#
4390# Check if building of the jtreg failure handler should be enabled.
4391#
4392
4393
4394################################################################################
4395#
4396# Enable or disable generation of the classlist at build time
4397#
4398
4399
4400#
4401# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
4402# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4403#
4404# This code is free software; you can redistribute it and/or modify it
4405# under the terms of the GNU General Public License version 2 only, as
4406# published by the Free Software Foundation.  Oracle designates this
4407# particular file as subject to the "Classpath" exception as provided
4408# by Oracle in the LICENSE file that accompanied this code.
4409#
4410# This code is distributed in the hope that it will be useful, but WITHOUT
4411# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4412# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4413# version 2 for more details (a copy is included in the LICENSE file that
4414# accompanied this code).
4415#
4416# You should have received a copy of the GNU General Public License version
4417# 2 along with this work; if not, write to the Free Software Foundation,
4418# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4419#
4420# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4421# or visit www.oracle.com if you need additional information or have any
4422# questions.
4423#
4424
4425###############################################################################
4426#
4427# Setup version numbers
4428#
4429
4430# Verify that a given string represents a valid version number, and assign it
4431# to a variable.
4432
4433# Argument 1: the variable to assign to
4434# Argument 2: the value given by the user
4435
4436
4437
4438
4439#
4440# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4441# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4442#
4443# This code is free software; you can redistribute it and/or modify it
4444# under the terms of the GNU General Public License version 2 only, as
4445# published by the Free Software Foundation.  Oracle designates this
4446# particular file as subject to the "Classpath" exception as provided
4447# by Oracle in the LICENSE file that accompanied this code.
4448#
4449# This code is distributed in the hope that it will be useful, but WITHOUT
4450# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4451# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4452# version 2 for more details (a copy is included in the LICENSE file that
4453# accompanied this code).
4454#
4455# You should have received a copy of the GNU General Public License version
4456# 2 along with this work; if not, write to the Free Software Foundation,
4457# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4458#
4459# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4460# or visit www.oracle.com if you need additional information or have any
4461# questions.
4462#
4463
4464# Major library component reside in separate files.
4465#
4466# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4467# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4468#
4469# This code is free software; you can redistribute it and/or modify it
4470# under the terms of the GNU General Public License version 2 only, as
4471# published by the Free Software Foundation.  Oracle designates this
4472# particular file as subject to the "Classpath" exception as provided
4473# by Oracle in the LICENSE file that accompanied this code.
4474#
4475# This code is distributed in the hope that it will be useful, but WITHOUT
4476# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4477# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4478# version 2 for more details (a copy is included in the LICENSE file that
4479# accompanied this code).
4480#
4481# You should have received a copy of the GNU General Public License version
4482# 2 along with this work; if not, write to the Free Software Foundation,
4483# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4484#
4485# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4486# or visit www.oracle.com if you need additional information or have any
4487# questions.
4488#
4489
4490################################################################################
4491# Setup alsa (Advanced Linux Sound Architecture)
4492################################################################################
4493
4494
4495#
4496# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4497# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4498#
4499# This code is free software; you can redistribute it and/or modify it
4500# under the terms of the GNU General Public License version 2 only, as
4501# published by the Free Software Foundation.  Oracle designates this
4502# particular file as subject to the "Classpath" exception as provided
4503# by Oracle in the LICENSE file that accompanied this code.
4504#
4505# This code is distributed in the hope that it will be useful, but WITHOUT
4506# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4507# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4508# version 2 for more details (a copy is included in the LICENSE file that
4509# accompanied this code).
4510#
4511# You should have received a copy of the GNU General Public License version
4512# 2 along with this work; if not, write to the Free Software Foundation,
4513# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4514#
4515# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4516# or visit www.oracle.com if you need additional information or have any
4517# questions.
4518#
4519
4520################################################################################
4521# Setup bundled libraries.
4522#
4523# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4524# OpenJDK repository. Default is to use these libraries as bundled, but they
4525# might be replaced by en external version by the user.
4526################################################################################
4527
4528
4529################################################################################
4530# Setup libjpeg
4531################################################################################
4532
4533
4534################################################################################
4535# Setup giflib
4536################################################################################
4537
4538
4539################################################################################
4540# Setup libpng
4541################################################################################
4542
4543
4544################################################################################
4545# Setup zlib
4546################################################################################
4547
4548
4549################################################################################
4550# Setup lcms (Little CMS)
4551################################################################################
4552
4553
4554#
4555# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4556# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4557#
4558# This code is free software; you can redistribute it and/or modify it
4559# under the terms of the GNU General Public License version 2 only, as
4560# published by the Free Software Foundation.  Oracle designates this
4561# particular file as subject to the "Classpath" exception as provided
4562# by Oracle in the LICENSE file that accompanied this code.
4563#
4564# This code is distributed in the hope that it will be useful, but WITHOUT
4565# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4566# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4567# version 2 for more details (a copy is included in the LICENSE file that
4568# accompanied this code).
4569#
4570# You should have received a copy of the GNU General Public License version
4571# 2 along with this work; if not, write to the Free Software Foundation,
4572# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4573#
4574# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4575# or visit www.oracle.com if you need additional information or have any
4576# questions.
4577#
4578
4579################################################################################
4580# Setup cups (Common Unix Printing System)
4581################################################################################
4582
4583
4584#
4585# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4586# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4587#
4588# This code is free software; you can redistribute it and/or modify it
4589# under the terms of the GNU General Public License version 2 only, as
4590# published by the Free Software Foundation.  Oracle designates this
4591# particular file as subject to the "Classpath" exception as provided
4592# by Oracle in the LICENSE file that accompanied this code.
4593#
4594# This code is distributed in the hope that it will be useful, but WITHOUT
4595# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4596# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4597# version 2 for more details (a copy is included in the LICENSE file that
4598# accompanied this code).
4599#
4600# You should have received a copy of the GNU General Public License version
4601# 2 along with this work; if not, write to the Free Software Foundation,
4602# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4603#
4604# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4605# or visit www.oracle.com if you need additional information or have any
4606# questions.
4607#
4608
4609################################################################################
4610# Setup libffi (Foreign Function Interface)
4611################################################################################
4612
4613
4614#
4615# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4616# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4617#
4618# This code is free software; you can redistribute it and/or modify it
4619# under the terms of the GNU General Public License version 2 only, as
4620# published by the Free Software Foundation.  Oracle designates this
4621# particular file as subject to the "Classpath" exception as provided
4622# by Oracle in the LICENSE file that accompanied this code.
4623#
4624# This code is distributed in the hope that it will be useful, but WITHOUT
4625# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4626# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4627# version 2 for more details (a copy is included in the LICENSE file that
4628# accompanied this code).
4629#
4630# You should have received a copy of the GNU General Public License version
4631# 2 along with this work; if not, write to the Free Software Foundation,
4632# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4633#
4634# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4635# or visit www.oracle.com if you need additional information or have any
4636# questions.
4637#
4638
4639################################################################################
4640# Build the freetype lib from source
4641################################################################################
4642
4643
4644################################################################################
4645# Check if a potential freeype library match is correct and usable
4646################################################################################
4647
4648
4649################################################################################
4650# Setup freetype (The FreeType2 font rendering library)
4651################################################################################
4652
4653
4654#
4655# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4656# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4657#
4658# This code is free software; you can redistribute it and/or modify it
4659# under the terms of the GNU General Public License version 2 only, as
4660# published by the Free Software Foundation.  Oracle designates this
4661# particular file as subject to the "Classpath" exception as provided
4662# by Oracle in the LICENSE file that accompanied this code.
4663#
4664# This code is distributed in the hope that it will be useful, but WITHOUT
4665# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4666# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4667# version 2 for more details (a copy is included in the LICENSE file that
4668# accompanied this code).
4669#
4670# You should have received a copy of the GNU General Public License version
4671# 2 along with this work; if not, write to the Free Software Foundation,
4672# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4673#
4674# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4675# or visit www.oracle.com if you need additional information or have any
4676# questions.
4677#
4678
4679################################################################################
4680# Setup the standard C/C++ runtime libraries.
4681#
4682# Most importantly, determine if stdc++ should be linked statically or
4683# dynamically.
4684################################################################################
4685
4686
4687#
4688# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4689# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4690#
4691# This code is free software; you can redistribute it and/or modify it
4692# under the terms of the GNU General Public License version 2 only, as
4693# published by the Free Software Foundation.  Oracle designates this
4694# particular file as subject to the "Classpath" exception as provided
4695# by Oracle in the LICENSE file that accompanied this code.
4696#
4697# This code is distributed in the hope that it will be useful, but WITHOUT
4698# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4699# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4700# version 2 for more details (a copy is included in the LICENSE file that
4701# accompanied this code).
4702#
4703# You should have received a copy of the GNU General Public License version
4704# 2 along with this work; if not, write to the Free Software Foundation,
4705# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4706#
4707# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4708# or visit www.oracle.com if you need additional information or have any
4709# questions.
4710#
4711
4712################################################################################
4713# Setup X11 Windows system
4714################################################################################
4715
4716
4717
4718################################################################################
4719# Determine which libraries are needed for this configuration
4720################################################################################
4721
4722
4723################################################################################
4724# Parse library options, and setup needed libraries
4725################################################################################
4726
4727
4728################################################################################
4729# Setup llvm (Low-Level VM)
4730################################################################################
4731
4732
4733################################################################################
4734# Setup various libraries, typically small system libraries
4735################################################################################
4736
4737
4738################################################################################
4739# libstlport.so.1 is needed for running gtest on Solaris. Find it to
4740# redistribute it in the test image.
4741################################################################################
4742
4743
4744
4745#
4746# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4747# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4748#
4749# This code is free software; you can redistribute it and/or modify it
4750# under the terms of the GNU General Public License version 2 only, as
4751# published by the Free Software Foundation.  Oracle designates this
4752# particular file as subject to the "Classpath" exception as provided
4753# by Oracle in the LICENSE file that accompanied this code.
4754#
4755# This code is distributed in the hope that it will be useful, but WITHOUT
4756# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4757# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4758# version 2 for more details (a copy is included in the LICENSE file that
4759# accompanied this code).
4760#
4761# You should have received a copy of the GNU General Public License version
4762# 2 along with this work; if not, write to the Free Software Foundation,
4763# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4764#
4765# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4766# or visit www.oracle.com if you need additional information or have any
4767# questions.
4768#
4769
4770# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4771# Converts autoconf style CPU name to OpenJDK style, into
4772# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4773
4774
4775# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4776# Converts autoconf style OS name to OpenJDK style, into
4777# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4778
4779
4780# Expects $host_os $host_cpu $build_os and $build_cpu
4781# and $with_target_bits to have been setup!
4782#
4783# Translate the standard triplet(quadruplet) definition
4784# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4785# OPENJDK_BUILD_OS, etc.
4786
4787
4788# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4789# accordingly. Must be done after setting up build and target system, but before
4790# doing anything else with these values.
4791
4792
4793# Setup the legacy variables, for controlling the old makefiles.
4794#
4795
4796
4797# $1 - Either TARGET or BUILD to setup the variables for.
4798
4799
4800
4801
4802#%%% Build and target systems %%%
4803
4804
4805
4806
4807# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4808# Add -mX to various FLAGS variables.
4809
4810
4811
4812
4813
4814
4815#
4816# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4817# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4818#
4819# This code is free software; you can redistribute it and/or modify it
4820# under the terms of the GNU General Public License version 2 only, as
4821# published by the Free Software Foundation.  Oracle designates this
4822# particular file as subject to the "Classpath" exception as provided
4823# by Oracle in the LICENSE file that accompanied this code.
4824#
4825# This code is distributed in the hope that it will be useful, but WITHOUT
4826# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4827# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4828# version 2 for more details (a copy is included in the LICENSE file that
4829# accompanied this code).
4830#
4831# You should have received a copy of the GNU General Public License version
4832# 2 along with this work; if not, write to the Free Software Foundation,
4833# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4834#
4835# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4836# or visit www.oracle.com if you need additional information or have any
4837# questions.
4838#
4839
4840
4841
4842
4843
4844
4845
4846################################################################################
4847# Define a mechanism for importing extra prebuilt modules
4848#
4849
4850
4851
4852#
4853# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4854# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4855#
4856# This code is free software; you can redistribute it and/or modify it
4857# under the terms of the GNU General Public License version 2 only, as
4858# published by the Free Software Foundation.  Oracle designates this
4859# particular file as subject to the "Classpath" exception as provided
4860# by Oracle in the LICENSE file that accompanied this code.
4861#
4862# This code is distributed in the hope that it will be useful, but WITHOUT
4863# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4864# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4865# version 2 for more details (a copy is included in the LICENSE file that
4866# accompanied this code).
4867#
4868# You should have received a copy of the GNU General Public License version
4869# 2 along with this work; if not, write to the Free Software Foundation,
4870# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4871#
4872# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4873# or visit www.oracle.com if you need additional information or have any
4874# questions.
4875#
4876
4877########################################################################
4878# This file is responsible for detecting, verifying and setting up the
4879# toolchain, i.e. the compiler, linker and related utilities. It will setup
4880# proper paths to the binaries, but it will not setup any flags.
4881#
4882# The binaries used is determined by the toolchain type, which is the family of
4883# compilers and related tools that are used.
4884########################################################################
4885
4886
4887# All valid toolchains, regardless of platform (used by help.m4)
4888VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4889
4890# These toolchains are valid on different platforms
4891VALID_TOOLCHAINS_linux="gcc clang"
4892VALID_TOOLCHAINS_solaris="solstudio"
4893VALID_TOOLCHAINS_macosx="gcc clang"
4894VALID_TOOLCHAINS_aix="xlc"
4895VALID_TOOLCHAINS_windows="microsoft"
4896
4897# Toolchain descriptions
4898TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4899TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4900TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4901TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4902TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4903
4904# Minimum supported versions, empty means unspecified
4905TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
4906TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
4907TOOLCHAIN_MINIMUM_VERSION_microsoft="16.00.30319.01" # VS2010
4908TOOLCHAIN_MINIMUM_VERSION_solstudio="5.13"
4909TOOLCHAIN_MINIMUM_VERSION_xlc=""
4910
4911# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
4912# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
4913# $1 - optional variable prefix for compiler and version variables (BUILD_)
4914# $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
4915
4916
4917# Check if the configured compiler (C and C++) is of a specific version or
4918# newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
4919#
4920# Arguments:
4921#   VERSION:   The version string to check against the found version
4922#   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
4923#   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
4924#   PREFIX:   Optional variable prefix for compiler to compare version for (OPENJDK_BUILD_)
4925
4926
4927
4928
4929# Setup a number of variables describing how native output files are
4930# named on this platform/toolchain.
4931
4932
4933# Determine which toolchain type to use, and make sure it is valid for this
4934# platform. Setup various information about the selected toolchain.
4935
4936
4937# Before we start detecting the toolchain executables, we might need some
4938# special setup, e.g. additional paths etc.
4939
4940
4941# Restore path, etc
4942
4943
4944# Check if a compiler is of the toolchain type we expect, and save the version
4945# information from it. If the compiler does not match the expected type,
4946# this function will abort using AC_MSG_ERROR. If it matches, the version will
4947# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4948# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4949#
4950# $1 = compiler to test (CC or CXX)
4951# $2 = human readable name of compiler (C or C++)
4952
4953
4954# Try to locate the given C or C++ compiler in the path, or otherwise.
4955#
4956# $1 = compiler to test (CC or CXX)
4957# $2 = human readable name of compiler (C or C++)
4958# $3 = list of compiler names to search for
4959
4960
4961# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4962# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4963# archiver (AR). Verify that the compilers are correct according to the
4964# toolchain type.
4965
4966
4967# Setup additional tools that is considered a part of the toolchain, but not the
4968# core part. Many of these are highly platform-specific and do not exist,
4969# and/or are not needed on all platforms.
4970
4971
4972# Setup the build tools (i.e, the compiler and linker used to build programs
4973# that should be run on the build platform, not the target platform, as a build
4974# helper). Since the non-cross-compile case uses the normal, target compilers
4975# for this, we can only do this after these have been setup.
4976
4977
4978# Do some additional checks on the detected tools.
4979
4980
4981# Setup the JTReg Regression Test Harness.
4982
4983
4984#
4985# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4986# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4987#
4988# This code is free software; you can redistribute it and/or modify it
4989# under the terms of the GNU General Public License version 2 only, as
4990# published by the Free Software Foundation.  Oracle designates this
4991# particular file as subject to the "Classpath" exception as provided
4992# by Oracle in the LICENSE file that accompanied this code.
4993#
4994# This code is distributed in the hope that it will be useful, but WITHOUT
4995# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4996# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4997# version 2 for more details (a copy is included in the LICENSE file that
4998# accompanied this code).
4999#
5000# You should have received a copy of the GNU General Public License version
5001# 2 along with this work; if not, write to the Free Software Foundation,
5002# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5003#
5004# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5005# or visit www.oracle.com if you need additional information or have any
5006# questions.
5007#
5008
5009################################################################################
5010# The order of these defines the priority by which we try to find them.
5011VALID_VS_VERSIONS="2013 2012 2010"
5012
5013VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
5014VS_VERSION_INTERNAL_2010=100
5015VS_MSVCR_2010=msvcr100.dll
5016# We don't use msvcp on Visual Studio 2010
5017#VS_MSVCP_2010=msvcp100.dll
5018VS_ENVVAR_2010="VS100COMNTOOLS"
5019VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
5020VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
5021VS_VS_PLATFORM_NAME_2010="v100"
5022VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
5023
5024VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
5025VS_VERSION_INTERNAL_2012=110
5026VS_MSVCR_2012=msvcr110.dll
5027VS_MSVCP_2012=msvcp110.dll
5028VS_ENVVAR_2012="VS110COMNTOOLS"
5029VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5030VS_SDK_INSTALLDIR_2012=
5031VS_VS_PLATFORM_NAME_2012="v110"
5032VS_SDK_PLATFORM_NAME_2012=
5033
5034VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5035VS_VERSION_INTERNAL_2013=120
5036VS_MSVCR_2013=msvcr120.dll
5037VS_MSVCP_2013=msvcp120.dll
5038VS_ENVVAR_2013="VS120COMNTOOLS"
5039VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5040VS_SDK_INSTALLDIR_2013=
5041VS_VS_PLATFORM_NAME_2013="v120"
5042VS_SDK_PLATFORM_NAME_2013=
5043
5044################################################################################
5045
5046
5047
5048################################################################################
5049
5050
5051
5052################################################################################
5053# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5054# build environment and assigns it to VS_ENV_CMD
5055
5056
5057################################################################################
5058
5059
5060
5061################################################################################
5062# Check if the VS env variables were setup prior to running configure.
5063# If not, then find vcvarsall.bat and run it automatically, and integrate
5064# the set env variables into the spec file.
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079# This line needs to be here, verbatim, after all includes and the dummy hook
5080# definitions. It is replaced with custom functionality when building
5081# custom sources.
5082#CUSTOM_AUTOCONF_INCLUDE
5083
5084# Do not change or remove the following line, it is needed for consistency checks:
5085DATE_WHEN_GENERATED=1481100369
5086
5087###############################################################################
5088#
5089# Initialization / Boot-strapping
5090#
5091# The bootstrapping process needs to solve the "chicken or the egg" problem,
5092# thus it jumps back and forth, each time gaining something needed later on.
5093#
5094###############################################################################
5095
5096# If we are requested to print additional help, do that and then exit.
5097# This must be the very first call.
5098
5099  if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5100
5101    # Print available toolchains
5102    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5103    $PRINTF "Which are valid to use depends on the build platform.\n"
5104    for toolchain in $VALID_TOOLCHAINS_all; do
5105      # Use indirect variable referencing
5106      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5107      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5108      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5109    done
5110    $PRINTF "\n"
5111
5112    # Print available jvm features
5113    $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5114    $PRINTF "Which are valid to use depends on the target platform.\n  "
5115    $PRINTF "%s " $VALID_JVM_FEATURES
5116    $PRINTF "\n"
5117
5118    # And now exit directly
5119    exit 0
5120  fi
5121
5122
5123# Basic initialization that must happen first of all in the normal process.
5124
5125  # Save the original command line. This is passed to us by the wrapper configure script.
5126
5127  # Save the path variable before it gets changed
5128  ORIGINAL_PATH="$PATH"
5129
5130  DATE_WHEN_CONFIGURED=`LANG=C date`
5131
5132  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5133$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5134  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5135$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5136
5137
5138  # Start with tools that do not need have cross compilation support
5139  # and can be expected to be found in the default PATH. These tools are
5140  # used by configure.
5141
5142  # First are all the simple required tools.
5143
5144
5145
5146  # Publish this variable in the help.
5147
5148
5149  if [ -z "${BASENAME+x}" ]; then
5150    # The variable is not set by user, try to locate tool using the code snippet
5151    for ac_prog in basename
5152do
5153  # Extract the first word of "$ac_prog", so it can be a program name with args.
5154set dummy $ac_prog; ac_word=$2
5155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5156$as_echo_n "checking for $ac_word... " >&6; }
5157if ${ac_cv_path_BASENAME+:} false; then :
5158  $as_echo_n "(cached) " >&6
5159else
5160  case $BASENAME in
5161  [\\/]* | ?:[\\/]*)
5162  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5163  ;;
5164  *)
5165  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5166for as_dir in $PATH
5167do
5168  IFS=$as_save_IFS
5169  test -z "$as_dir" && as_dir=.
5170    for ac_exec_ext in '' $ac_executable_extensions; do
5171  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5172    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5173    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5174    break 2
5175  fi
5176done
5177  done
5178IFS=$as_save_IFS
5179
5180  ;;
5181esac
5182fi
5183BASENAME=$ac_cv_path_BASENAME
5184if test -n "$BASENAME"; then
5185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5186$as_echo "$BASENAME" >&6; }
5187else
5188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5189$as_echo "no" >&6; }
5190fi
5191
5192
5193  test -n "$BASENAME" && break
5194done
5195
5196  else
5197    # The variable is set, but is it from the command line or the environment?
5198
5199    # Try to remove the string !BASENAME! from our list.
5200    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5201    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5202      # If it failed, the variable was not from the command line. Ignore it,
5203      # but warn the user (except for BASH, which is always set by the calling BASH).
5204      if test "xBASENAME" != xBASH; then
5205        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5206$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5207      fi
5208      # Try to locate tool using the code snippet
5209      for ac_prog in basename
5210do
5211  # Extract the first word of "$ac_prog", so it can be a program name with args.
5212set dummy $ac_prog; ac_word=$2
5213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5214$as_echo_n "checking for $ac_word... " >&6; }
5215if ${ac_cv_path_BASENAME+:} false; then :
5216  $as_echo_n "(cached) " >&6
5217else
5218  case $BASENAME in
5219  [\\/]* | ?:[\\/]*)
5220  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5221  ;;
5222  *)
5223  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5224for as_dir in $PATH
5225do
5226  IFS=$as_save_IFS
5227  test -z "$as_dir" && as_dir=.
5228    for ac_exec_ext in '' $ac_executable_extensions; do
5229  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5230    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5231    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5232    break 2
5233  fi
5234done
5235  done
5236IFS=$as_save_IFS
5237
5238  ;;
5239esac
5240fi
5241BASENAME=$ac_cv_path_BASENAME
5242if test -n "$BASENAME"; then
5243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5244$as_echo "$BASENAME" >&6; }
5245else
5246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5247$as_echo "no" >&6; }
5248fi
5249
5250
5251  test -n "$BASENAME" && break
5252done
5253
5254    else
5255      # If it succeeded, then it was overridden by the user. We will use it
5256      # for the tool.
5257
5258      # First remove it from the list of overridden variables, so we can test
5259      # for unknown variables in the end.
5260      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5261
5262      # Check if we try to supply an empty value
5263      if test "x$BASENAME" = x; then
5264        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5265$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5266        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5267$as_echo_n "checking for BASENAME... " >&6; }
5268        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5269$as_echo "disabled" >&6; }
5270      else
5271        # Check if the provided tool contains a complete path.
5272        tool_specified="$BASENAME"
5273        tool_basename="${tool_specified##*/}"
5274        if test "x$tool_basename" = "x$tool_specified"; then
5275          # A command without a complete path is provided, search $PATH.
5276          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5277$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5278          # Extract the first word of "$tool_basename", so it can be a program name with args.
5279set dummy $tool_basename; ac_word=$2
5280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5281$as_echo_n "checking for $ac_word... " >&6; }
5282if ${ac_cv_path_BASENAME+:} false; then :
5283  $as_echo_n "(cached) " >&6
5284else
5285  case $BASENAME in
5286  [\\/]* | ?:[\\/]*)
5287  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5288  ;;
5289  *)
5290  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5291for as_dir in $PATH
5292do
5293  IFS=$as_save_IFS
5294  test -z "$as_dir" && as_dir=.
5295    for ac_exec_ext in '' $ac_executable_extensions; do
5296  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5297    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5298    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5299    break 2
5300  fi
5301done
5302  done
5303IFS=$as_save_IFS
5304
5305  ;;
5306esac
5307fi
5308BASENAME=$ac_cv_path_BASENAME
5309if test -n "$BASENAME"; then
5310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5311$as_echo "$BASENAME" >&6; }
5312else
5313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5314$as_echo "no" >&6; }
5315fi
5316
5317
5318          if test "x$BASENAME" = x; then
5319            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5320          fi
5321        else
5322          # Otherwise we believe it is a complete path. Use it as it is.
5323          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5324$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5325          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5326$as_echo_n "checking for BASENAME... " >&6; }
5327          if test ! -x "$tool_specified"; then
5328            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5329$as_echo "not found" >&6; }
5330            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5331          fi
5332          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5333$as_echo "$tool_specified" >&6; }
5334        fi
5335      fi
5336    fi
5337
5338  fi
5339
5340
5341
5342  if test "x$BASENAME" = x; then
5343    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5344  fi
5345
5346
5347
5348
5349
5350  # Publish this variable in the help.
5351
5352
5353  if [ -z "${BASH+x}" ]; then
5354    # The variable is not set by user, try to locate tool using the code snippet
5355    for ac_prog in bash
5356do
5357  # Extract the first word of "$ac_prog", so it can be a program name with args.
5358set dummy $ac_prog; ac_word=$2
5359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5360$as_echo_n "checking for $ac_word... " >&6; }
5361if ${ac_cv_path_BASH+:} false; then :
5362  $as_echo_n "(cached) " >&6
5363else
5364  case $BASH in
5365  [\\/]* | ?:[\\/]*)
5366  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5367  ;;
5368  *)
5369  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5370for as_dir in $PATH
5371do
5372  IFS=$as_save_IFS
5373  test -z "$as_dir" && as_dir=.
5374    for ac_exec_ext in '' $ac_executable_extensions; do
5375  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5376    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5377    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5378    break 2
5379  fi
5380done
5381  done
5382IFS=$as_save_IFS
5383
5384  ;;
5385esac
5386fi
5387BASH=$ac_cv_path_BASH
5388if test -n "$BASH"; then
5389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5390$as_echo "$BASH" >&6; }
5391else
5392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5393$as_echo "no" >&6; }
5394fi
5395
5396
5397  test -n "$BASH" && break
5398done
5399
5400  else
5401    # The variable is set, but is it from the command line or the environment?
5402
5403    # Try to remove the string !BASH! from our list.
5404    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5405    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5406      # If it failed, the variable was not from the command line. Ignore it,
5407      # but warn the user (except for BASH, which is always set by the calling BASH).
5408      if test "xBASH" != xBASH; then
5409        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5410$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5411      fi
5412      # Try to locate tool using the code snippet
5413      for ac_prog in bash
5414do
5415  # Extract the first word of "$ac_prog", so it can be a program name with args.
5416set dummy $ac_prog; ac_word=$2
5417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5418$as_echo_n "checking for $ac_word... " >&6; }
5419if ${ac_cv_path_BASH+:} false; then :
5420  $as_echo_n "(cached) " >&6
5421else
5422  case $BASH in
5423  [\\/]* | ?:[\\/]*)
5424  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5425  ;;
5426  *)
5427  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5428for as_dir in $PATH
5429do
5430  IFS=$as_save_IFS
5431  test -z "$as_dir" && as_dir=.
5432    for ac_exec_ext in '' $ac_executable_extensions; do
5433  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5434    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5435    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5436    break 2
5437  fi
5438done
5439  done
5440IFS=$as_save_IFS
5441
5442  ;;
5443esac
5444fi
5445BASH=$ac_cv_path_BASH
5446if test -n "$BASH"; then
5447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5448$as_echo "$BASH" >&6; }
5449else
5450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5451$as_echo "no" >&6; }
5452fi
5453
5454
5455  test -n "$BASH" && break
5456done
5457
5458    else
5459      # If it succeeded, then it was overridden by the user. We will use it
5460      # for the tool.
5461
5462      # First remove it from the list of overridden variables, so we can test
5463      # for unknown variables in the end.
5464      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5465
5466      # Check if we try to supply an empty value
5467      if test "x$BASH" = x; then
5468        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5469$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5470        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5471$as_echo_n "checking for BASH... " >&6; }
5472        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5473$as_echo "disabled" >&6; }
5474      else
5475        # Check if the provided tool contains a complete path.
5476        tool_specified="$BASH"
5477        tool_basename="${tool_specified##*/}"
5478        if test "x$tool_basename" = "x$tool_specified"; then
5479          # A command without a complete path is provided, search $PATH.
5480          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5481$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5482          # Extract the first word of "$tool_basename", so it can be a program name with args.
5483set dummy $tool_basename; ac_word=$2
5484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5485$as_echo_n "checking for $ac_word... " >&6; }
5486if ${ac_cv_path_BASH+:} false; then :
5487  $as_echo_n "(cached) " >&6
5488else
5489  case $BASH in
5490  [\\/]* | ?:[\\/]*)
5491  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5492  ;;
5493  *)
5494  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5495for as_dir in $PATH
5496do
5497  IFS=$as_save_IFS
5498  test -z "$as_dir" && as_dir=.
5499    for ac_exec_ext in '' $ac_executable_extensions; do
5500  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5501    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5502    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5503    break 2
5504  fi
5505done
5506  done
5507IFS=$as_save_IFS
5508
5509  ;;
5510esac
5511fi
5512BASH=$ac_cv_path_BASH
5513if test -n "$BASH"; then
5514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5515$as_echo "$BASH" >&6; }
5516else
5517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5518$as_echo "no" >&6; }
5519fi
5520
5521
5522          if test "x$BASH" = x; then
5523            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5524          fi
5525        else
5526          # Otherwise we believe it is a complete path. Use it as it is.
5527          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5528$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5529          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5530$as_echo_n "checking for BASH... " >&6; }
5531          if test ! -x "$tool_specified"; then
5532            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5533$as_echo "not found" >&6; }
5534            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5535          fi
5536          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5537$as_echo "$tool_specified" >&6; }
5538        fi
5539      fi
5540    fi
5541
5542  fi
5543
5544
5545
5546  if test "x$BASH" = x; then
5547    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5548  fi
5549
5550
5551
5552
5553
5554  # Publish this variable in the help.
5555
5556
5557  if [ -z "${CAT+x}" ]; then
5558    # The variable is not set by user, try to locate tool using the code snippet
5559    for ac_prog in cat
5560do
5561  # Extract the first word of "$ac_prog", so it can be a program name with args.
5562set dummy $ac_prog; ac_word=$2
5563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5564$as_echo_n "checking for $ac_word... " >&6; }
5565if ${ac_cv_path_CAT+:} false; then :
5566  $as_echo_n "(cached) " >&6
5567else
5568  case $CAT in
5569  [\\/]* | ?:[\\/]*)
5570  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5571  ;;
5572  *)
5573  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5574for as_dir in $PATH
5575do
5576  IFS=$as_save_IFS
5577  test -z "$as_dir" && as_dir=.
5578    for ac_exec_ext in '' $ac_executable_extensions; do
5579  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5580    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5581    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5582    break 2
5583  fi
5584done
5585  done
5586IFS=$as_save_IFS
5587
5588  ;;
5589esac
5590fi
5591CAT=$ac_cv_path_CAT
5592if test -n "$CAT"; then
5593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5594$as_echo "$CAT" >&6; }
5595else
5596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5597$as_echo "no" >&6; }
5598fi
5599
5600
5601  test -n "$CAT" && break
5602done
5603
5604  else
5605    # The variable is set, but is it from the command line or the environment?
5606
5607    # Try to remove the string !CAT! from our list.
5608    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5609    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5610      # If it failed, the variable was not from the command line. Ignore it,
5611      # but warn the user (except for BASH, which is always set by the calling BASH).
5612      if test "xCAT" != xBASH; then
5613        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5614$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5615      fi
5616      # Try to locate tool using the code snippet
5617      for ac_prog in cat
5618do
5619  # Extract the first word of "$ac_prog", so it can be a program name with args.
5620set dummy $ac_prog; ac_word=$2
5621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5622$as_echo_n "checking for $ac_word... " >&6; }
5623if ${ac_cv_path_CAT+:} false; then :
5624  $as_echo_n "(cached) " >&6
5625else
5626  case $CAT in
5627  [\\/]* | ?:[\\/]*)
5628  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5629  ;;
5630  *)
5631  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5632for as_dir in $PATH
5633do
5634  IFS=$as_save_IFS
5635  test -z "$as_dir" && as_dir=.
5636    for ac_exec_ext in '' $ac_executable_extensions; do
5637  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5638    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5639    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5640    break 2
5641  fi
5642done
5643  done
5644IFS=$as_save_IFS
5645
5646  ;;
5647esac
5648fi
5649CAT=$ac_cv_path_CAT
5650if test -n "$CAT"; then
5651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5652$as_echo "$CAT" >&6; }
5653else
5654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5655$as_echo "no" >&6; }
5656fi
5657
5658
5659  test -n "$CAT" && break
5660done
5661
5662    else
5663      # If it succeeded, then it was overridden by the user. We will use it
5664      # for the tool.
5665
5666      # First remove it from the list of overridden variables, so we can test
5667      # for unknown variables in the end.
5668      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5669
5670      # Check if we try to supply an empty value
5671      if test "x$CAT" = x; then
5672        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5673$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5674        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5675$as_echo_n "checking for CAT... " >&6; }
5676        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5677$as_echo "disabled" >&6; }
5678      else
5679        # Check if the provided tool contains a complete path.
5680        tool_specified="$CAT"
5681        tool_basename="${tool_specified##*/}"
5682        if test "x$tool_basename" = "x$tool_specified"; then
5683          # A command without a complete path is provided, search $PATH.
5684          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5685$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5686          # Extract the first word of "$tool_basename", so it can be a program name with args.
5687set dummy $tool_basename; ac_word=$2
5688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5689$as_echo_n "checking for $ac_word... " >&6; }
5690if ${ac_cv_path_CAT+:} false; then :
5691  $as_echo_n "(cached) " >&6
5692else
5693  case $CAT in
5694  [\\/]* | ?:[\\/]*)
5695  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5696  ;;
5697  *)
5698  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5699for as_dir in $PATH
5700do
5701  IFS=$as_save_IFS
5702  test -z "$as_dir" && as_dir=.
5703    for ac_exec_ext in '' $ac_executable_extensions; do
5704  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5705    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5706    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5707    break 2
5708  fi
5709done
5710  done
5711IFS=$as_save_IFS
5712
5713  ;;
5714esac
5715fi
5716CAT=$ac_cv_path_CAT
5717if test -n "$CAT"; then
5718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5719$as_echo "$CAT" >&6; }
5720else
5721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5722$as_echo "no" >&6; }
5723fi
5724
5725
5726          if test "x$CAT" = x; then
5727            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5728          fi
5729        else
5730          # Otherwise we believe it is a complete path. Use it as it is.
5731          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5732$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5733          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5734$as_echo_n "checking for CAT... " >&6; }
5735          if test ! -x "$tool_specified"; then
5736            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5737$as_echo "not found" >&6; }
5738            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5739          fi
5740          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5741$as_echo "$tool_specified" >&6; }
5742        fi
5743      fi
5744    fi
5745
5746  fi
5747
5748
5749
5750  if test "x$CAT" = x; then
5751    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5752  fi
5753
5754
5755
5756
5757
5758  # Publish this variable in the help.
5759
5760
5761  if [ -z "${CHMOD+x}" ]; then
5762    # The variable is not set by user, try to locate tool using the code snippet
5763    for ac_prog in chmod
5764do
5765  # Extract the first word of "$ac_prog", so it can be a program name with args.
5766set dummy $ac_prog; ac_word=$2
5767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5768$as_echo_n "checking for $ac_word... " >&6; }
5769if ${ac_cv_path_CHMOD+:} false; then :
5770  $as_echo_n "(cached) " >&6
5771else
5772  case $CHMOD in
5773  [\\/]* | ?:[\\/]*)
5774  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5775  ;;
5776  *)
5777  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5778for as_dir in $PATH
5779do
5780  IFS=$as_save_IFS
5781  test -z "$as_dir" && as_dir=.
5782    for ac_exec_ext in '' $ac_executable_extensions; do
5783  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5784    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5785    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5786    break 2
5787  fi
5788done
5789  done
5790IFS=$as_save_IFS
5791
5792  ;;
5793esac
5794fi
5795CHMOD=$ac_cv_path_CHMOD
5796if test -n "$CHMOD"; then
5797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5798$as_echo "$CHMOD" >&6; }
5799else
5800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5801$as_echo "no" >&6; }
5802fi
5803
5804
5805  test -n "$CHMOD" && break
5806done
5807
5808  else
5809    # The variable is set, but is it from the command line or the environment?
5810
5811    # Try to remove the string !CHMOD! from our list.
5812    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5813    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5814      # If it failed, the variable was not from the command line. Ignore it,
5815      # but warn the user (except for BASH, which is always set by the calling BASH).
5816      if test "xCHMOD" != xBASH; then
5817        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5818$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5819      fi
5820      # Try to locate tool using the code snippet
5821      for ac_prog in chmod
5822do
5823  # Extract the first word of "$ac_prog", so it can be a program name with args.
5824set dummy $ac_prog; ac_word=$2
5825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5826$as_echo_n "checking for $ac_word... " >&6; }
5827if ${ac_cv_path_CHMOD+:} false; then :
5828  $as_echo_n "(cached) " >&6
5829else
5830  case $CHMOD in
5831  [\\/]* | ?:[\\/]*)
5832  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5833  ;;
5834  *)
5835  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5836for as_dir in $PATH
5837do
5838  IFS=$as_save_IFS
5839  test -z "$as_dir" && as_dir=.
5840    for ac_exec_ext in '' $ac_executable_extensions; do
5841  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5842    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5843    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5844    break 2
5845  fi
5846done
5847  done
5848IFS=$as_save_IFS
5849
5850  ;;
5851esac
5852fi
5853CHMOD=$ac_cv_path_CHMOD
5854if test -n "$CHMOD"; then
5855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5856$as_echo "$CHMOD" >&6; }
5857else
5858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5859$as_echo "no" >&6; }
5860fi
5861
5862
5863  test -n "$CHMOD" && break
5864done
5865
5866    else
5867      # If it succeeded, then it was overridden by the user. We will use it
5868      # for the tool.
5869
5870      # First remove it from the list of overridden variables, so we can test
5871      # for unknown variables in the end.
5872      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5873
5874      # Check if we try to supply an empty value
5875      if test "x$CHMOD" = x; then
5876        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5877$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5878        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5879$as_echo_n "checking for CHMOD... " >&6; }
5880        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5881$as_echo "disabled" >&6; }
5882      else
5883        # Check if the provided tool contains a complete path.
5884        tool_specified="$CHMOD"
5885        tool_basename="${tool_specified##*/}"
5886        if test "x$tool_basename" = "x$tool_specified"; then
5887          # A command without a complete path is provided, search $PATH.
5888          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5889$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5890          # Extract the first word of "$tool_basename", so it can be a program name with args.
5891set dummy $tool_basename; ac_word=$2
5892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5893$as_echo_n "checking for $ac_word... " >&6; }
5894if ${ac_cv_path_CHMOD+:} false; then :
5895  $as_echo_n "(cached) " >&6
5896else
5897  case $CHMOD in
5898  [\\/]* | ?:[\\/]*)
5899  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5900  ;;
5901  *)
5902  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5903for as_dir in $PATH
5904do
5905  IFS=$as_save_IFS
5906  test -z "$as_dir" && as_dir=.
5907    for ac_exec_ext in '' $ac_executable_extensions; do
5908  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5909    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5910    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5911    break 2
5912  fi
5913done
5914  done
5915IFS=$as_save_IFS
5916
5917  ;;
5918esac
5919fi
5920CHMOD=$ac_cv_path_CHMOD
5921if test -n "$CHMOD"; then
5922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5923$as_echo "$CHMOD" >&6; }
5924else
5925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5926$as_echo "no" >&6; }
5927fi
5928
5929
5930          if test "x$CHMOD" = x; then
5931            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5932          fi
5933        else
5934          # Otherwise we believe it is a complete path. Use it as it is.
5935          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5936$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5937          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5938$as_echo_n "checking for CHMOD... " >&6; }
5939          if test ! -x "$tool_specified"; then
5940            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5941$as_echo "not found" >&6; }
5942            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5943          fi
5944          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5945$as_echo "$tool_specified" >&6; }
5946        fi
5947      fi
5948    fi
5949
5950  fi
5951
5952
5953
5954  if test "x$CHMOD" = x; then
5955    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5956  fi
5957
5958
5959
5960
5961
5962  # Publish this variable in the help.
5963
5964
5965  if [ -z "${CMP+x}" ]; then
5966    # The variable is not set by user, try to locate tool using the code snippet
5967    for ac_prog in cmp
5968do
5969  # Extract the first word of "$ac_prog", so it can be a program name with args.
5970set dummy $ac_prog; ac_word=$2
5971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5972$as_echo_n "checking for $ac_word... " >&6; }
5973if ${ac_cv_path_CMP+:} false; then :
5974  $as_echo_n "(cached) " >&6
5975else
5976  case $CMP in
5977  [\\/]* | ?:[\\/]*)
5978  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5979  ;;
5980  *)
5981  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5982for as_dir in $PATH
5983do
5984  IFS=$as_save_IFS
5985  test -z "$as_dir" && as_dir=.
5986    for ac_exec_ext in '' $ac_executable_extensions; do
5987  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5988    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5989    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5990    break 2
5991  fi
5992done
5993  done
5994IFS=$as_save_IFS
5995
5996  ;;
5997esac
5998fi
5999CMP=$ac_cv_path_CMP
6000if test -n "$CMP"; then
6001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6002$as_echo "$CMP" >&6; }
6003else
6004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6005$as_echo "no" >&6; }
6006fi
6007
6008
6009  test -n "$CMP" && break
6010done
6011
6012  else
6013    # The variable is set, but is it from the command line or the environment?
6014
6015    # Try to remove the string !CMP! from our list.
6016    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
6017    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6018      # If it failed, the variable was not from the command line. Ignore it,
6019      # but warn the user (except for BASH, which is always set by the calling BASH).
6020      if test "xCMP" != xBASH; then
6021        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
6022$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
6023      fi
6024      # Try to locate tool using the code snippet
6025      for ac_prog in cmp
6026do
6027  # Extract the first word of "$ac_prog", so it can be a program name with args.
6028set dummy $ac_prog; ac_word=$2
6029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6030$as_echo_n "checking for $ac_word... " >&6; }
6031if ${ac_cv_path_CMP+:} false; then :
6032  $as_echo_n "(cached) " >&6
6033else
6034  case $CMP in
6035  [\\/]* | ?:[\\/]*)
6036  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6037  ;;
6038  *)
6039  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6040for as_dir in $PATH
6041do
6042  IFS=$as_save_IFS
6043  test -z "$as_dir" && as_dir=.
6044    for ac_exec_ext in '' $ac_executable_extensions; do
6045  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6046    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6047    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6048    break 2
6049  fi
6050done
6051  done
6052IFS=$as_save_IFS
6053
6054  ;;
6055esac
6056fi
6057CMP=$ac_cv_path_CMP
6058if test -n "$CMP"; then
6059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6060$as_echo "$CMP" >&6; }
6061else
6062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6063$as_echo "no" >&6; }
6064fi
6065
6066
6067  test -n "$CMP" && break
6068done
6069
6070    else
6071      # If it succeeded, then it was overridden by the user. We will use it
6072      # for the tool.
6073
6074      # First remove it from the list of overridden variables, so we can test
6075      # for unknown variables in the end.
6076      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6077
6078      # Check if we try to supply an empty value
6079      if test "x$CMP" = x; then
6080        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6081$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6082        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6083$as_echo_n "checking for CMP... " >&6; }
6084        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6085$as_echo "disabled" >&6; }
6086      else
6087        # Check if the provided tool contains a complete path.
6088        tool_specified="$CMP"
6089        tool_basename="${tool_specified##*/}"
6090        if test "x$tool_basename" = "x$tool_specified"; then
6091          # A command without a complete path is provided, search $PATH.
6092          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6093$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6094          # Extract the first word of "$tool_basename", so it can be a program name with args.
6095set dummy $tool_basename; ac_word=$2
6096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6097$as_echo_n "checking for $ac_word... " >&6; }
6098if ${ac_cv_path_CMP+:} false; then :
6099  $as_echo_n "(cached) " >&6
6100else
6101  case $CMP in
6102  [\\/]* | ?:[\\/]*)
6103  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6104  ;;
6105  *)
6106  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6107for as_dir in $PATH
6108do
6109  IFS=$as_save_IFS
6110  test -z "$as_dir" && as_dir=.
6111    for ac_exec_ext in '' $ac_executable_extensions; do
6112  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6113    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6114    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6115    break 2
6116  fi
6117done
6118  done
6119IFS=$as_save_IFS
6120
6121  ;;
6122esac
6123fi
6124CMP=$ac_cv_path_CMP
6125if test -n "$CMP"; then
6126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6127$as_echo "$CMP" >&6; }
6128else
6129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6130$as_echo "no" >&6; }
6131fi
6132
6133
6134          if test "x$CMP" = x; then
6135            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6136          fi
6137        else
6138          # Otherwise we believe it is a complete path. Use it as it is.
6139          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6140$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6141          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6142$as_echo_n "checking for CMP... " >&6; }
6143          if test ! -x "$tool_specified"; then
6144            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6145$as_echo "not found" >&6; }
6146            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6147          fi
6148          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6149$as_echo "$tool_specified" >&6; }
6150        fi
6151      fi
6152    fi
6153
6154  fi
6155
6156
6157
6158  if test "x$CMP" = x; then
6159    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6160  fi
6161
6162
6163
6164
6165
6166  # Publish this variable in the help.
6167
6168
6169  if [ -z "${COMM+x}" ]; then
6170    # The variable is not set by user, try to locate tool using the code snippet
6171    for ac_prog in comm
6172do
6173  # Extract the first word of "$ac_prog", so it can be a program name with args.
6174set dummy $ac_prog; ac_word=$2
6175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6176$as_echo_n "checking for $ac_word... " >&6; }
6177if ${ac_cv_path_COMM+:} false; then :
6178  $as_echo_n "(cached) " >&6
6179else
6180  case $COMM in
6181  [\\/]* | ?:[\\/]*)
6182  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6183  ;;
6184  *)
6185  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6186for as_dir in $PATH
6187do
6188  IFS=$as_save_IFS
6189  test -z "$as_dir" && as_dir=.
6190    for ac_exec_ext in '' $ac_executable_extensions; do
6191  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6192    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6193    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6194    break 2
6195  fi
6196done
6197  done
6198IFS=$as_save_IFS
6199
6200  ;;
6201esac
6202fi
6203COMM=$ac_cv_path_COMM
6204if test -n "$COMM"; then
6205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6206$as_echo "$COMM" >&6; }
6207else
6208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6209$as_echo "no" >&6; }
6210fi
6211
6212
6213  test -n "$COMM" && break
6214done
6215
6216  else
6217    # The variable is set, but is it from the command line or the environment?
6218
6219    # Try to remove the string !COMM! from our list.
6220    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6221    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6222      # If it failed, the variable was not from the command line. Ignore it,
6223      # but warn the user (except for BASH, which is always set by the calling BASH).
6224      if test "xCOMM" != xBASH; then
6225        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6226$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6227      fi
6228      # Try to locate tool using the code snippet
6229      for ac_prog in comm
6230do
6231  # Extract the first word of "$ac_prog", so it can be a program name with args.
6232set dummy $ac_prog; ac_word=$2
6233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6234$as_echo_n "checking for $ac_word... " >&6; }
6235if ${ac_cv_path_COMM+:} false; then :
6236  $as_echo_n "(cached) " >&6
6237else
6238  case $COMM in
6239  [\\/]* | ?:[\\/]*)
6240  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6241  ;;
6242  *)
6243  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6244for as_dir in $PATH
6245do
6246  IFS=$as_save_IFS
6247  test -z "$as_dir" && as_dir=.
6248    for ac_exec_ext in '' $ac_executable_extensions; do
6249  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6250    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6251    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6252    break 2
6253  fi
6254done
6255  done
6256IFS=$as_save_IFS
6257
6258  ;;
6259esac
6260fi
6261COMM=$ac_cv_path_COMM
6262if test -n "$COMM"; then
6263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6264$as_echo "$COMM" >&6; }
6265else
6266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6267$as_echo "no" >&6; }
6268fi
6269
6270
6271  test -n "$COMM" && break
6272done
6273
6274    else
6275      # If it succeeded, then it was overridden by the user. We will use it
6276      # for the tool.
6277
6278      # First remove it from the list of overridden variables, so we can test
6279      # for unknown variables in the end.
6280      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6281
6282      # Check if we try to supply an empty value
6283      if test "x$COMM" = x; then
6284        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6285$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6286        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6287$as_echo_n "checking for COMM... " >&6; }
6288        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6289$as_echo "disabled" >&6; }
6290      else
6291        # Check if the provided tool contains a complete path.
6292        tool_specified="$COMM"
6293        tool_basename="${tool_specified##*/}"
6294        if test "x$tool_basename" = "x$tool_specified"; then
6295          # A command without a complete path is provided, search $PATH.
6296          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6297$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6298          # Extract the first word of "$tool_basename", so it can be a program name with args.
6299set dummy $tool_basename; ac_word=$2
6300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6301$as_echo_n "checking for $ac_word... " >&6; }
6302if ${ac_cv_path_COMM+:} false; then :
6303  $as_echo_n "(cached) " >&6
6304else
6305  case $COMM in
6306  [\\/]* | ?:[\\/]*)
6307  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6308  ;;
6309  *)
6310  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6311for as_dir in $PATH
6312do
6313  IFS=$as_save_IFS
6314  test -z "$as_dir" && as_dir=.
6315    for ac_exec_ext in '' $ac_executable_extensions; do
6316  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6317    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6318    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6319    break 2
6320  fi
6321done
6322  done
6323IFS=$as_save_IFS
6324
6325  ;;
6326esac
6327fi
6328COMM=$ac_cv_path_COMM
6329if test -n "$COMM"; then
6330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6331$as_echo "$COMM" >&6; }
6332else
6333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6334$as_echo "no" >&6; }
6335fi
6336
6337
6338          if test "x$COMM" = x; then
6339            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6340          fi
6341        else
6342          # Otherwise we believe it is a complete path. Use it as it is.
6343          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6344$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6345          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6346$as_echo_n "checking for COMM... " >&6; }
6347          if test ! -x "$tool_specified"; then
6348            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6349$as_echo "not found" >&6; }
6350            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6351          fi
6352          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6353$as_echo "$tool_specified" >&6; }
6354        fi
6355      fi
6356    fi
6357
6358  fi
6359
6360
6361
6362  if test "x$COMM" = x; then
6363    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6364  fi
6365
6366
6367
6368
6369
6370  # Publish this variable in the help.
6371
6372
6373  if [ -z "${CP+x}" ]; then
6374    # The variable is not set by user, try to locate tool using the code snippet
6375    for ac_prog in cp
6376do
6377  # Extract the first word of "$ac_prog", so it can be a program name with args.
6378set dummy $ac_prog; ac_word=$2
6379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6380$as_echo_n "checking for $ac_word... " >&6; }
6381if ${ac_cv_path_CP+:} false; then :
6382  $as_echo_n "(cached) " >&6
6383else
6384  case $CP in
6385  [\\/]* | ?:[\\/]*)
6386  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6387  ;;
6388  *)
6389  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6390for as_dir in $PATH
6391do
6392  IFS=$as_save_IFS
6393  test -z "$as_dir" && as_dir=.
6394    for ac_exec_ext in '' $ac_executable_extensions; do
6395  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6396    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6397    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6398    break 2
6399  fi
6400done
6401  done
6402IFS=$as_save_IFS
6403
6404  ;;
6405esac
6406fi
6407CP=$ac_cv_path_CP
6408if test -n "$CP"; then
6409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6410$as_echo "$CP" >&6; }
6411else
6412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6413$as_echo "no" >&6; }
6414fi
6415
6416
6417  test -n "$CP" && break
6418done
6419
6420  else
6421    # The variable is set, but is it from the command line or the environment?
6422
6423    # Try to remove the string !CP! from our list.
6424    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6425    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6426      # If it failed, the variable was not from the command line. Ignore it,
6427      # but warn the user (except for BASH, which is always set by the calling BASH).
6428      if test "xCP" != xBASH; then
6429        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6430$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6431      fi
6432      # Try to locate tool using the code snippet
6433      for ac_prog in cp
6434do
6435  # Extract the first word of "$ac_prog", so it can be a program name with args.
6436set dummy $ac_prog; ac_word=$2
6437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6438$as_echo_n "checking for $ac_word... " >&6; }
6439if ${ac_cv_path_CP+:} false; then :
6440  $as_echo_n "(cached) " >&6
6441else
6442  case $CP in
6443  [\\/]* | ?:[\\/]*)
6444  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6445  ;;
6446  *)
6447  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6448for as_dir in $PATH
6449do
6450  IFS=$as_save_IFS
6451  test -z "$as_dir" && as_dir=.
6452    for ac_exec_ext in '' $ac_executable_extensions; do
6453  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6454    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6455    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6456    break 2
6457  fi
6458done
6459  done
6460IFS=$as_save_IFS
6461
6462  ;;
6463esac
6464fi
6465CP=$ac_cv_path_CP
6466if test -n "$CP"; then
6467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6468$as_echo "$CP" >&6; }
6469else
6470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6471$as_echo "no" >&6; }
6472fi
6473
6474
6475  test -n "$CP" && break
6476done
6477
6478    else
6479      # If it succeeded, then it was overridden by the user. We will use it
6480      # for the tool.
6481
6482      # First remove it from the list of overridden variables, so we can test
6483      # for unknown variables in the end.
6484      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6485
6486      # Check if we try to supply an empty value
6487      if test "x$CP" = x; then
6488        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6489$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6490        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6491$as_echo_n "checking for CP... " >&6; }
6492        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6493$as_echo "disabled" >&6; }
6494      else
6495        # Check if the provided tool contains a complete path.
6496        tool_specified="$CP"
6497        tool_basename="${tool_specified##*/}"
6498        if test "x$tool_basename" = "x$tool_specified"; then
6499          # A command without a complete path is provided, search $PATH.
6500          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6501$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6502          # Extract the first word of "$tool_basename", so it can be a program name with args.
6503set dummy $tool_basename; ac_word=$2
6504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6505$as_echo_n "checking for $ac_word... " >&6; }
6506if ${ac_cv_path_CP+:} false; then :
6507  $as_echo_n "(cached) " >&6
6508else
6509  case $CP in
6510  [\\/]* | ?:[\\/]*)
6511  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6512  ;;
6513  *)
6514  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6515for as_dir in $PATH
6516do
6517  IFS=$as_save_IFS
6518  test -z "$as_dir" && as_dir=.
6519    for ac_exec_ext in '' $ac_executable_extensions; do
6520  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6521    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6522    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6523    break 2
6524  fi
6525done
6526  done
6527IFS=$as_save_IFS
6528
6529  ;;
6530esac
6531fi
6532CP=$ac_cv_path_CP
6533if test -n "$CP"; then
6534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6535$as_echo "$CP" >&6; }
6536else
6537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6538$as_echo "no" >&6; }
6539fi
6540
6541
6542          if test "x$CP" = x; then
6543            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6544          fi
6545        else
6546          # Otherwise we believe it is a complete path. Use it as it is.
6547          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6548$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6549          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6550$as_echo_n "checking for CP... " >&6; }
6551          if test ! -x "$tool_specified"; then
6552            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6553$as_echo "not found" >&6; }
6554            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6555          fi
6556          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6557$as_echo "$tool_specified" >&6; }
6558        fi
6559      fi
6560    fi
6561
6562  fi
6563
6564
6565
6566  if test "x$CP" = x; then
6567    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6568  fi
6569
6570
6571
6572
6573
6574  # Publish this variable in the help.
6575
6576
6577  if [ -z "${CUT+x}" ]; then
6578    # The variable is not set by user, try to locate tool using the code snippet
6579    for ac_prog in cut
6580do
6581  # Extract the first word of "$ac_prog", so it can be a program name with args.
6582set dummy $ac_prog; ac_word=$2
6583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6584$as_echo_n "checking for $ac_word... " >&6; }
6585if ${ac_cv_path_CUT+:} false; then :
6586  $as_echo_n "(cached) " >&6
6587else
6588  case $CUT in
6589  [\\/]* | ?:[\\/]*)
6590  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6591  ;;
6592  *)
6593  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6594for as_dir in $PATH
6595do
6596  IFS=$as_save_IFS
6597  test -z "$as_dir" && as_dir=.
6598    for ac_exec_ext in '' $ac_executable_extensions; do
6599  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6600    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6601    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6602    break 2
6603  fi
6604done
6605  done
6606IFS=$as_save_IFS
6607
6608  ;;
6609esac
6610fi
6611CUT=$ac_cv_path_CUT
6612if test -n "$CUT"; then
6613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6614$as_echo "$CUT" >&6; }
6615else
6616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6617$as_echo "no" >&6; }
6618fi
6619
6620
6621  test -n "$CUT" && break
6622done
6623
6624  else
6625    # The variable is set, but is it from the command line or the environment?
6626
6627    # Try to remove the string !CUT! from our list.
6628    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6629    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6630      # If it failed, the variable was not from the command line. Ignore it,
6631      # but warn the user (except for BASH, which is always set by the calling BASH).
6632      if test "xCUT" != xBASH; then
6633        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6634$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6635      fi
6636      # Try to locate tool using the code snippet
6637      for ac_prog in cut
6638do
6639  # Extract the first word of "$ac_prog", so it can be a program name with args.
6640set dummy $ac_prog; ac_word=$2
6641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6642$as_echo_n "checking for $ac_word... " >&6; }
6643if ${ac_cv_path_CUT+:} false; then :
6644  $as_echo_n "(cached) " >&6
6645else
6646  case $CUT in
6647  [\\/]* | ?:[\\/]*)
6648  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6649  ;;
6650  *)
6651  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6652for as_dir in $PATH
6653do
6654  IFS=$as_save_IFS
6655  test -z "$as_dir" && as_dir=.
6656    for ac_exec_ext in '' $ac_executable_extensions; do
6657  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6658    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6659    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6660    break 2
6661  fi
6662done
6663  done
6664IFS=$as_save_IFS
6665
6666  ;;
6667esac
6668fi
6669CUT=$ac_cv_path_CUT
6670if test -n "$CUT"; then
6671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6672$as_echo "$CUT" >&6; }
6673else
6674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6675$as_echo "no" >&6; }
6676fi
6677
6678
6679  test -n "$CUT" && break
6680done
6681
6682    else
6683      # If it succeeded, then it was overridden by the user. We will use it
6684      # for the tool.
6685
6686      # First remove it from the list of overridden variables, so we can test
6687      # for unknown variables in the end.
6688      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6689
6690      # Check if we try to supply an empty value
6691      if test "x$CUT" = x; then
6692        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6693$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6694        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6695$as_echo_n "checking for CUT... " >&6; }
6696        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6697$as_echo "disabled" >&6; }
6698      else
6699        # Check if the provided tool contains a complete path.
6700        tool_specified="$CUT"
6701        tool_basename="${tool_specified##*/}"
6702        if test "x$tool_basename" = "x$tool_specified"; then
6703          # A command without a complete path is provided, search $PATH.
6704          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6705$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6706          # Extract the first word of "$tool_basename", so it can be a program name with args.
6707set dummy $tool_basename; ac_word=$2
6708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6709$as_echo_n "checking for $ac_word... " >&6; }
6710if ${ac_cv_path_CUT+:} false; then :
6711  $as_echo_n "(cached) " >&6
6712else
6713  case $CUT in
6714  [\\/]* | ?:[\\/]*)
6715  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6716  ;;
6717  *)
6718  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6719for as_dir in $PATH
6720do
6721  IFS=$as_save_IFS
6722  test -z "$as_dir" && as_dir=.
6723    for ac_exec_ext in '' $ac_executable_extensions; do
6724  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6725    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6726    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6727    break 2
6728  fi
6729done
6730  done
6731IFS=$as_save_IFS
6732
6733  ;;
6734esac
6735fi
6736CUT=$ac_cv_path_CUT
6737if test -n "$CUT"; then
6738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6739$as_echo "$CUT" >&6; }
6740else
6741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6742$as_echo "no" >&6; }
6743fi
6744
6745
6746          if test "x$CUT" = x; then
6747            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6748          fi
6749        else
6750          # Otherwise we believe it is a complete path. Use it as it is.
6751          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6752$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6753          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6754$as_echo_n "checking for CUT... " >&6; }
6755          if test ! -x "$tool_specified"; then
6756            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6757$as_echo "not found" >&6; }
6758            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6759          fi
6760          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6761$as_echo "$tool_specified" >&6; }
6762        fi
6763      fi
6764    fi
6765
6766  fi
6767
6768
6769
6770  if test "x$CUT" = x; then
6771    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6772  fi
6773
6774
6775
6776
6777
6778  # Publish this variable in the help.
6779
6780
6781  if [ -z "${DATE+x}" ]; then
6782    # The variable is not set by user, try to locate tool using the code snippet
6783    for ac_prog in date
6784do
6785  # Extract the first word of "$ac_prog", so it can be a program name with args.
6786set dummy $ac_prog; ac_word=$2
6787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6788$as_echo_n "checking for $ac_word... " >&6; }
6789if ${ac_cv_path_DATE+:} false; then :
6790  $as_echo_n "(cached) " >&6
6791else
6792  case $DATE in
6793  [\\/]* | ?:[\\/]*)
6794  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6795  ;;
6796  *)
6797  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6798for as_dir in $PATH
6799do
6800  IFS=$as_save_IFS
6801  test -z "$as_dir" && as_dir=.
6802    for ac_exec_ext in '' $ac_executable_extensions; do
6803  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6804    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6805    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6806    break 2
6807  fi
6808done
6809  done
6810IFS=$as_save_IFS
6811
6812  ;;
6813esac
6814fi
6815DATE=$ac_cv_path_DATE
6816if test -n "$DATE"; then
6817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6818$as_echo "$DATE" >&6; }
6819else
6820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6821$as_echo "no" >&6; }
6822fi
6823
6824
6825  test -n "$DATE" && break
6826done
6827
6828  else
6829    # The variable is set, but is it from the command line or the environment?
6830
6831    # Try to remove the string !DATE! from our list.
6832    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6833    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6834      # If it failed, the variable was not from the command line. Ignore it,
6835      # but warn the user (except for BASH, which is always set by the calling BASH).
6836      if test "xDATE" != xBASH; then
6837        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6838$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6839      fi
6840      # Try to locate tool using the code snippet
6841      for ac_prog in date
6842do
6843  # Extract the first word of "$ac_prog", so it can be a program name with args.
6844set dummy $ac_prog; ac_word=$2
6845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6846$as_echo_n "checking for $ac_word... " >&6; }
6847if ${ac_cv_path_DATE+:} false; then :
6848  $as_echo_n "(cached) " >&6
6849else
6850  case $DATE in
6851  [\\/]* | ?:[\\/]*)
6852  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6853  ;;
6854  *)
6855  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6856for as_dir in $PATH
6857do
6858  IFS=$as_save_IFS
6859  test -z "$as_dir" && as_dir=.
6860    for ac_exec_ext in '' $ac_executable_extensions; do
6861  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6862    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6863    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6864    break 2
6865  fi
6866done
6867  done
6868IFS=$as_save_IFS
6869
6870  ;;
6871esac
6872fi
6873DATE=$ac_cv_path_DATE
6874if test -n "$DATE"; then
6875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6876$as_echo "$DATE" >&6; }
6877else
6878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6879$as_echo "no" >&6; }
6880fi
6881
6882
6883  test -n "$DATE" && break
6884done
6885
6886    else
6887      # If it succeeded, then it was overridden by the user. We will use it
6888      # for the tool.
6889
6890      # First remove it from the list of overridden variables, so we can test
6891      # for unknown variables in the end.
6892      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6893
6894      # Check if we try to supply an empty value
6895      if test "x$DATE" = x; then
6896        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6897$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6898        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6899$as_echo_n "checking for DATE... " >&6; }
6900        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6901$as_echo "disabled" >&6; }
6902      else
6903        # Check if the provided tool contains a complete path.
6904        tool_specified="$DATE"
6905        tool_basename="${tool_specified##*/}"
6906        if test "x$tool_basename" = "x$tool_specified"; then
6907          # A command without a complete path is provided, search $PATH.
6908          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6909$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6910          # Extract the first word of "$tool_basename", so it can be a program name with args.
6911set dummy $tool_basename; ac_word=$2
6912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6913$as_echo_n "checking for $ac_word... " >&6; }
6914if ${ac_cv_path_DATE+:} false; then :
6915  $as_echo_n "(cached) " >&6
6916else
6917  case $DATE in
6918  [\\/]* | ?:[\\/]*)
6919  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6920  ;;
6921  *)
6922  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6923for as_dir in $PATH
6924do
6925  IFS=$as_save_IFS
6926  test -z "$as_dir" && as_dir=.
6927    for ac_exec_ext in '' $ac_executable_extensions; do
6928  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6929    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6930    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6931    break 2
6932  fi
6933done
6934  done
6935IFS=$as_save_IFS
6936
6937  ;;
6938esac
6939fi
6940DATE=$ac_cv_path_DATE
6941if test -n "$DATE"; then
6942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6943$as_echo "$DATE" >&6; }
6944else
6945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6946$as_echo "no" >&6; }
6947fi
6948
6949
6950          if test "x$DATE" = x; then
6951            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6952          fi
6953        else
6954          # Otherwise we believe it is a complete path. Use it as it is.
6955          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6956$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6957          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6958$as_echo_n "checking for DATE... " >&6; }
6959          if test ! -x "$tool_specified"; then
6960            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6961$as_echo "not found" >&6; }
6962            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6963          fi
6964          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6965$as_echo "$tool_specified" >&6; }
6966        fi
6967      fi
6968    fi
6969
6970  fi
6971
6972
6973
6974  if test "x$DATE" = x; then
6975    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6976  fi
6977
6978
6979
6980
6981
6982  # Publish this variable in the help.
6983
6984
6985  if [ -z "${DIFF+x}" ]; then
6986    # The variable is not set by user, try to locate tool using the code snippet
6987    for ac_prog in gdiff diff
6988do
6989  # Extract the first word of "$ac_prog", so it can be a program name with args.
6990set dummy $ac_prog; ac_word=$2
6991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6992$as_echo_n "checking for $ac_word... " >&6; }
6993if ${ac_cv_path_DIFF+:} false; then :
6994  $as_echo_n "(cached) " >&6
6995else
6996  case $DIFF in
6997  [\\/]* | ?:[\\/]*)
6998  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6999  ;;
7000  *)
7001  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7002for as_dir in $PATH
7003do
7004  IFS=$as_save_IFS
7005  test -z "$as_dir" && as_dir=.
7006    for ac_exec_ext in '' $ac_executable_extensions; do
7007  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7008    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7009    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7010    break 2
7011  fi
7012done
7013  done
7014IFS=$as_save_IFS
7015
7016  ;;
7017esac
7018fi
7019DIFF=$ac_cv_path_DIFF
7020if test -n "$DIFF"; then
7021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7022$as_echo "$DIFF" >&6; }
7023else
7024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7025$as_echo "no" >&6; }
7026fi
7027
7028
7029  test -n "$DIFF" && break
7030done
7031
7032  else
7033    # The variable is set, but is it from the command line or the environment?
7034
7035    # Try to remove the string !DIFF! from our list.
7036    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7037    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7038      # If it failed, the variable was not from the command line. Ignore it,
7039      # but warn the user (except for BASH, which is always set by the calling BASH).
7040      if test "xDIFF" != xBASH; then
7041        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7042$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7043      fi
7044      # Try to locate tool using the code snippet
7045      for ac_prog in gdiff diff
7046do
7047  # Extract the first word of "$ac_prog", so it can be a program name with args.
7048set dummy $ac_prog; ac_word=$2
7049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7050$as_echo_n "checking for $ac_word... " >&6; }
7051if ${ac_cv_path_DIFF+:} false; then :
7052  $as_echo_n "(cached) " >&6
7053else
7054  case $DIFF in
7055  [\\/]* | ?:[\\/]*)
7056  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7057  ;;
7058  *)
7059  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7060for as_dir in $PATH
7061do
7062  IFS=$as_save_IFS
7063  test -z "$as_dir" && as_dir=.
7064    for ac_exec_ext in '' $ac_executable_extensions; do
7065  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7066    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7067    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7068    break 2
7069  fi
7070done
7071  done
7072IFS=$as_save_IFS
7073
7074  ;;
7075esac
7076fi
7077DIFF=$ac_cv_path_DIFF
7078if test -n "$DIFF"; then
7079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7080$as_echo "$DIFF" >&6; }
7081else
7082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7083$as_echo "no" >&6; }
7084fi
7085
7086
7087  test -n "$DIFF" && break
7088done
7089
7090    else
7091      # If it succeeded, then it was overridden by the user. We will use it
7092      # for the tool.
7093
7094      # First remove it from the list of overridden variables, so we can test
7095      # for unknown variables in the end.
7096      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7097
7098      # Check if we try to supply an empty value
7099      if test "x$DIFF" = x; then
7100        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7101$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7102        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7103$as_echo_n "checking for DIFF... " >&6; }
7104        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7105$as_echo "disabled" >&6; }
7106      else
7107        # Check if the provided tool contains a complete path.
7108        tool_specified="$DIFF"
7109        tool_basename="${tool_specified##*/}"
7110        if test "x$tool_basename" = "x$tool_specified"; then
7111          # A command without a complete path is provided, search $PATH.
7112          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7113$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7114          # Extract the first word of "$tool_basename", so it can be a program name with args.
7115set dummy $tool_basename; ac_word=$2
7116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7117$as_echo_n "checking for $ac_word... " >&6; }
7118if ${ac_cv_path_DIFF+:} false; then :
7119  $as_echo_n "(cached) " >&6
7120else
7121  case $DIFF in
7122  [\\/]* | ?:[\\/]*)
7123  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7124  ;;
7125  *)
7126  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7127for as_dir in $PATH
7128do
7129  IFS=$as_save_IFS
7130  test -z "$as_dir" && as_dir=.
7131    for ac_exec_ext in '' $ac_executable_extensions; do
7132  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7133    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7134    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7135    break 2
7136  fi
7137done
7138  done
7139IFS=$as_save_IFS
7140
7141  ;;
7142esac
7143fi
7144DIFF=$ac_cv_path_DIFF
7145if test -n "$DIFF"; then
7146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7147$as_echo "$DIFF" >&6; }
7148else
7149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7150$as_echo "no" >&6; }
7151fi
7152
7153
7154          if test "x$DIFF" = x; then
7155            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7156          fi
7157        else
7158          # Otherwise we believe it is a complete path. Use it as it is.
7159          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7160$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7161          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7162$as_echo_n "checking for DIFF... " >&6; }
7163          if test ! -x "$tool_specified"; then
7164            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7165$as_echo "not found" >&6; }
7166            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7167          fi
7168          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7169$as_echo "$tool_specified" >&6; }
7170        fi
7171      fi
7172    fi
7173
7174  fi
7175
7176
7177
7178  if test "x$DIFF" = x; then
7179    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7180  fi
7181
7182
7183
7184
7185
7186  # Publish this variable in the help.
7187
7188
7189  if [ -z "${DIRNAME+x}" ]; then
7190    # The variable is not set by user, try to locate tool using the code snippet
7191    for ac_prog in dirname
7192do
7193  # Extract the first word of "$ac_prog", so it can be a program name with args.
7194set dummy $ac_prog; ac_word=$2
7195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7196$as_echo_n "checking for $ac_word... " >&6; }
7197if ${ac_cv_path_DIRNAME+:} false; then :
7198  $as_echo_n "(cached) " >&6
7199else
7200  case $DIRNAME in
7201  [\\/]* | ?:[\\/]*)
7202  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7203  ;;
7204  *)
7205  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7206for as_dir in $PATH
7207do
7208  IFS=$as_save_IFS
7209  test -z "$as_dir" && as_dir=.
7210    for ac_exec_ext in '' $ac_executable_extensions; do
7211  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7212    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7213    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7214    break 2
7215  fi
7216done
7217  done
7218IFS=$as_save_IFS
7219
7220  ;;
7221esac
7222fi
7223DIRNAME=$ac_cv_path_DIRNAME
7224if test -n "$DIRNAME"; then
7225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7226$as_echo "$DIRNAME" >&6; }
7227else
7228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7229$as_echo "no" >&6; }
7230fi
7231
7232
7233  test -n "$DIRNAME" && break
7234done
7235
7236  else
7237    # The variable is set, but is it from the command line or the environment?
7238
7239    # Try to remove the string !DIRNAME! from our list.
7240    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7241    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7242      # If it failed, the variable was not from the command line. Ignore it,
7243      # but warn the user (except for BASH, which is always set by the calling BASH).
7244      if test "xDIRNAME" != xBASH; then
7245        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7246$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7247      fi
7248      # Try to locate tool using the code snippet
7249      for ac_prog in dirname
7250do
7251  # Extract the first word of "$ac_prog", so it can be a program name with args.
7252set dummy $ac_prog; ac_word=$2
7253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7254$as_echo_n "checking for $ac_word... " >&6; }
7255if ${ac_cv_path_DIRNAME+:} false; then :
7256  $as_echo_n "(cached) " >&6
7257else
7258  case $DIRNAME in
7259  [\\/]* | ?:[\\/]*)
7260  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7261  ;;
7262  *)
7263  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7264for as_dir in $PATH
7265do
7266  IFS=$as_save_IFS
7267  test -z "$as_dir" && as_dir=.
7268    for ac_exec_ext in '' $ac_executable_extensions; do
7269  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7270    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7271    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7272    break 2
7273  fi
7274done
7275  done
7276IFS=$as_save_IFS
7277
7278  ;;
7279esac
7280fi
7281DIRNAME=$ac_cv_path_DIRNAME
7282if test -n "$DIRNAME"; then
7283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7284$as_echo "$DIRNAME" >&6; }
7285else
7286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7287$as_echo "no" >&6; }
7288fi
7289
7290
7291  test -n "$DIRNAME" && break
7292done
7293
7294    else
7295      # If it succeeded, then it was overridden by the user. We will use it
7296      # for the tool.
7297
7298      # First remove it from the list of overridden variables, so we can test
7299      # for unknown variables in the end.
7300      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7301
7302      # Check if we try to supply an empty value
7303      if test "x$DIRNAME" = x; then
7304        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7305$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7306        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7307$as_echo_n "checking for DIRNAME... " >&6; }
7308        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7309$as_echo "disabled" >&6; }
7310      else
7311        # Check if the provided tool contains a complete path.
7312        tool_specified="$DIRNAME"
7313        tool_basename="${tool_specified##*/}"
7314        if test "x$tool_basename" = "x$tool_specified"; then
7315          # A command without a complete path is provided, search $PATH.
7316          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7317$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7318          # Extract the first word of "$tool_basename", so it can be a program name with args.
7319set dummy $tool_basename; ac_word=$2
7320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7321$as_echo_n "checking for $ac_word... " >&6; }
7322if ${ac_cv_path_DIRNAME+:} false; then :
7323  $as_echo_n "(cached) " >&6
7324else
7325  case $DIRNAME in
7326  [\\/]* | ?:[\\/]*)
7327  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7328  ;;
7329  *)
7330  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7331for as_dir in $PATH
7332do
7333  IFS=$as_save_IFS
7334  test -z "$as_dir" && as_dir=.
7335    for ac_exec_ext in '' $ac_executable_extensions; do
7336  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7337    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7338    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7339    break 2
7340  fi
7341done
7342  done
7343IFS=$as_save_IFS
7344
7345  ;;
7346esac
7347fi
7348DIRNAME=$ac_cv_path_DIRNAME
7349if test -n "$DIRNAME"; then
7350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7351$as_echo "$DIRNAME" >&6; }
7352else
7353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7354$as_echo "no" >&6; }
7355fi
7356
7357
7358          if test "x$DIRNAME" = x; then
7359            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7360          fi
7361        else
7362          # Otherwise we believe it is a complete path. Use it as it is.
7363          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7364$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7365          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7366$as_echo_n "checking for DIRNAME... " >&6; }
7367          if test ! -x "$tool_specified"; then
7368            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7369$as_echo "not found" >&6; }
7370            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7371          fi
7372          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7373$as_echo "$tool_specified" >&6; }
7374        fi
7375      fi
7376    fi
7377
7378  fi
7379
7380
7381
7382  if test "x$DIRNAME" = x; then
7383    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7384  fi
7385
7386
7387
7388
7389
7390  # Publish this variable in the help.
7391
7392
7393  if [ -z "${ECHO+x}" ]; then
7394    # The variable is not set by user, try to locate tool using the code snippet
7395    for ac_prog in echo
7396do
7397  # Extract the first word of "$ac_prog", so it can be a program name with args.
7398set dummy $ac_prog; ac_word=$2
7399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7400$as_echo_n "checking for $ac_word... " >&6; }
7401if ${ac_cv_path_ECHO+:} false; then :
7402  $as_echo_n "(cached) " >&6
7403else
7404  case $ECHO in
7405  [\\/]* | ?:[\\/]*)
7406  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7407  ;;
7408  *)
7409  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7410for as_dir in $PATH
7411do
7412  IFS=$as_save_IFS
7413  test -z "$as_dir" && as_dir=.
7414    for ac_exec_ext in '' $ac_executable_extensions; do
7415  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7416    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7417    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7418    break 2
7419  fi
7420done
7421  done
7422IFS=$as_save_IFS
7423
7424  ;;
7425esac
7426fi
7427ECHO=$ac_cv_path_ECHO
7428if test -n "$ECHO"; then
7429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7430$as_echo "$ECHO" >&6; }
7431else
7432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7433$as_echo "no" >&6; }
7434fi
7435
7436
7437  test -n "$ECHO" && break
7438done
7439
7440  else
7441    # The variable is set, but is it from the command line or the environment?
7442
7443    # Try to remove the string !ECHO! from our list.
7444    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7445    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7446      # If it failed, the variable was not from the command line. Ignore it,
7447      # but warn the user (except for BASH, which is always set by the calling BASH).
7448      if test "xECHO" != xBASH; then
7449        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7450$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7451      fi
7452      # Try to locate tool using the code snippet
7453      for ac_prog in echo
7454do
7455  # Extract the first word of "$ac_prog", so it can be a program name with args.
7456set dummy $ac_prog; ac_word=$2
7457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7458$as_echo_n "checking for $ac_word... " >&6; }
7459if ${ac_cv_path_ECHO+:} false; then :
7460  $as_echo_n "(cached) " >&6
7461else
7462  case $ECHO in
7463  [\\/]* | ?:[\\/]*)
7464  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7465  ;;
7466  *)
7467  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7468for as_dir in $PATH
7469do
7470  IFS=$as_save_IFS
7471  test -z "$as_dir" && as_dir=.
7472    for ac_exec_ext in '' $ac_executable_extensions; do
7473  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7474    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7475    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7476    break 2
7477  fi
7478done
7479  done
7480IFS=$as_save_IFS
7481
7482  ;;
7483esac
7484fi
7485ECHO=$ac_cv_path_ECHO
7486if test -n "$ECHO"; then
7487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7488$as_echo "$ECHO" >&6; }
7489else
7490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7491$as_echo "no" >&6; }
7492fi
7493
7494
7495  test -n "$ECHO" && break
7496done
7497
7498    else
7499      # If it succeeded, then it was overridden by the user. We will use it
7500      # for the tool.
7501
7502      # First remove it from the list of overridden variables, so we can test
7503      # for unknown variables in the end.
7504      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7505
7506      # Check if we try to supply an empty value
7507      if test "x$ECHO" = x; then
7508        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7509$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7510        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7511$as_echo_n "checking for ECHO... " >&6; }
7512        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7513$as_echo "disabled" >&6; }
7514      else
7515        # Check if the provided tool contains a complete path.
7516        tool_specified="$ECHO"
7517        tool_basename="${tool_specified##*/}"
7518        if test "x$tool_basename" = "x$tool_specified"; then
7519          # A command without a complete path is provided, search $PATH.
7520          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7521$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7522          # Extract the first word of "$tool_basename", so it can be a program name with args.
7523set dummy $tool_basename; ac_word=$2
7524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7525$as_echo_n "checking for $ac_word... " >&6; }
7526if ${ac_cv_path_ECHO+:} false; then :
7527  $as_echo_n "(cached) " >&6
7528else
7529  case $ECHO in
7530  [\\/]* | ?:[\\/]*)
7531  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7532  ;;
7533  *)
7534  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7535for as_dir in $PATH
7536do
7537  IFS=$as_save_IFS
7538  test -z "$as_dir" && as_dir=.
7539    for ac_exec_ext in '' $ac_executable_extensions; do
7540  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7541    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7542    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7543    break 2
7544  fi
7545done
7546  done
7547IFS=$as_save_IFS
7548
7549  ;;
7550esac
7551fi
7552ECHO=$ac_cv_path_ECHO
7553if test -n "$ECHO"; then
7554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7555$as_echo "$ECHO" >&6; }
7556else
7557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7558$as_echo "no" >&6; }
7559fi
7560
7561
7562          if test "x$ECHO" = x; then
7563            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7564          fi
7565        else
7566          # Otherwise we believe it is a complete path. Use it as it is.
7567          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7568$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7569          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7570$as_echo_n "checking for ECHO... " >&6; }
7571          if test ! -x "$tool_specified"; then
7572            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7573$as_echo "not found" >&6; }
7574            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7575          fi
7576          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7577$as_echo "$tool_specified" >&6; }
7578        fi
7579      fi
7580    fi
7581
7582  fi
7583
7584
7585
7586  if test "x$ECHO" = x; then
7587    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7588  fi
7589
7590
7591
7592
7593
7594  # Publish this variable in the help.
7595
7596
7597  if [ -z "${EXPR+x}" ]; then
7598    # The variable is not set by user, try to locate tool using the code snippet
7599    for ac_prog in expr
7600do
7601  # Extract the first word of "$ac_prog", so it can be a program name with args.
7602set dummy $ac_prog; ac_word=$2
7603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7604$as_echo_n "checking for $ac_word... " >&6; }
7605if ${ac_cv_path_EXPR+:} false; then :
7606  $as_echo_n "(cached) " >&6
7607else
7608  case $EXPR in
7609  [\\/]* | ?:[\\/]*)
7610  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7611  ;;
7612  *)
7613  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7614for as_dir in $PATH
7615do
7616  IFS=$as_save_IFS
7617  test -z "$as_dir" && as_dir=.
7618    for ac_exec_ext in '' $ac_executable_extensions; do
7619  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7620    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7621    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7622    break 2
7623  fi
7624done
7625  done
7626IFS=$as_save_IFS
7627
7628  ;;
7629esac
7630fi
7631EXPR=$ac_cv_path_EXPR
7632if test -n "$EXPR"; then
7633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7634$as_echo "$EXPR" >&6; }
7635else
7636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7637$as_echo "no" >&6; }
7638fi
7639
7640
7641  test -n "$EXPR" && break
7642done
7643
7644  else
7645    # The variable is set, but is it from the command line or the environment?
7646
7647    # Try to remove the string !EXPR! from our list.
7648    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7649    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7650      # If it failed, the variable was not from the command line. Ignore it,
7651      # but warn the user (except for BASH, which is always set by the calling BASH).
7652      if test "xEXPR" != xBASH; then
7653        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7654$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7655      fi
7656      # Try to locate tool using the code snippet
7657      for ac_prog in expr
7658do
7659  # Extract the first word of "$ac_prog", so it can be a program name with args.
7660set dummy $ac_prog; ac_word=$2
7661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7662$as_echo_n "checking for $ac_word... " >&6; }
7663if ${ac_cv_path_EXPR+:} false; then :
7664  $as_echo_n "(cached) " >&6
7665else
7666  case $EXPR in
7667  [\\/]* | ?:[\\/]*)
7668  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7669  ;;
7670  *)
7671  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7672for as_dir in $PATH
7673do
7674  IFS=$as_save_IFS
7675  test -z "$as_dir" && as_dir=.
7676    for ac_exec_ext in '' $ac_executable_extensions; do
7677  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7678    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7679    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7680    break 2
7681  fi
7682done
7683  done
7684IFS=$as_save_IFS
7685
7686  ;;
7687esac
7688fi
7689EXPR=$ac_cv_path_EXPR
7690if test -n "$EXPR"; then
7691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7692$as_echo "$EXPR" >&6; }
7693else
7694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7695$as_echo "no" >&6; }
7696fi
7697
7698
7699  test -n "$EXPR" && break
7700done
7701
7702    else
7703      # If it succeeded, then it was overridden by the user. We will use it
7704      # for the tool.
7705
7706      # First remove it from the list of overridden variables, so we can test
7707      # for unknown variables in the end.
7708      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7709
7710      # Check if we try to supply an empty value
7711      if test "x$EXPR" = x; then
7712        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7713$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7714        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7715$as_echo_n "checking for EXPR... " >&6; }
7716        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7717$as_echo "disabled" >&6; }
7718      else
7719        # Check if the provided tool contains a complete path.
7720        tool_specified="$EXPR"
7721        tool_basename="${tool_specified##*/}"
7722        if test "x$tool_basename" = "x$tool_specified"; then
7723          # A command without a complete path is provided, search $PATH.
7724          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7725$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7726          # Extract the first word of "$tool_basename", so it can be a program name with args.
7727set dummy $tool_basename; ac_word=$2
7728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7729$as_echo_n "checking for $ac_word... " >&6; }
7730if ${ac_cv_path_EXPR+:} false; then :
7731  $as_echo_n "(cached) " >&6
7732else
7733  case $EXPR in
7734  [\\/]* | ?:[\\/]*)
7735  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7736  ;;
7737  *)
7738  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7739for as_dir in $PATH
7740do
7741  IFS=$as_save_IFS
7742  test -z "$as_dir" && as_dir=.
7743    for ac_exec_ext in '' $ac_executable_extensions; do
7744  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7745    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7746    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7747    break 2
7748  fi
7749done
7750  done
7751IFS=$as_save_IFS
7752
7753  ;;
7754esac
7755fi
7756EXPR=$ac_cv_path_EXPR
7757if test -n "$EXPR"; then
7758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7759$as_echo "$EXPR" >&6; }
7760else
7761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7762$as_echo "no" >&6; }
7763fi
7764
7765
7766          if test "x$EXPR" = x; then
7767            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7768          fi
7769        else
7770          # Otherwise we believe it is a complete path. Use it as it is.
7771          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7772$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7773          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7774$as_echo_n "checking for EXPR... " >&6; }
7775          if test ! -x "$tool_specified"; then
7776            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7777$as_echo "not found" >&6; }
7778            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7779          fi
7780          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7781$as_echo "$tool_specified" >&6; }
7782        fi
7783      fi
7784    fi
7785
7786  fi
7787
7788
7789
7790  if test "x$EXPR" = x; then
7791    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7792  fi
7793
7794
7795
7796
7797
7798  # Publish this variable in the help.
7799
7800
7801  if [ -z "${FILE+x}" ]; then
7802    # The variable is not set by user, try to locate tool using the code snippet
7803    for ac_prog in file
7804do
7805  # Extract the first word of "$ac_prog", so it can be a program name with args.
7806set dummy $ac_prog; ac_word=$2
7807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7808$as_echo_n "checking for $ac_word... " >&6; }
7809if ${ac_cv_path_FILE+:} false; then :
7810  $as_echo_n "(cached) " >&6
7811else
7812  case $FILE in
7813  [\\/]* | ?:[\\/]*)
7814  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7815  ;;
7816  *)
7817  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7818for as_dir in $PATH
7819do
7820  IFS=$as_save_IFS
7821  test -z "$as_dir" && as_dir=.
7822    for ac_exec_ext in '' $ac_executable_extensions; do
7823  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7824    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7825    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7826    break 2
7827  fi
7828done
7829  done
7830IFS=$as_save_IFS
7831
7832  ;;
7833esac
7834fi
7835FILE=$ac_cv_path_FILE
7836if test -n "$FILE"; then
7837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7838$as_echo "$FILE" >&6; }
7839else
7840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7841$as_echo "no" >&6; }
7842fi
7843
7844
7845  test -n "$FILE" && break
7846done
7847
7848  else
7849    # The variable is set, but is it from the command line or the environment?
7850
7851    # Try to remove the string !FILE! from our list.
7852    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7853    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7854      # If it failed, the variable was not from the command line. Ignore it,
7855      # but warn the user (except for BASH, which is always set by the calling BASH).
7856      if test "xFILE" != xBASH; then
7857        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7858$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7859      fi
7860      # Try to locate tool using the code snippet
7861      for ac_prog in file
7862do
7863  # Extract the first word of "$ac_prog", so it can be a program name with args.
7864set dummy $ac_prog; ac_word=$2
7865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7866$as_echo_n "checking for $ac_word... " >&6; }
7867if ${ac_cv_path_FILE+:} false; then :
7868  $as_echo_n "(cached) " >&6
7869else
7870  case $FILE in
7871  [\\/]* | ?:[\\/]*)
7872  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7873  ;;
7874  *)
7875  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7876for as_dir in $PATH
7877do
7878  IFS=$as_save_IFS
7879  test -z "$as_dir" && as_dir=.
7880    for ac_exec_ext in '' $ac_executable_extensions; do
7881  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7882    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7883    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7884    break 2
7885  fi
7886done
7887  done
7888IFS=$as_save_IFS
7889
7890  ;;
7891esac
7892fi
7893FILE=$ac_cv_path_FILE
7894if test -n "$FILE"; then
7895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7896$as_echo "$FILE" >&6; }
7897else
7898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7899$as_echo "no" >&6; }
7900fi
7901
7902
7903  test -n "$FILE" && break
7904done
7905
7906    else
7907      # If it succeeded, then it was overridden by the user. We will use it
7908      # for the tool.
7909
7910      # First remove it from the list of overridden variables, so we can test
7911      # for unknown variables in the end.
7912      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7913
7914      # Check if we try to supply an empty value
7915      if test "x$FILE" = x; then
7916        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7917$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7918        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7919$as_echo_n "checking for FILE... " >&6; }
7920        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7921$as_echo "disabled" >&6; }
7922      else
7923        # Check if the provided tool contains a complete path.
7924        tool_specified="$FILE"
7925        tool_basename="${tool_specified##*/}"
7926        if test "x$tool_basename" = "x$tool_specified"; then
7927          # A command without a complete path is provided, search $PATH.
7928          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7929$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7930          # Extract the first word of "$tool_basename", so it can be a program name with args.
7931set dummy $tool_basename; ac_word=$2
7932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7933$as_echo_n "checking for $ac_word... " >&6; }
7934if ${ac_cv_path_FILE+:} false; then :
7935  $as_echo_n "(cached) " >&6
7936else
7937  case $FILE in
7938  [\\/]* | ?:[\\/]*)
7939  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7940  ;;
7941  *)
7942  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7943for as_dir in $PATH
7944do
7945  IFS=$as_save_IFS
7946  test -z "$as_dir" && as_dir=.
7947    for ac_exec_ext in '' $ac_executable_extensions; do
7948  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7949    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7950    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7951    break 2
7952  fi
7953done
7954  done
7955IFS=$as_save_IFS
7956
7957  ;;
7958esac
7959fi
7960FILE=$ac_cv_path_FILE
7961if test -n "$FILE"; then
7962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7963$as_echo "$FILE" >&6; }
7964else
7965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7966$as_echo "no" >&6; }
7967fi
7968
7969
7970          if test "x$FILE" = x; then
7971            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7972          fi
7973        else
7974          # Otherwise we believe it is a complete path. Use it as it is.
7975          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7976$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7977          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7978$as_echo_n "checking for FILE... " >&6; }
7979          if test ! -x "$tool_specified"; then
7980            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7981$as_echo "not found" >&6; }
7982            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7983          fi
7984          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7985$as_echo "$tool_specified" >&6; }
7986        fi
7987      fi
7988    fi
7989
7990  fi
7991
7992
7993
7994  if test "x$FILE" = x; then
7995    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7996  fi
7997
7998
7999
8000
8001
8002  # Publish this variable in the help.
8003
8004
8005  if [ -z "${FIND+x}" ]; then
8006    # The variable is not set by user, try to locate tool using the code snippet
8007    for ac_prog in find
8008do
8009  # Extract the first word of "$ac_prog", so it can be a program name with args.
8010set dummy $ac_prog; ac_word=$2
8011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8012$as_echo_n "checking for $ac_word... " >&6; }
8013if ${ac_cv_path_FIND+:} false; then :
8014  $as_echo_n "(cached) " >&6
8015else
8016  case $FIND in
8017  [\\/]* | ?:[\\/]*)
8018  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8019  ;;
8020  *)
8021  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8022for as_dir in $PATH
8023do
8024  IFS=$as_save_IFS
8025  test -z "$as_dir" && as_dir=.
8026    for ac_exec_ext in '' $ac_executable_extensions; do
8027  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8028    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8029    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8030    break 2
8031  fi
8032done
8033  done
8034IFS=$as_save_IFS
8035
8036  ;;
8037esac
8038fi
8039FIND=$ac_cv_path_FIND
8040if test -n "$FIND"; then
8041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8042$as_echo "$FIND" >&6; }
8043else
8044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8045$as_echo "no" >&6; }
8046fi
8047
8048
8049  test -n "$FIND" && break
8050done
8051
8052  else
8053    # The variable is set, but is it from the command line or the environment?
8054
8055    # Try to remove the string !FIND! from our list.
8056    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8057    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8058      # If it failed, the variable was not from the command line. Ignore it,
8059      # but warn the user (except for BASH, which is always set by the calling BASH).
8060      if test "xFIND" != xBASH; then
8061        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8062$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8063      fi
8064      # Try to locate tool using the code snippet
8065      for ac_prog in find
8066do
8067  # Extract the first word of "$ac_prog", so it can be a program name with args.
8068set dummy $ac_prog; ac_word=$2
8069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8070$as_echo_n "checking for $ac_word... " >&6; }
8071if ${ac_cv_path_FIND+:} false; then :
8072  $as_echo_n "(cached) " >&6
8073else
8074  case $FIND in
8075  [\\/]* | ?:[\\/]*)
8076  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8077  ;;
8078  *)
8079  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8080for as_dir in $PATH
8081do
8082  IFS=$as_save_IFS
8083  test -z "$as_dir" && as_dir=.
8084    for ac_exec_ext in '' $ac_executable_extensions; do
8085  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8086    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8087    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8088    break 2
8089  fi
8090done
8091  done
8092IFS=$as_save_IFS
8093
8094  ;;
8095esac
8096fi
8097FIND=$ac_cv_path_FIND
8098if test -n "$FIND"; then
8099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8100$as_echo "$FIND" >&6; }
8101else
8102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8103$as_echo "no" >&6; }
8104fi
8105
8106
8107  test -n "$FIND" && break
8108done
8109
8110    else
8111      # If it succeeded, then it was overridden by the user. We will use it
8112      # for the tool.
8113
8114      # First remove it from the list of overridden variables, so we can test
8115      # for unknown variables in the end.
8116      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8117
8118      # Check if we try to supply an empty value
8119      if test "x$FIND" = x; then
8120        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8121$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8122        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8123$as_echo_n "checking for FIND... " >&6; }
8124        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8125$as_echo "disabled" >&6; }
8126      else
8127        # Check if the provided tool contains a complete path.
8128        tool_specified="$FIND"
8129        tool_basename="${tool_specified##*/}"
8130        if test "x$tool_basename" = "x$tool_specified"; then
8131          # A command without a complete path is provided, search $PATH.
8132          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8133$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8134          # Extract the first word of "$tool_basename", so it can be a program name with args.
8135set dummy $tool_basename; ac_word=$2
8136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8137$as_echo_n "checking for $ac_word... " >&6; }
8138if ${ac_cv_path_FIND+:} false; then :
8139  $as_echo_n "(cached) " >&6
8140else
8141  case $FIND in
8142  [\\/]* | ?:[\\/]*)
8143  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8144  ;;
8145  *)
8146  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8147for as_dir in $PATH
8148do
8149  IFS=$as_save_IFS
8150  test -z "$as_dir" && as_dir=.
8151    for ac_exec_ext in '' $ac_executable_extensions; do
8152  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8153    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8154    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8155    break 2
8156  fi
8157done
8158  done
8159IFS=$as_save_IFS
8160
8161  ;;
8162esac
8163fi
8164FIND=$ac_cv_path_FIND
8165if test -n "$FIND"; then
8166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8167$as_echo "$FIND" >&6; }
8168else
8169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8170$as_echo "no" >&6; }
8171fi
8172
8173
8174          if test "x$FIND" = x; then
8175            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8176          fi
8177        else
8178          # Otherwise we believe it is a complete path. Use it as it is.
8179          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8180$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8181          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8182$as_echo_n "checking for FIND... " >&6; }
8183          if test ! -x "$tool_specified"; then
8184            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8185$as_echo "not found" >&6; }
8186            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8187          fi
8188          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8189$as_echo "$tool_specified" >&6; }
8190        fi
8191      fi
8192    fi
8193
8194  fi
8195
8196
8197
8198  if test "x$FIND" = x; then
8199    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8200  fi
8201
8202
8203
8204
8205
8206  # Publish this variable in the help.
8207
8208
8209  if [ -z "${HEAD+x}" ]; then
8210    # The variable is not set by user, try to locate tool using the code snippet
8211    for ac_prog in head
8212do
8213  # Extract the first word of "$ac_prog", so it can be a program name with args.
8214set dummy $ac_prog; ac_word=$2
8215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8216$as_echo_n "checking for $ac_word... " >&6; }
8217if ${ac_cv_path_HEAD+:} false; then :
8218  $as_echo_n "(cached) " >&6
8219else
8220  case $HEAD in
8221  [\\/]* | ?:[\\/]*)
8222  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8223  ;;
8224  *)
8225  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8226for as_dir in $PATH
8227do
8228  IFS=$as_save_IFS
8229  test -z "$as_dir" && as_dir=.
8230    for ac_exec_ext in '' $ac_executable_extensions; do
8231  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8232    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8233    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8234    break 2
8235  fi
8236done
8237  done
8238IFS=$as_save_IFS
8239
8240  ;;
8241esac
8242fi
8243HEAD=$ac_cv_path_HEAD
8244if test -n "$HEAD"; then
8245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8246$as_echo "$HEAD" >&6; }
8247else
8248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8249$as_echo "no" >&6; }
8250fi
8251
8252
8253  test -n "$HEAD" && break
8254done
8255
8256  else
8257    # The variable is set, but is it from the command line or the environment?
8258
8259    # Try to remove the string !HEAD! from our list.
8260    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8261    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8262      # If it failed, the variable was not from the command line. Ignore it,
8263      # but warn the user (except for BASH, which is always set by the calling BASH).
8264      if test "xHEAD" != xBASH; then
8265        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8266$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8267      fi
8268      # Try to locate tool using the code snippet
8269      for ac_prog in head
8270do
8271  # Extract the first word of "$ac_prog", so it can be a program name with args.
8272set dummy $ac_prog; ac_word=$2
8273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8274$as_echo_n "checking for $ac_word... " >&6; }
8275if ${ac_cv_path_HEAD+:} false; then :
8276  $as_echo_n "(cached) " >&6
8277else
8278  case $HEAD in
8279  [\\/]* | ?:[\\/]*)
8280  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8281  ;;
8282  *)
8283  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8284for as_dir in $PATH
8285do
8286  IFS=$as_save_IFS
8287  test -z "$as_dir" && as_dir=.
8288    for ac_exec_ext in '' $ac_executable_extensions; do
8289  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8290    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8291    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8292    break 2
8293  fi
8294done
8295  done
8296IFS=$as_save_IFS
8297
8298  ;;
8299esac
8300fi
8301HEAD=$ac_cv_path_HEAD
8302if test -n "$HEAD"; then
8303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8304$as_echo "$HEAD" >&6; }
8305else
8306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8307$as_echo "no" >&6; }
8308fi
8309
8310
8311  test -n "$HEAD" && break
8312done
8313
8314    else
8315      # If it succeeded, then it was overridden by the user. We will use it
8316      # for the tool.
8317
8318      # First remove it from the list of overridden variables, so we can test
8319      # for unknown variables in the end.
8320      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8321
8322      # Check if we try to supply an empty value
8323      if test "x$HEAD" = x; then
8324        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8325$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8326        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8327$as_echo_n "checking for HEAD... " >&6; }
8328        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8329$as_echo "disabled" >&6; }
8330      else
8331        # Check if the provided tool contains a complete path.
8332        tool_specified="$HEAD"
8333        tool_basename="${tool_specified##*/}"
8334        if test "x$tool_basename" = "x$tool_specified"; then
8335          # A command without a complete path is provided, search $PATH.
8336          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8337$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8338          # Extract the first word of "$tool_basename", so it can be a program name with args.
8339set dummy $tool_basename; ac_word=$2
8340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8341$as_echo_n "checking for $ac_word... " >&6; }
8342if ${ac_cv_path_HEAD+:} false; then :
8343  $as_echo_n "(cached) " >&6
8344else
8345  case $HEAD in
8346  [\\/]* | ?:[\\/]*)
8347  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8348  ;;
8349  *)
8350  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8351for as_dir in $PATH
8352do
8353  IFS=$as_save_IFS
8354  test -z "$as_dir" && as_dir=.
8355    for ac_exec_ext in '' $ac_executable_extensions; do
8356  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8357    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8358    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8359    break 2
8360  fi
8361done
8362  done
8363IFS=$as_save_IFS
8364
8365  ;;
8366esac
8367fi
8368HEAD=$ac_cv_path_HEAD
8369if test -n "$HEAD"; then
8370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8371$as_echo "$HEAD" >&6; }
8372else
8373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8374$as_echo "no" >&6; }
8375fi
8376
8377
8378          if test "x$HEAD" = x; then
8379            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8380          fi
8381        else
8382          # Otherwise we believe it is a complete path. Use it as it is.
8383          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8384$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8385          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8386$as_echo_n "checking for HEAD... " >&6; }
8387          if test ! -x "$tool_specified"; then
8388            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8389$as_echo "not found" >&6; }
8390            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8391          fi
8392          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8393$as_echo "$tool_specified" >&6; }
8394        fi
8395      fi
8396    fi
8397
8398  fi
8399
8400
8401
8402  if test "x$HEAD" = x; then
8403    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8404  fi
8405
8406
8407
8408
8409
8410  # Publish this variable in the help.
8411
8412
8413  if [ -z "${GUNZIP+x}" ]; then
8414    # The variable is not set by user, try to locate tool using the code snippet
8415    for ac_prog in gunzip
8416do
8417  # Extract the first word of "$ac_prog", so it can be a program name with args.
8418set dummy $ac_prog; ac_word=$2
8419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8420$as_echo_n "checking for $ac_word... " >&6; }
8421if ${ac_cv_path_GUNZIP+:} false; then :
8422  $as_echo_n "(cached) " >&6
8423else
8424  case $GUNZIP in
8425  [\\/]* | ?:[\\/]*)
8426  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8427  ;;
8428  *)
8429  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8430for as_dir in $PATH
8431do
8432  IFS=$as_save_IFS
8433  test -z "$as_dir" && as_dir=.
8434    for ac_exec_ext in '' $ac_executable_extensions; do
8435  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8436    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8437    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8438    break 2
8439  fi
8440done
8441  done
8442IFS=$as_save_IFS
8443
8444  ;;
8445esac
8446fi
8447GUNZIP=$ac_cv_path_GUNZIP
8448if test -n "$GUNZIP"; then
8449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8450$as_echo "$GUNZIP" >&6; }
8451else
8452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8453$as_echo "no" >&6; }
8454fi
8455
8456
8457  test -n "$GUNZIP" && break
8458done
8459
8460  else
8461    # The variable is set, but is it from the command line or the environment?
8462
8463    # Try to remove the string !GUNZIP! from our list.
8464    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GUNZIP!/}
8465    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8466      # If it failed, the variable was not from the command line. Ignore it,
8467      # but warn the user (except for BASH, which is always set by the calling BASH).
8468      if test "xGUNZIP" != xBASH; then
8469        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&5
8470$as_echo "$as_me: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&2;}
8471      fi
8472      # Try to locate tool using the code snippet
8473      for ac_prog in gunzip
8474do
8475  # Extract the first word of "$ac_prog", so it can be a program name with args.
8476set dummy $ac_prog; ac_word=$2
8477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8478$as_echo_n "checking for $ac_word... " >&6; }
8479if ${ac_cv_path_GUNZIP+:} false; then :
8480  $as_echo_n "(cached) " >&6
8481else
8482  case $GUNZIP in
8483  [\\/]* | ?:[\\/]*)
8484  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8485  ;;
8486  *)
8487  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8488for as_dir in $PATH
8489do
8490  IFS=$as_save_IFS
8491  test -z "$as_dir" && as_dir=.
8492    for ac_exec_ext in '' $ac_executable_extensions; do
8493  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8494    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8495    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8496    break 2
8497  fi
8498done
8499  done
8500IFS=$as_save_IFS
8501
8502  ;;
8503esac
8504fi
8505GUNZIP=$ac_cv_path_GUNZIP
8506if test -n "$GUNZIP"; then
8507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8508$as_echo "$GUNZIP" >&6; }
8509else
8510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8511$as_echo "no" >&6; }
8512fi
8513
8514
8515  test -n "$GUNZIP" && break
8516done
8517
8518    else
8519      # If it succeeded, then it was overridden by the user. We will use it
8520      # for the tool.
8521
8522      # First remove it from the list of overridden variables, so we can test
8523      # for unknown variables in the end.
8524      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8525
8526      # Check if we try to supply an empty value
8527      if test "x$GUNZIP" = x; then
8528        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GUNZIP= (no value)" >&5
8529$as_echo "$as_me: Setting user supplied tool GUNZIP= (no value)" >&6;}
8530        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8531$as_echo_n "checking for GUNZIP... " >&6; }
8532        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8533$as_echo "disabled" >&6; }
8534      else
8535        # Check if the provided tool contains a complete path.
8536        tool_specified="$GUNZIP"
8537        tool_basename="${tool_specified##*/}"
8538        if test "x$tool_basename" = "x$tool_specified"; then
8539          # A command without a complete path is provided, search $PATH.
8540          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GUNZIP=$tool_basename" >&5
8541$as_echo "$as_me: Will search for user supplied tool GUNZIP=$tool_basename" >&6;}
8542          # Extract the first word of "$tool_basename", so it can be a program name with args.
8543set dummy $tool_basename; ac_word=$2
8544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8545$as_echo_n "checking for $ac_word... " >&6; }
8546if ${ac_cv_path_GUNZIP+:} false; then :
8547  $as_echo_n "(cached) " >&6
8548else
8549  case $GUNZIP in
8550  [\\/]* | ?:[\\/]*)
8551  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8552  ;;
8553  *)
8554  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8555for as_dir in $PATH
8556do
8557  IFS=$as_save_IFS
8558  test -z "$as_dir" && as_dir=.
8559    for ac_exec_ext in '' $ac_executable_extensions; do
8560  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8561    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8562    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8563    break 2
8564  fi
8565done
8566  done
8567IFS=$as_save_IFS
8568
8569  ;;
8570esac
8571fi
8572GUNZIP=$ac_cv_path_GUNZIP
8573if test -n "$GUNZIP"; then
8574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8575$as_echo "$GUNZIP" >&6; }
8576else
8577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8578$as_echo "no" >&6; }
8579fi
8580
8581
8582          if test "x$GUNZIP" = x; then
8583            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8584          fi
8585        else
8586          # Otherwise we believe it is a complete path. Use it as it is.
8587          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GUNZIP=$tool_specified" >&5
8588$as_echo "$as_me: Will use user supplied tool GUNZIP=$tool_specified" >&6;}
8589          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8590$as_echo_n "checking for GUNZIP... " >&6; }
8591          if test ! -x "$tool_specified"; then
8592            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8593$as_echo "not found" >&6; }
8594            as_fn_error $? "User supplied tool GUNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8595          fi
8596          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8597$as_echo "$tool_specified" >&6; }
8598        fi
8599      fi
8600    fi
8601
8602  fi
8603
8604
8605
8606  if test "x$GUNZIP" = x; then
8607    as_fn_error $? "Could not find required tool for GUNZIP" "$LINENO" 5
8608  fi
8609
8610
8611
8612
8613
8614  # Publish this variable in the help.
8615
8616
8617  if [ -z "${GZIP+x}" ]; then
8618    # The variable is not set by user, try to locate tool using the code snippet
8619    for ac_prog in pigz gzip
8620do
8621  # Extract the first word of "$ac_prog", so it can be a program name with args.
8622set dummy $ac_prog; ac_word=$2
8623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8624$as_echo_n "checking for $ac_word... " >&6; }
8625if ${ac_cv_path_GZIP+:} false; then :
8626  $as_echo_n "(cached) " >&6
8627else
8628  case $GZIP in
8629  [\\/]* | ?:[\\/]*)
8630  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8631  ;;
8632  *)
8633  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8634for as_dir in $PATH
8635do
8636  IFS=$as_save_IFS
8637  test -z "$as_dir" && as_dir=.
8638    for ac_exec_ext in '' $ac_executable_extensions; do
8639  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8640    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8641    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8642    break 2
8643  fi
8644done
8645  done
8646IFS=$as_save_IFS
8647
8648  ;;
8649esac
8650fi
8651GZIP=$ac_cv_path_GZIP
8652if test -n "$GZIP"; then
8653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8654$as_echo "$GZIP" >&6; }
8655else
8656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8657$as_echo "no" >&6; }
8658fi
8659
8660
8661  test -n "$GZIP" && break
8662done
8663
8664  else
8665    # The variable is set, but is it from the command line or the environment?
8666
8667    # Try to remove the string !GZIP! from our list.
8668    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GZIP!/}
8669    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8670      # If it failed, the variable was not from the command line. Ignore it,
8671      # but warn the user (except for BASH, which is always set by the calling BASH).
8672      if test "xGZIP" != xBASH; then
8673        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&5
8674$as_echo "$as_me: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&2;}
8675      fi
8676      # Try to locate tool using the code snippet
8677      for ac_prog in pigz gzip
8678do
8679  # Extract the first word of "$ac_prog", so it can be a program name with args.
8680set dummy $ac_prog; ac_word=$2
8681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8682$as_echo_n "checking for $ac_word... " >&6; }
8683if ${ac_cv_path_GZIP+:} false; then :
8684  $as_echo_n "(cached) " >&6
8685else
8686  case $GZIP in
8687  [\\/]* | ?:[\\/]*)
8688  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8689  ;;
8690  *)
8691  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8692for as_dir in $PATH
8693do
8694  IFS=$as_save_IFS
8695  test -z "$as_dir" && as_dir=.
8696    for ac_exec_ext in '' $ac_executable_extensions; do
8697  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8698    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8699    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8700    break 2
8701  fi
8702done
8703  done
8704IFS=$as_save_IFS
8705
8706  ;;
8707esac
8708fi
8709GZIP=$ac_cv_path_GZIP
8710if test -n "$GZIP"; then
8711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8712$as_echo "$GZIP" >&6; }
8713else
8714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8715$as_echo "no" >&6; }
8716fi
8717
8718
8719  test -n "$GZIP" && break
8720done
8721
8722    else
8723      # If it succeeded, then it was overridden by the user. We will use it
8724      # for the tool.
8725
8726      # First remove it from the list of overridden variables, so we can test
8727      # for unknown variables in the end.
8728      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8729
8730      # Check if we try to supply an empty value
8731      if test "x$GZIP" = x; then
8732        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GZIP= (no value)" >&5
8733$as_echo "$as_me: Setting user supplied tool GZIP= (no value)" >&6;}
8734        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8735$as_echo_n "checking for GZIP... " >&6; }
8736        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8737$as_echo "disabled" >&6; }
8738      else
8739        # Check if the provided tool contains a complete path.
8740        tool_specified="$GZIP"
8741        tool_basename="${tool_specified##*/}"
8742        if test "x$tool_basename" = "x$tool_specified"; then
8743          # A command without a complete path is provided, search $PATH.
8744          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GZIP=$tool_basename" >&5
8745$as_echo "$as_me: Will search for user supplied tool GZIP=$tool_basename" >&6;}
8746          # Extract the first word of "$tool_basename", so it can be a program name with args.
8747set dummy $tool_basename; ac_word=$2
8748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8749$as_echo_n "checking for $ac_word... " >&6; }
8750if ${ac_cv_path_GZIP+:} false; then :
8751  $as_echo_n "(cached) " >&6
8752else
8753  case $GZIP in
8754  [\\/]* | ?:[\\/]*)
8755  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8756  ;;
8757  *)
8758  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8759for as_dir in $PATH
8760do
8761  IFS=$as_save_IFS
8762  test -z "$as_dir" && as_dir=.
8763    for ac_exec_ext in '' $ac_executable_extensions; do
8764  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8765    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8766    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8767    break 2
8768  fi
8769done
8770  done
8771IFS=$as_save_IFS
8772
8773  ;;
8774esac
8775fi
8776GZIP=$ac_cv_path_GZIP
8777if test -n "$GZIP"; then
8778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8779$as_echo "$GZIP" >&6; }
8780else
8781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8782$as_echo "no" >&6; }
8783fi
8784
8785
8786          if test "x$GZIP" = x; then
8787            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8788          fi
8789        else
8790          # Otherwise we believe it is a complete path. Use it as it is.
8791          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GZIP=$tool_specified" >&5
8792$as_echo "$as_me: Will use user supplied tool GZIP=$tool_specified" >&6;}
8793          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8794$as_echo_n "checking for GZIP... " >&6; }
8795          if test ! -x "$tool_specified"; then
8796            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8797$as_echo "not found" >&6; }
8798            as_fn_error $? "User supplied tool GZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8799          fi
8800          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8801$as_echo "$tool_specified" >&6; }
8802        fi
8803      fi
8804    fi
8805
8806  fi
8807
8808
8809
8810  if test "x$GZIP" = x; then
8811    as_fn_error $? "Could not find required tool for GZIP" "$LINENO" 5
8812  fi
8813
8814
8815
8816
8817
8818  # Publish this variable in the help.
8819
8820
8821  if [ -z "${LN+x}" ]; then
8822    # The variable is not set by user, try to locate tool using the code snippet
8823    for ac_prog in ln
8824do
8825  # Extract the first word of "$ac_prog", so it can be a program name with args.
8826set dummy $ac_prog; ac_word=$2
8827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8828$as_echo_n "checking for $ac_word... " >&6; }
8829if ${ac_cv_path_LN+:} false; then :
8830  $as_echo_n "(cached) " >&6
8831else
8832  case $LN in
8833  [\\/]* | ?:[\\/]*)
8834  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8835  ;;
8836  *)
8837  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8838for as_dir in $PATH
8839do
8840  IFS=$as_save_IFS
8841  test -z "$as_dir" && as_dir=.
8842    for ac_exec_ext in '' $ac_executable_extensions; do
8843  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8844    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8845    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8846    break 2
8847  fi
8848done
8849  done
8850IFS=$as_save_IFS
8851
8852  ;;
8853esac
8854fi
8855LN=$ac_cv_path_LN
8856if test -n "$LN"; then
8857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8858$as_echo "$LN" >&6; }
8859else
8860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8861$as_echo "no" >&6; }
8862fi
8863
8864
8865  test -n "$LN" && break
8866done
8867
8868  else
8869    # The variable is set, but is it from the command line or the environment?
8870
8871    # Try to remove the string !LN! from our list.
8872    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8873    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8874      # If it failed, the variable was not from the command line. Ignore it,
8875      # but warn the user (except for BASH, which is always set by the calling BASH).
8876      if test "xLN" != xBASH; then
8877        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8878$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8879      fi
8880      # Try to locate tool using the code snippet
8881      for ac_prog in ln
8882do
8883  # Extract the first word of "$ac_prog", so it can be a program name with args.
8884set dummy $ac_prog; ac_word=$2
8885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8886$as_echo_n "checking for $ac_word... " >&6; }
8887if ${ac_cv_path_LN+:} false; then :
8888  $as_echo_n "(cached) " >&6
8889else
8890  case $LN in
8891  [\\/]* | ?:[\\/]*)
8892  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8893  ;;
8894  *)
8895  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8896for as_dir in $PATH
8897do
8898  IFS=$as_save_IFS
8899  test -z "$as_dir" && as_dir=.
8900    for ac_exec_ext in '' $ac_executable_extensions; do
8901  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8902    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8903    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8904    break 2
8905  fi
8906done
8907  done
8908IFS=$as_save_IFS
8909
8910  ;;
8911esac
8912fi
8913LN=$ac_cv_path_LN
8914if test -n "$LN"; then
8915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8916$as_echo "$LN" >&6; }
8917else
8918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8919$as_echo "no" >&6; }
8920fi
8921
8922
8923  test -n "$LN" && break
8924done
8925
8926    else
8927      # If it succeeded, then it was overridden by the user. We will use it
8928      # for the tool.
8929
8930      # First remove it from the list of overridden variables, so we can test
8931      # for unknown variables in the end.
8932      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8933
8934      # Check if we try to supply an empty value
8935      if test "x$LN" = x; then
8936        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8937$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8938        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8939$as_echo_n "checking for LN... " >&6; }
8940        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8941$as_echo "disabled" >&6; }
8942      else
8943        # Check if the provided tool contains a complete path.
8944        tool_specified="$LN"
8945        tool_basename="${tool_specified##*/}"
8946        if test "x$tool_basename" = "x$tool_specified"; then
8947          # A command without a complete path is provided, search $PATH.
8948          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8949$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8950          # Extract the first word of "$tool_basename", so it can be a program name with args.
8951set dummy $tool_basename; ac_word=$2
8952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8953$as_echo_n "checking for $ac_word... " >&6; }
8954if ${ac_cv_path_LN+:} false; then :
8955  $as_echo_n "(cached) " >&6
8956else
8957  case $LN in
8958  [\\/]* | ?:[\\/]*)
8959  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8960  ;;
8961  *)
8962  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8963for as_dir in $PATH
8964do
8965  IFS=$as_save_IFS
8966  test -z "$as_dir" && as_dir=.
8967    for ac_exec_ext in '' $ac_executable_extensions; do
8968  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8969    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8970    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8971    break 2
8972  fi
8973done
8974  done
8975IFS=$as_save_IFS
8976
8977  ;;
8978esac
8979fi
8980LN=$ac_cv_path_LN
8981if test -n "$LN"; then
8982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8983$as_echo "$LN" >&6; }
8984else
8985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8986$as_echo "no" >&6; }
8987fi
8988
8989
8990          if test "x$LN" = x; then
8991            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8992          fi
8993        else
8994          # Otherwise we believe it is a complete path. Use it as it is.
8995          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
8996$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
8997          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8998$as_echo_n "checking for LN... " >&6; }
8999          if test ! -x "$tool_specified"; then
9000            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9001$as_echo "not found" >&6; }
9002            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
9003          fi
9004          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9005$as_echo "$tool_specified" >&6; }
9006        fi
9007      fi
9008    fi
9009
9010  fi
9011
9012
9013
9014  if test "x$LN" = x; then
9015    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
9016  fi
9017
9018
9019
9020
9021
9022  # Publish this variable in the help.
9023
9024
9025  if [ -z "${LS+x}" ]; then
9026    # The variable is not set by user, try to locate tool using the code snippet
9027    for ac_prog in ls
9028do
9029  # Extract the first word of "$ac_prog", so it can be a program name with args.
9030set dummy $ac_prog; ac_word=$2
9031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9032$as_echo_n "checking for $ac_word... " >&6; }
9033if ${ac_cv_path_LS+:} false; then :
9034  $as_echo_n "(cached) " >&6
9035else
9036  case $LS in
9037  [\\/]* | ?:[\\/]*)
9038  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9039  ;;
9040  *)
9041  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9042for as_dir in $PATH
9043do
9044  IFS=$as_save_IFS
9045  test -z "$as_dir" && as_dir=.
9046    for ac_exec_ext in '' $ac_executable_extensions; do
9047  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9048    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9049    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9050    break 2
9051  fi
9052done
9053  done
9054IFS=$as_save_IFS
9055
9056  ;;
9057esac
9058fi
9059LS=$ac_cv_path_LS
9060if test -n "$LS"; then
9061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9062$as_echo "$LS" >&6; }
9063else
9064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9065$as_echo "no" >&6; }
9066fi
9067
9068
9069  test -n "$LS" && break
9070done
9071
9072  else
9073    # The variable is set, but is it from the command line or the environment?
9074
9075    # Try to remove the string !LS! from our list.
9076    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
9077    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9078      # If it failed, the variable was not from the command line. Ignore it,
9079      # but warn the user (except for BASH, which is always set by the calling BASH).
9080      if test "xLS" != xBASH; then
9081        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
9082$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
9083      fi
9084      # Try to locate tool using the code snippet
9085      for ac_prog in ls
9086do
9087  # Extract the first word of "$ac_prog", so it can be a program name with args.
9088set dummy $ac_prog; ac_word=$2
9089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9090$as_echo_n "checking for $ac_word... " >&6; }
9091if ${ac_cv_path_LS+:} false; then :
9092  $as_echo_n "(cached) " >&6
9093else
9094  case $LS in
9095  [\\/]* | ?:[\\/]*)
9096  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9097  ;;
9098  *)
9099  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9100for as_dir in $PATH
9101do
9102  IFS=$as_save_IFS
9103  test -z "$as_dir" && as_dir=.
9104    for ac_exec_ext in '' $ac_executable_extensions; do
9105  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9106    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9107    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9108    break 2
9109  fi
9110done
9111  done
9112IFS=$as_save_IFS
9113
9114  ;;
9115esac
9116fi
9117LS=$ac_cv_path_LS
9118if test -n "$LS"; then
9119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9120$as_echo "$LS" >&6; }
9121else
9122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9123$as_echo "no" >&6; }
9124fi
9125
9126
9127  test -n "$LS" && break
9128done
9129
9130    else
9131      # If it succeeded, then it was overridden by the user. We will use it
9132      # for the tool.
9133
9134      # First remove it from the list of overridden variables, so we can test
9135      # for unknown variables in the end.
9136      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9137
9138      # Check if we try to supply an empty value
9139      if test "x$LS" = x; then
9140        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
9141$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
9142        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9143$as_echo_n "checking for LS... " >&6; }
9144        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9145$as_echo "disabled" >&6; }
9146      else
9147        # Check if the provided tool contains a complete path.
9148        tool_specified="$LS"
9149        tool_basename="${tool_specified##*/}"
9150        if test "x$tool_basename" = "x$tool_specified"; then
9151          # A command without a complete path is provided, search $PATH.
9152          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
9153$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
9154          # Extract the first word of "$tool_basename", so it can be a program name with args.
9155set dummy $tool_basename; ac_word=$2
9156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9157$as_echo_n "checking for $ac_word... " >&6; }
9158if ${ac_cv_path_LS+:} false; then :
9159  $as_echo_n "(cached) " >&6
9160else
9161  case $LS in
9162  [\\/]* | ?:[\\/]*)
9163  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9164  ;;
9165  *)
9166  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9167for as_dir in $PATH
9168do
9169  IFS=$as_save_IFS
9170  test -z "$as_dir" && as_dir=.
9171    for ac_exec_ext in '' $ac_executable_extensions; do
9172  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9173    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9174    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9175    break 2
9176  fi
9177done
9178  done
9179IFS=$as_save_IFS
9180
9181  ;;
9182esac
9183fi
9184LS=$ac_cv_path_LS
9185if test -n "$LS"; then
9186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9187$as_echo "$LS" >&6; }
9188else
9189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9190$as_echo "no" >&6; }
9191fi
9192
9193
9194          if test "x$LS" = x; then
9195            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9196          fi
9197        else
9198          # Otherwise we believe it is a complete path. Use it as it is.
9199          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
9200$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
9201          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9202$as_echo_n "checking for LS... " >&6; }
9203          if test ! -x "$tool_specified"; then
9204            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9205$as_echo "not found" >&6; }
9206            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
9207          fi
9208          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9209$as_echo "$tool_specified" >&6; }
9210        fi
9211      fi
9212    fi
9213
9214  fi
9215
9216
9217
9218  if test "x$LS" = x; then
9219    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
9220  fi
9221
9222
9223
9224
9225
9226  # Publish this variable in the help.
9227
9228
9229  if [ -z "${MKDIR+x}" ]; then
9230    # The variable is not set by user, try to locate tool using the code snippet
9231    for ac_prog in mkdir
9232do
9233  # Extract the first word of "$ac_prog", so it can be a program name with args.
9234set dummy $ac_prog; ac_word=$2
9235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9236$as_echo_n "checking for $ac_word... " >&6; }
9237if ${ac_cv_path_MKDIR+:} false; then :
9238  $as_echo_n "(cached) " >&6
9239else
9240  case $MKDIR in
9241  [\\/]* | ?:[\\/]*)
9242  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9243  ;;
9244  *)
9245  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9246for as_dir in $PATH
9247do
9248  IFS=$as_save_IFS
9249  test -z "$as_dir" && as_dir=.
9250    for ac_exec_ext in '' $ac_executable_extensions; do
9251  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9252    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9253    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9254    break 2
9255  fi
9256done
9257  done
9258IFS=$as_save_IFS
9259
9260  ;;
9261esac
9262fi
9263MKDIR=$ac_cv_path_MKDIR
9264if test -n "$MKDIR"; then
9265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9266$as_echo "$MKDIR" >&6; }
9267else
9268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9269$as_echo "no" >&6; }
9270fi
9271
9272
9273  test -n "$MKDIR" && break
9274done
9275
9276  else
9277    # The variable is set, but is it from the command line or the environment?
9278
9279    # Try to remove the string !MKDIR! from our list.
9280    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
9281    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9282      # If it failed, the variable was not from the command line. Ignore it,
9283      # but warn the user (except for BASH, which is always set by the calling BASH).
9284      if test "xMKDIR" != xBASH; then
9285        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
9286$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
9287      fi
9288      # Try to locate tool using the code snippet
9289      for ac_prog in mkdir
9290do
9291  # Extract the first word of "$ac_prog", so it can be a program name with args.
9292set dummy $ac_prog; ac_word=$2
9293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9294$as_echo_n "checking for $ac_word... " >&6; }
9295if ${ac_cv_path_MKDIR+:} false; then :
9296  $as_echo_n "(cached) " >&6
9297else
9298  case $MKDIR in
9299  [\\/]* | ?:[\\/]*)
9300  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9301  ;;
9302  *)
9303  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9304for as_dir in $PATH
9305do
9306  IFS=$as_save_IFS
9307  test -z "$as_dir" && as_dir=.
9308    for ac_exec_ext in '' $ac_executable_extensions; do
9309  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9310    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9311    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9312    break 2
9313  fi
9314done
9315  done
9316IFS=$as_save_IFS
9317
9318  ;;
9319esac
9320fi
9321MKDIR=$ac_cv_path_MKDIR
9322if test -n "$MKDIR"; then
9323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9324$as_echo "$MKDIR" >&6; }
9325else
9326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9327$as_echo "no" >&6; }
9328fi
9329
9330
9331  test -n "$MKDIR" && break
9332done
9333
9334    else
9335      # If it succeeded, then it was overridden by the user. We will use it
9336      # for the tool.
9337
9338      # First remove it from the list of overridden variables, so we can test
9339      # for unknown variables in the end.
9340      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9341
9342      # Check if we try to supply an empty value
9343      if test "x$MKDIR" = x; then
9344        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
9345$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
9346        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9347$as_echo_n "checking for MKDIR... " >&6; }
9348        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9349$as_echo "disabled" >&6; }
9350      else
9351        # Check if the provided tool contains a complete path.
9352        tool_specified="$MKDIR"
9353        tool_basename="${tool_specified##*/}"
9354        if test "x$tool_basename" = "x$tool_specified"; then
9355          # A command without a complete path is provided, search $PATH.
9356          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
9357$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
9358          # Extract the first word of "$tool_basename", so it can be a program name with args.
9359set dummy $tool_basename; ac_word=$2
9360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9361$as_echo_n "checking for $ac_word... " >&6; }
9362if ${ac_cv_path_MKDIR+:} false; then :
9363  $as_echo_n "(cached) " >&6
9364else
9365  case $MKDIR in
9366  [\\/]* | ?:[\\/]*)
9367  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9368  ;;
9369  *)
9370  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9371for as_dir in $PATH
9372do
9373  IFS=$as_save_IFS
9374  test -z "$as_dir" && as_dir=.
9375    for ac_exec_ext in '' $ac_executable_extensions; do
9376  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9377    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9378    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9379    break 2
9380  fi
9381done
9382  done
9383IFS=$as_save_IFS
9384
9385  ;;
9386esac
9387fi
9388MKDIR=$ac_cv_path_MKDIR
9389if test -n "$MKDIR"; then
9390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9391$as_echo "$MKDIR" >&6; }
9392else
9393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9394$as_echo "no" >&6; }
9395fi
9396
9397
9398          if test "x$MKDIR" = x; then
9399            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9400          fi
9401        else
9402          # Otherwise we believe it is a complete path. Use it as it is.
9403          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
9404$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
9405          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9406$as_echo_n "checking for MKDIR... " >&6; }
9407          if test ! -x "$tool_specified"; then
9408            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9409$as_echo "not found" >&6; }
9410            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9411          fi
9412          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9413$as_echo "$tool_specified" >&6; }
9414        fi
9415      fi
9416    fi
9417
9418  fi
9419
9420
9421
9422  if test "x$MKDIR" = x; then
9423    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
9424  fi
9425
9426
9427
9428
9429
9430  # Publish this variable in the help.
9431
9432
9433  if [ -z "${MKTEMP+x}" ]; then
9434    # The variable is not set by user, try to locate tool using the code snippet
9435    for ac_prog in mktemp
9436do
9437  # Extract the first word of "$ac_prog", so it can be a program name with args.
9438set dummy $ac_prog; ac_word=$2
9439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9440$as_echo_n "checking for $ac_word... " >&6; }
9441if ${ac_cv_path_MKTEMP+:} false; then :
9442  $as_echo_n "(cached) " >&6
9443else
9444  case $MKTEMP in
9445  [\\/]* | ?:[\\/]*)
9446  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9447  ;;
9448  *)
9449  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9450for as_dir in $PATH
9451do
9452  IFS=$as_save_IFS
9453  test -z "$as_dir" && as_dir=.
9454    for ac_exec_ext in '' $ac_executable_extensions; do
9455  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9456    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9457    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9458    break 2
9459  fi
9460done
9461  done
9462IFS=$as_save_IFS
9463
9464  ;;
9465esac
9466fi
9467MKTEMP=$ac_cv_path_MKTEMP
9468if test -n "$MKTEMP"; then
9469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9470$as_echo "$MKTEMP" >&6; }
9471else
9472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9473$as_echo "no" >&6; }
9474fi
9475
9476
9477  test -n "$MKTEMP" && break
9478done
9479
9480  else
9481    # The variable is set, but is it from the command line or the environment?
9482
9483    # Try to remove the string !MKTEMP! from our list.
9484    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9485    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9486      # If it failed, the variable was not from the command line. Ignore it,
9487      # but warn the user (except for BASH, which is always set by the calling BASH).
9488      if test "xMKTEMP" != xBASH; then
9489        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9490$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9491      fi
9492      # Try to locate tool using the code snippet
9493      for ac_prog in mktemp
9494do
9495  # Extract the first word of "$ac_prog", so it can be a program name with args.
9496set dummy $ac_prog; ac_word=$2
9497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9498$as_echo_n "checking for $ac_word... " >&6; }
9499if ${ac_cv_path_MKTEMP+:} false; then :
9500  $as_echo_n "(cached) " >&6
9501else
9502  case $MKTEMP in
9503  [\\/]* | ?:[\\/]*)
9504  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9505  ;;
9506  *)
9507  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9508for as_dir in $PATH
9509do
9510  IFS=$as_save_IFS
9511  test -z "$as_dir" && as_dir=.
9512    for ac_exec_ext in '' $ac_executable_extensions; do
9513  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9514    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9515    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9516    break 2
9517  fi
9518done
9519  done
9520IFS=$as_save_IFS
9521
9522  ;;
9523esac
9524fi
9525MKTEMP=$ac_cv_path_MKTEMP
9526if test -n "$MKTEMP"; then
9527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9528$as_echo "$MKTEMP" >&6; }
9529else
9530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9531$as_echo "no" >&6; }
9532fi
9533
9534
9535  test -n "$MKTEMP" && break
9536done
9537
9538    else
9539      # If it succeeded, then it was overridden by the user. We will use it
9540      # for the tool.
9541
9542      # First remove it from the list of overridden variables, so we can test
9543      # for unknown variables in the end.
9544      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9545
9546      # Check if we try to supply an empty value
9547      if test "x$MKTEMP" = x; then
9548        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9549$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9550        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9551$as_echo_n "checking for MKTEMP... " >&6; }
9552        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9553$as_echo "disabled" >&6; }
9554      else
9555        # Check if the provided tool contains a complete path.
9556        tool_specified="$MKTEMP"
9557        tool_basename="${tool_specified##*/}"
9558        if test "x$tool_basename" = "x$tool_specified"; then
9559          # A command without a complete path is provided, search $PATH.
9560          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9561$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9562          # Extract the first word of "$tool_basename", so it can be a program name with args.
9563set dummy $tool_basename; ac_word=$2
9564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9565$as_echo_n "checking for $ac_word... " >&6; }
9566if ${ac_cv_path_MKTEMP+:} false; then :
9567  $as_echo_n "(cached) " >&6
9568else
9569  case $MKTEMP in
9570  [\\/]* | ?:[\\/]*)
9571  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9572  ;;
9573  *)
9574  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9575for as_dir in $PATH
9576do
9577  IFS=$as_save_IFS
9578  test -z "$as_dir" && as_dir=.
9579    for ac_exec_ext in '' $ac_executable_extensions; do
9580  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9581    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9582    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9583    break 2
9584  fi
9585done
9586  done
9587IFS=$as_save_IFS
9588
9589  ;;
9590esac
9591fi
9592MKTEMP=$ac_cv_path_MKTEMP
9593if test -n "$MKTEMP"; then
9594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9595$as_echo "$MKTEMP" >&6; }
9596else
9597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9598$as_echo "no" >&6; }
9599fi
9600
9601
9602          if test "x$MKTEMP" = x; then
9603            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9604          fi
9605        else
9606          # Otherwise we believe it is a complete path. Use it as it is.
9607          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9608$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9609          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9610$as_echo_n "checking for MKTEMP... " >&6; }
9611          if test ! -x "$tool_specified"; then
9612            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9613$as_echo "not found" >&6; }
9614            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9615          fi
9616          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9617$as_echo "$tool_specified" >&6; }
9618        fi
9619      fi
9620    fi
9621
9622  fi
9623
9624
9625
9626  if test "x$MKTEMP" = x; then
9627    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9628  fi
9629
9630
9631
9632
9633
9634  # Publish this variable in the help.
9635
9636
9637  if [ -z "${MV+x}" ]; then
9638    # The variable is not set by user, try to locate tool using the code snippet
9639    for ac_prog in mv
9640do
9641  # Extract the first word of "$ac_prog", so it can be a program name with args.
9642set dummy $ac_prog; ac_word=$2
9643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9644$as_echo_n "checking for $ac_word... " >&6; }
9645if ${ac_cv_path_MV+:} false; then :
9646  $as_echo_n "(cached) " >&6
9647else
9648  case $MV in
9649  [\\/]* | ?:[\\/]*)
9650  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9651  ;;
9652  *)
9653  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9654for as_dir in $PATH
9655do
9656  IFS=$as_save_IFS
9657  test -z "$as_dir" && as_dir=.
9658    for ac_exec_ext in '' $ac_executable_extensions; do
9659  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9660    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9661    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9662    break 2
9663  fi
9664done
9665  done
9666IFS=$as_save_IFS
9667
9668  ;;
9669esac
9670fi
9671MV=$ac_cv_path_MV
9672if test -n "$MV"; then
9673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9674$as_echo "$MV" >&6; }
9675else
9676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9677$as_echo "no" >&6; }
9678fi
9679
9680
9681  test -n "$MV" && break
9682done
9683
9684  else
9685    # The variable is set, but is it from the command line or the environment?
9686
9687    # Try to remove the string !MV! from our list.
9688    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9689    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9690      # If it failed, the variable was not from the command line. Ignore it,
9691      # but warn the user (except for BASH, which is always set by the calling BASH).
9692      if test "xMV" != xBASH; then
9693        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9694$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9695      fi
9696      # Try to locate tool using the code snippet
9697      for ac_prog in mv
9698do
9699  # Extract the first word of "$ac_prog", so it can be a program name with args.
9700set dummy $ac_prog; ac_word=$2
9701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9702$as_echo_n "checking for $ac_word... " >&6; }
9703if ${ac_cv_path_MV+:} false; then :
9704  $as_echo_n "(cached) " >&6
9705else
9706  case $MV in
9707  [\\/]* | ?:[\\/]*)
9708  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9709  ;;
9710  *)
9711  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9712for as_dir in $PATH
9713do
9714  IFS=$as_save_IFS
9715  test -z "$as_dir" && as_dir=.
9716    for ac_exec_ext in '' $ac_executable_extensions; do
9717  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9718    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9719    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9720    break 2
9721  fi
9722done
9723  done
9724IFS=$as_save_IFS
9725
9726  ;;
9727esac
9728fi
9729MV=$ac_cv_path_MV
9730if test -n "$MV"; then
9731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9732$as_echo "$MV" >&6; }
9733else
9734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9735$as_echo "no" >&6; }
9736fi
9737
9738
9739  test -n "$MV" && break
9740done
9741
9742    else
9743      # If it succeeded, then it was overridden by the user. We will use it
9744      # for the tool.
9745
9746      # First remove it from the list of overridden variables, so we can test
9747      # for unknown variables in the end.
9748      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9749
9750      # Check if we try to supply an empty value
9751      if test "x$MV" = x; then
9752        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9753$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9754        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9755$as_echo_n "checking for MV... " >&6; }
9756        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9757$as_echo "disabled" >&6; }
9758      else
9759        # Check if the provided tool contains a complete path.
9760        tool_specified="$MV"
9761        tool_basename="${tool_specified##*/}"
9762        if test "x$tool_basename" = "x$tool_specified"; then
9763          # A command without a complete path is provided, search $PATH.
9764          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9765$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9766          # Extract the first word of "$tool_basename", so it can be a program name with args.
9767set dummy $tool_basename; ac_word=$2
9768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9769$as_echo_n "checking for $ac_word... " >&6; }
9770if ${ac_cv_path_MV+:} false; then :
9771  $as_echo_n "(cached) " >&6
9772else
9773  case $MV in
9774  [\\/]* | ?:[\\/]*)
9775  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9776  ;;
9777  *)
9778  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9779for as_dir in $PATH
9780do
9781  IFS=$as_save_IFS
9782  test -z "$as_dir" && as_dir=.
9783    for ac_exec_ext in '' $ac_executable_extensions; do
9784  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9785    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9786    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9787    break 2
9788  fi
9789done
9790  done
9791IFS=$as_save_IFS
9792
9793  ;;
9794esac
9795fi
9796MV=$ac_cv_path_MV
9797if test -n "$MV"; then
9798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9799$as_echo "$MV" >&6; }
9800else
9801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9802$as_echo "no" >&6; }
9803fi
9804
9805
9806          if test "x$MV" = x; then
9807            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9808          fi
9809        else
9810          # Otherwise we believe it is a complete path. Use it as it is.
9811          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9812$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9813          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9814$as_echo_n "checking for MV... " >&6; }
9815          if test ! -x "$tool_specified"; then
9816            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9817$as_echo "not found" >&6; }
9818            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9819          fi
9820          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9821$as_echo "$tool_specified" >&6; }
9822        fi
9823      fi
9824    fi
9825
9826  fi
9827
9828
9829
9830  if test "x$MV" = x; then
9831    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9832  fi
9833
9834
9835
9836
9837
9838  # Publish this variable in the help.
9839
9840
9841  if [ -z "${NAWK+x}" ]; then
9842    # The variable is not set by user, try to locate tool using the code snippet
9843    for ac_prog in nawk gawk awk
9844do
9845  # Extract the first word of "$ac_prog", so it can be a program name with args.
9846set dummy $ac_prog; ac_word=$2
9847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9848$as_echo_n "checking for $ac_word... " >&6; }
9849if ${ac_cv_path_NAWK+:} false; then :
9850  $as_echo_n "(cached) " >&6
9851else
9852  case $NAWK in
9853  [\\/]* | ?:[\\/]*)
9854  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9855  ;;
9856  *)
9857  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9858for as_dir in $PATH
9859do
9860  IFS=$as_save_IFS
9861  test -z "$as_dir" && as_dir=.
9862    for ac_exec_ext in '' $ac_executable_extensions; do
9863  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9864    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9865    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9866    break 2
9867  fi
9868done
9869  done
9870IFS=$as_save_IFS
9871
9872  ;;
9873esac
9874fi
9875NAWK=$ac_cv_path_NAWK
9876if test -n "$NAWK"; then
9877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9878$as_echo "$NAWK" >&6; }
9879else
9880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9881$as_echo "no" >&6; }
9882fi
9883
9884
9885  test -n "$NAWK" && break
9886done
9887
9888  else
9889    # The variable is set, but is it from the command line or the environment?
9890
9891    # Try to remove the string !NAWK! from our list.
9892    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9893    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9894      # If it failed, the variable was not from the command line. Ignore it,
9895      # but warn the user (except for BASH, which is always set by the calling BASH).
9896      if test "xNAWK" != xBASH; then
9897        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9898$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9899      fi
9900      # Try to locate tool using the code snippet
9901      for ac_prog in nawk gawk awk
9902do
9903  # Extract the first word of "$ac_prog", so it can be a program name with args.
9904set dummy $ac_prog; ac_word=$2
9905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9906$as_echo_n "checking for $ac_word... " >&6; }
9907if ${ac_cv_path_NAWK+:} false; then :
9908  $as_echo_n "(cached) " >&6
9909else
9910  case $NAWK in
9911  [\\/]* | ?:[\\/]*)
9912  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9913  ;;
9914  *)
9915  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9916for as_dir in $PATH
9917do
9918  IFS=$as_save_IFS
9919  test -z "$as_dir" && as_dir=.
9920    for ac_exec_ext in '' $ac_executable_extensions; do
9921  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9922    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9923    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9924    break 2
9925  fi
9926done
9927  done
9928IFS=$as_save_IFS
9929
9930  ;;
9931esac
9932fi
9933NAWK=$ac_cv_path_NAWK
9934if test -n "$NAWK"; then
9935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9936$as_echo "$NAWK" >&6; }
9937else
9938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9939$as_echo "no" >&6; }
9940fi
9941
9942
9943  test -n "$NAWK" && break
9944done
9945
9946    else
9947      # If it succeeded, then it was overridden by the user. We will use it
9948      # for the tool.
9949
9950      # First remove it from the list of overridden variables, so we can test
9951      # for unknown variables in the end.
9952      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9953
9954      # Check if we try to supply an empty value
9955      if test "x$NAWK" = x; then
9956        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9957$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9958        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9959$as_echo_n "checking for NAWK... " >&6; }
9960        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9961$as_echo "disabled" >&6; }
9962      else
9963        # Check if the provided tool contains a complete path.
9964        tool_specified="$NAWK"
9965        tool_basename="${tool_specified##*/}"
9966        if test "x$tool_basename" = "x$tool_specified"; then
9967          # A command without a complete path is provided, search $PATH.
9968          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
9969$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
9970          # Extract the first word of "$tool_basename", so it can be a program name with args.
9971set dummy $tool_basename; ac_word=$2
9972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9973$as_echo_n "checking for $ac_word... " >&6; }
9974if ${ac_cv_path_NAWK+:} false; then :
9975  $as_echo_n "(cached) " >&6
9976else
9977  case $NAWK in
9978  [\\/]* | ?:[\\/]*)
9979  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9980  ;;
9981  *)
9982  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9983for as_dir in $PATH
9984do
9985  IFS=$as_save_IFS
9986  test -z "$as_dir" && as_dir=.
9987    for ac_exec_ext in '' $ac_executable_extensions; do
9988  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9989    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9990    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9991    break 2
9992  fi
9993done
9994  done
9995IFS=$as_save_IFS
9996
9997  ;;
9998esac
9999fi
10000NAWK=$ac_cv_path_NAWK
10001if test -n "$NAWK"; then
10002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10003$as_echo "$NAWK" >&6; }
10004else
10005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10006$as_echo "no" >&6; }
10007fi
10008
10009
10010          if test "x$NAWK" = x; then
10011            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10012          fi
10013        else
10014          # Otherwise we believe it is a complete path. Use it as it is.
10015          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
10016$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
10017          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10018$as_echo_n "checking for NAWK... " >&6; }
10019          if test ! -x "$tool_specified"; then
10020            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10021$as_echo "not found" >&6; }
10022            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
10023          fi
10024          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10025$as_echo "$tool_specified" >&6; }
10026        fi
10027      fi
10028    fi
10029
10030  fi
10031
10032
10033
10034  if test "x$NAWK" = x; then
10035    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
10036  fi
10037
10038
10039
10040
10041
10042  # Publish this variable in the help.
10043
10044
10045  if [ -z "${PRINTF+x}" ]; then
10046    # The variable is not set by user, try to locate tool using the code snippet
10047    for ac_prog in printf
10048do
10049  # Extract the first word of "$ac_prog", so it can be a program name with args.
10050set dummy $ac_prog; ac_word=$2
10051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10052$as_echo_n "checking for $ac_word... " >&6; }
10053if ${ac_cv_path_PRINTF+:} false; then :
10054  $as_echo_n "(cached) " >&6
10055else
10056  case $PRINTF in
10057  [\\/]* | ?:[\\/]*)
10058  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10059  ;;
10060  *)
10061  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10062for as_dir in $PATH
10063do
10064  IFS=$as_save_IFS
10065  test -z "$as_dir" && as_dir=.
10066    for ac_exec_ext in '' $ac_executable_extensions; do
10067  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10068    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10069    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10070    break 2
10071  fi
10072done
10073  done
10074IFS=$as_save_IFS
10075
10076  ;;
10077esac
10078fi
10079PRINTF=$ac_cv_path_PRINTF
10080if test -n "$PRINTF"; then
10081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10082$as_echo "$PRINTF" >&6; }
10083else
10084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10085$as_echo "no" >&6; }
10086fi
10087
10088
10089  test -n "$PRINTF" && break
10090done
10091
10092  else
10093    # The variable is set, but is it from the command line or the environment?
10094
10095    # Try to remove the string !PRINTF! from our list.
10096    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
10097    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10098      # If it failed, the variable was not from the command line. Ignore it,
10099      # but warn the user (except for BASH, which is always set by the calling BASH).
10100      if test "xPRINTF" != xBASH; then
10101        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
10102$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
10103      fi
10104      # Try to locate tool using the code snippet
10105      for ac_prog in printf
10106do
10107  # Extract the first word of "$ac_prog", so it can be a program name with args.
10108set dummy $ac_prog; ac_word=$2
10109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10110$as_echo_n "checking for $ac_word... " >&6; }
10111if ${ac_cv_path_PRINTF+:} false; then :
10112  $as_echo_n "(cached) " >&6
10113else
10114  case $PRINTF in
10115  [\\/]* | ?:[\\/]*)
10116  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10117  ;;
10118  *)
10119  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10120for as_dir in $PATH
10121do
10122  IFS=$as_save_IFS
10123  test -z "$as_dir" && as_dir=.
10124    for ac_exec_ext in '' $ac_executable_extensions; do
10125  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10126    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10127    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10128    break 2
10129  fi
10130done
10131  done
10132IFS=$as_save_IFS
10133
10134  ;;
10135esac
10136fi
10137PRINTF=$ac_cv_path_PRINTF
10138if test -n "$PRINTF"; then
10139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10140$as_echo "$PRINTF" >&6; }
10141else
10142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10143$as_echo "no" >&6; }
10144fi
10145
10146
10147  test -n "$PRINTF" && break
10148done
10149
10150    else
10151      # If it succeeded, then it was overridden by the user. We will use it
10152      # for the tool.
10153
10154      # First remove it from the list of overridden variables, so we can test
10155      # for unknown variables in the end.
10156      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10157
10158      # Check if we try to supply an empty value
10159      if test "x$PRINTF" = x; then
10160        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
10161$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
10162        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10163$as_echo_n "checking for PRINTF... " >&6; }
10164        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10165$as_echo "disabled" >&6; }
10166      else
10167        # Check if the provided tool contains a complete path.
10168        tool_specified="$PRINTF"
10169        tool_basename="${tool_specified##*/}"
10170        if test "x$tool_basename" = "x$tool_specified"; then
10171          # A command without a complete path is provided, search $PATH.
10172          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
10173$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
10174          # Extract the first word of "$tool_basename", so it can be a program name with args.
10175set dummy $tool_basename; ac_word=$2
10176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10177$as_echo_n "checking for $ac_word... " >&6; }
10178if ${ac_cv_path_PRINTF+:} false; then :
10179  $as_echo_n "(cached) " >&6
10180else
10181  case $PRINTF in
10182  [\\/]* | ?:[\\/]*)
10183  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10184  ;;
10185  *)
10186  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10187for as_dir in $PATH
10188do
10189  IFS=$as_save_IFS
10190  test -z "$as_dir" && as_dir=.
10191    for ac_exec_ext in '' $ac_executable_extensions; do
10192  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10193    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10194    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10195    break 2
10196  fi
10197done
10198  done
10199IFS=$as_save_IFS
10200
10201  ;;
10202esac
10203fi
10204PRINTF=$ac_cv_path_PRINTF
10205if test -n "$PRINTF"; then
10206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10207$as_echo "$PRINTF" >&6; }
10208else
10209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10210$as_echo "no" >&6; }
10211fi
10212
10213
10214          if test "x$PRINTF" = x; then
10215            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10216          fi
10217        else
10218          # Otherwise we believe it is a complete path. Use it as it is.
10219          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
10220$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
10221          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10222$as_echo_n "checking for PRINTF... " >&6; }
10223          if test ! -x "$tool_specified"; then
10224            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10225$as_echo "not found" >&6; }
10226            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
10227          fi
10228          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10229$as_echo "$tool_specified" >&6; }
10230        fi
10231      fi
10232    fi
10233
10234  fi
10235
10236
10237
10238  if test "x$PRINTF" = x; then
10239    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
10240  fi
10241
10242
10243
10244
10245
10246  # Publish this variable in the help.
10247
10248
10249  if [ -z "${RM+x}" ]; then
10250    # The variable is not set by user, try to locate tool using the code snippet
10251    for ac_prog in rm
10252do
10253  # Extract the first word of "$ac_prog", so it can be a program name with args.
10254set dummy $ac_prog; ac_word=$2
10255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10256$as_echo_n "checking for $ac_word... " >&6; }
10257if ${ac_cv_path_RM+:} false; then :
10258  $as_echo_n "(cached) " >&6
10259else
10260  case $RM in
10261  [\\/]* | ?:[\\/]*)
10262  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10263  ;;
10264  *)
10265  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10266for as_dir in $PATH
10267do
10268  IFS=$as_save_IFS
10269  test -z "$as_dir" && as_dir=.
10270    for ac_exec_ext in '' $ac_executable_extensions; do
10271  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10272    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10273    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10274    break 2
10275  fi
10276done
10277  done
10278IFS=$as_save_IFS
10279
10280  ;;
10281esac
10282fi
10283RM=$ac_cv_path_RM
10284if test -n "$RM"; then
10285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10286$as_echo "$RM" >&6; }
10287else
10288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10289$as_echo "no" >&6; }
10290fi
10291
10292
10293  test -n "$RM" && break
10294done
10295
10296  else
10297    # The variable is set, but is it from the command line or the environment?
10298
10299    # Try to remove the string !RM! from our list.
10300    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
10301    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10302      # If it failed, the variable was not from the command line. Ignore it,
10303      # but warn the user (except for BASH, which is always set by the calling BASH).
10304      if test "xRM" != xBASH; then
10305        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
10306$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
10307      fi
10308      # Try to locate tool using the code snippet
10309      for ac_prog in rm
10310do
10311  # Extract the first word of "$ac_prog", so it can be a program name with args.
10312set dummy $ac_prog; ac_word=$2
10313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10314$as_echo_n "checking for $ac_word... " >&6; }
10315if ${ac_cv_path_RM+:} false; then :
10316  $as_echo_n "(cached) " >&6
10317else
10318  case $RM in
10319  [\\/]* | ?:[\\/]*)
10320  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10321  ;;
10322  *)
10323  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10324for as_dir in $PATH
10325do
10326  IFS=$as_save_IFS
10327  test -z "$as_dir" && as_dir=.
10328    for ac_exec_ext in '' $ac_executable_extensions; do
10329  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10330    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10331    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10332    break 2
10333  fi
10334done
10335  done
10336IFS=$as_save_IFS
10337
10338  ;;
10339esac
10340fi
10341RM=$ac_cv_path_RM
10342if test -n "$RM"; then
10343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10344$as_echo "$RM" >&6; }
10345else
10346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10347$as_echo "no" >&6; }
10348fi
10349
10350
10351  test -n "$RM" && break
10352done
10353
10354    else
10355      # If it succeeded, then it was overridden by the user. We will use it
10356      # for the tool.
10357
10358      # First remove it from the list of overridden variables, so we can test
10359      # for unknown variables in the end.
10360      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10361
10362      # Check if we try to supply an empty value
10363      if test "x$RM" = x; then
10364        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
10365$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
10366        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10367$as_echo_n "checking for RM... " >&6; }
10368        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10369$as_echo "disabled" >&6; }
10370      else
10371        # Check if the provided tool contains a complete path.
10372        tool_specified="$RM"
10373        tool_basename="${tool_specified##*/}"
10374        if test "x$tool_basename" = "x$tool_specified"; then
10375          # A command without a complete path is provided, search $PATH.
10376          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
10377$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
10378          # Extract the first word of "$tool_basename", so it can be a program name with args.
10379set dummy $tool_basename; ac_word=$2
10380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10381$as_echo_n "checking for $ac_word... " >&6; }
10382if ${ac_cv_path_RM+:} false; then :
10383  $as_echo_n "(cached) " >&6
10384else
10385  case $RM in
10386  [\\/]* | ?:[\\/]*)
10387  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10388  ;;
10389  *)
10390  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10391for as_dir in $PATH
10392do
10393  IFS=$as_save_IFS
10394  test -z "$as_dir" && as_dir=.
10395    for ac_exec_ext in '' $ac_executable_extensions; do
10396  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10397    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10398    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10399    break 2
10400  fi
10401done
10402  done
10403IFS=$as_save_IFS
10404
10405  ;;
10406esac
10407fi
10408RM=$ac_cv_path_RM
10409if test -n "$RM"; then
10410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10411$as_echo "$RM" >&6; }
10412else
10413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10414$as_echo "no" >&6; }
10415fi
10416
10417
10418          if test "x$RM" = x; then
10419            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10420          fi
10421        else
10422          # Otherwise we believe it is a complete path. Use it as it is.
10423          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
10424$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
10425          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10426$as_echo_n "checking for RM... " >&6; }
10427          if test ! -x "$tool_specified"; then
10428            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10429$as_echo "not found" >&6; }
10430            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
10431          fi
10432          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10433$as_echo "$tool_specified" >&6; }
10434        fi
10435      fi
10436    fi
10437
10438  fi
10439
10440
10441
10442  if test "x$RM" = x; then
10443    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10444  fi
10445
10446
10447
10448
10449
10450  # Publish this variable in the help.
10451
10452
10453  if [ -z "${RMDIR+x}" ]; then
10454    # The variable is not set by user, try to locate tool using the code snippet
10455    for ac_prog in rmdir
10456do
10457  # Extract the first word of "$ac_prog", so it can be a program name with args.
10458set dummy $ac_prog; ac_word=$2
10459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10460$as_echo_n "checking for $ac_word... " >&6; }
10461if ${ac_cv_path_RMDIR+:} false; then :
10462  $as_echo_n "(cached) " >&6
10463else
10464  case $RMDIR in
10465  [\\/]* | ?:[\\/]*)
10466  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10467  ;;
10468  *)
10469  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10470for as_dir in $PATH
10471do
10472  IFS=$as_save_IFS
10473  test -z "$as_dir" && as_dir=.
10474    for ac_exec_ext in '' $ac_executable_extensions; do
10475  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10476    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10477    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10478    break 2
10479  fi
10480done
10481  done
10482IFS=$as_save_IFS
10483
10484  ;;
10485esac
10486fi
10487RMDIR=$ac_cv_path_RMDIR
10488if test -n "$RMDIR"; then
10489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10490$as_echo "$RMDIR" >&6; }
10491else
10492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10493$as_echo "no" >&6; }
10494fi
10495
10496
10497  test -n "$RMDIR" && break
10498done
10499
10500  else
10501    # The variable is set, but is it from the command line or the environment?
10502
10503    # Try to remove the string !RMDIR! from our list.
10504    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10505    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10506      # If it failed, the variable was not from the command line. Ignore it,
10507      # but warn the user (except for BASH, which is always set by the calling BASH).
10508      if test "xRMDIR" != xBASH; then
10509        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10510$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10511      fi
10512      # Try to locate tool using the code snippet
10513      for ac_prog in rmdir
10514do
10515  # Extract the first word of "$ac_prog", so it can be a program name with args.
10516set dummy $ac_prog; ac_word=$2
10517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10518$as_echo_n "checking for $ac_word... " >&6; }
10519if ${ac_cv_path_RMDIR+:} false; then :
10520  $as_echo_n "(cached) " >&6
10521else
10522  case $RMDIR in
10523  [\\/]* | ?:[\\/]*)
10524  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10525  ;;
10526  *)
10527  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10528for as_dir in $PATH
10529do
10530  IFS=$as_save_IFS
10531  test -z "$as_dir" && as_dir=.
10532    for ac_exec_ext in '' $ac_executable_extensions; do
10533  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10534    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10535    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10536    break 2
10537  fi
10538done
10539  done
10540IFS=$as_save_IFS
10541
10542  ;;
10543esac
10544fi
10545RMDIR=$ac_cv_path_RMDIR
10546if test -n "$RMDIR"; then
10547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10548$as_echo "$RMDIR" >&6; }
10549else
10550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10551$as_echo "no" >&6; }
10552fi
10553
10554
10555  test -n "$RMDIR" && break
10556done
10557
10558    else
10559      # If it succeeded, then it was overridden by the user. We will use it
10560      # for the tool.
10561
10562      # First remove it from the list of overridden variables, so we can test
10563      # for unknown variables in the end.
10564      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10565
10566      # Check if we try to supply an empty value
10567      if test "x$RMDIR" = x; then
10568        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10569$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10570        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10571$as_echo_n "checking for RMDIR... " >&6; }
10572        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10573$as_echo "disabled" >&6; }
10574      else
10575        # Check if the provided tool contains a complete path.
10576        tool_specified="$RMDIR"
10577        tool_basename="${tool_specified##*/}"
10578        if test "x$tool_basename" = "x$tool_specified"; then
10579          # A command without a complete path is provided, search $PATH.
10580          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10581$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10582          # Extract the first word of "$tool_basename", so it can be a program name with args.
10583set dummy $tool_basename; ac_word=$2
10584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10585$as_echo_n "checking for $ac_word... " >&6; }
10586if ${ac_cv_path_RMDIR+:} false; then :
10587  $as_echo_n "(cached) " >&6
10588else
10589  case $RMDIR in
10590  [\\/]* | ?:[\\/]*)
10591  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10592  ;;
10593  *)
10594  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10595for as_dir in $PATH
10596do
10597  IFS=$as_save_IFS
10598  test -z "$as_dir" && as_dir=.
10599    for ac_exec_ext in '' $ac_executable_extensions; do
10600  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10601    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10602    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10603    break 2
10604  fi
10605done
10606  done
10607IFS=$as_save_IFS
10608
10609  ;;
10610esac
10611fi
10612RMDIR=$ac_cv_path_RMDIR
10613if test -n "$RMDIR"; then
10614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10615$as_echo "$RMDIR" >&6; }
10616else
10617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10618$as_echo "no" >&6; }
10619fi
10620
10621
10622          if test "x$RMDIR" = x; then
10623            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10624          fi
10625        else
10626          # Otherwise we believe it is a complete path. Use it as it is.
10627          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10628$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10629          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10630$as_echo_n "checking for RMDIR... " >&6; }
10631          if test ! -x "$tool_specified"; then
10632            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10633$as_echo "not found" >&6; }
10634            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10635          fi
10636          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10637$as_echo "$tool_specified" >&6; }
10638        fi
10639      fi
10640    fi
10641
10642  fi
10643
10644
10645
10646  if test "x$RMDIR" = x; then
10647    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10648  fi
10649
10650
10651
10652
10653
10654  # Publish this variable in the help.
10655
10656
10657  if [ -z "${SH+x}" ]; then
10658    # The variable is not set by user, try to locate tool using the code snippet
10659    for ac_prog in sh
10660do
10661  # Extract the first word of "$ac_prog", so it can be a program name with args.
10662set dummy $ac_prog; ac_word=$2
10663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10664$as_echo_n "checking for $ac_word... " >&6; }
10665if ${ac_cv_path_SH+:} false; then :
10666  $as_echo_n "(cached) " >&6
10667else
10668  case $SH in
10669  [\\/]* | ?:[\\/]*)
10670  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10671  ;;
10672  *)
10673  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10674for as_dir in $PATH
10675do
10676  IFS=$as_save_IFS
10677  test -z "$as_dir" && as_dir=.
10678    for ac_exec_ext in '' $ac_executable_extensions; do
10679  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10680    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10681    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10682    break 2
10683  fi
10684done
10685  done
10686IFS=$as_save_IFS
10687
10688  ;;
10689esac
10690fi
10691SH=$ac_cv_path_SH
10692if test -n "$SH"; then
10693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10694$as_echo "$SH" >&6; }
10695else
10696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10697$as_echo "no" >&6; }
10698fi
10699
10700
10701  test -n "$SH" && break
10702done
10703
10704  else
10705    # The variable is set, but is it from the command line or the environment?
10706
10707    # Try to remove the string !SH! from our list.
10708    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10709    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10710      # If it failed, the variable was not from the command line. Ignore it,
10711      # but warn the user (except for BASH, which is always set by the calling BASH).
10712      if test "xSH" != xBASH; then
10713        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10714$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10715      fi
10716      # Try to locate tool using the code snippet
10717      for ac_prog in sh
10718do
10719  # Extract the first word of "$ac_prog", so it can be a program name with args.
10720set dummy $ac_prog; ac_word=$2
10721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10722$as_echo_n "checking for $ac_word... " >&6; }
10723if ${ac_cv_path_SH+:} false; then :
10724  $as_echo_n "(cached) " >&6
10725else
10726  case $SH in
10727  [\\/]* | ?:[\\/]*)
10728  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10729  ;;
10730  *)
10731  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10732for as_dir in $PATH
10733do
10734  IFS=$as_save_IFS
10735  test -z "$as_dir" && as_dir=.
10736    for ac_exec_ext in '' $ac_executable_extensions; do
10737  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10738    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10739    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10740    break 2
10741  fi
10742done
10743  done
10744IFS=$as_save_IFS
10745
10746  ;;
10747esac
10748fi
10749SH=$ac_cv_path_SH
10750if test -n "$SH"; then
10751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10752$as_echo "$SH" >&6; }
10753else
10754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10755$as_echo "no" >&6; }
10756fi
10757
10758
10759  test -n "$SH" && break
10760done
10761
10762    else
10763      # If it succeeded, then it was overridden by the user. We will use it
10764      # for the tool.
10765
10766      # First remove it from the list of overridden variables, so we can test
10767      # for unknown variables in the end.
10768      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10769
10770      # Check if we try to supply an empty value
10771      if test "x$SH" = x; then
10772        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10773$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10774        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10775$as_echo_n "checking for SH... " >&6; }
10776        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10777$as_echo "disabled" >&6; }
10778      else
10779        # Check if the provided tool contains a complete path.
10780        tool_specified="$SH"
10781        tool_basename="${tool_specified##*/}"
10782        if test "x$tool_basename" = "x$tool_specified"; then
10783          # A command without a complete path is provided, search $PATH.
10784          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10785$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10786          # Extract the first word of "$tool_basename", so it can be a program name with args.
10787set dummy $tool_basename; ac_word=$2
10788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10789$as_echo_n "checking for $ac_word... " >&6; }
10790if ${ac_cv_path_SH+:} false; then :
10791  $as_echo_n "(cached) " >&6
10792else
10793  case $SH in
10794  [\\/]* | ?:[\\/]*)
10795  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10796  ;;
10797  *)
10798  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10799for as_dir in $PATH
10800do
10801  IFS=$as_save_IFS
10802  test -z "$as_dir" && as_dir=.
10803    for ac_exec_ext in '' $ac_executable_extensions; do
10804  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10805    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10806    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10807    break 2
10808  fi
10809done
10810  done
10811IFS=$as_save_IFS
10812
10813  ;;
10814esac
10815fi
10816SH=$ac_cv_path_SH
10817if test -n "$SH"; then
10818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10819$as_echo "$SH" >&6; }
10820else
10821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10822$as_echo "no" >&6; }
10823fi
10824
10825
10826          if test "x$SH" = x; then
10827            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10828          fi
10829        else
10830          # Otherwise we believe it is a complete path. Use it as it is.
10831          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10832$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10833          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10834$as_echo_n "checking for SH... " >&6; }
10835          if test ! -x "$tool_specified"; then
10836            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10837$as_echo "not found" >&6; }
10838            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10839          fi
10840          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10841$as_echo "$tool_specified" >&6; }
10842        fi
10843      fi
10844    fi
10845
10846  fi
10847
10848
10849
10850  if test "x$SH" = x; then
10851    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10852  fi
10853
10854
10855
10856
10857
10858  # Publish this variable in the help.
10859
10860
10861  if [ -z "${SORT+x}" ]; then
10862    # The variable is not set by user, try to locate tool using the code snippet
10863    for ac_prog in sort
10864do
10865  # Extract the first word of "$ac_prog", so it can be a program name with args.
10866set dummy $ac_prog; ac_word=$2
10867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10868$as_echo_n "checking for $ac_word... " >&6; }
10869if ${ac_cv_path_SORT+:} false; then :
10870  $as_echo_n "(cached) " >&6
10871else
10872  case $SORT in
10873  [\\/]* | ?:[\\/]*)
10874  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10875  ;;
10876  *)
10877  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10878for as_dir in $PATH
10879do
10880  IFS=$as_save_IFS
10881  test -z "$as_dir" && as_dir=.
10882    for ac_exec_ext in '' $ac_executable_extensions; do
10883  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10884    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10885    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10886    break 2
10887  fi
10888done
10889  done
10890IFS=$as_save_IFS
10891
10892  ;;
10893esac
10894fi
10895SORT=$ac_cv_path_SORT
10896if test -n "$SORT"; then
10897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10898$as_echo "$SORT" >&6; }
10899else
10900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10901$as_echo "no" >&6; }
10902fi
10903
10904
10905  test -n "$SORT" && break
10906done
10907
10908  else
10909    # The variable is set, but is it from the command line or the environment?
10910
10911    # Try to remove the string !SORT! from our list.
10912    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10913    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10914      # If it failed, the variable was not from the command line. Ignore it,
10915      # but warn the user (except for BASH, which is always set by the calling BASH).
10916      if test "xSORT" != xBASH; then
10917        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10918$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10919      fi
10920      # Try to locate tool using the code snippet
10921      for ac_prog in sort
10922do
10923  # Extract the first word of "$ac_prog", so it can be a program name with args.
10924set dummy $ac_prog; ac_word=$2
10925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10926$as_echo_n "checking for $ac_word... " >&6; }
10927if ${ac_cv_path_SORT+:} false; then :
10928  $as_echo_n "(cached) " >&6
10929else
10930  case $SORT in
10931  [\\/]* | ?:[\\/]*)
10932  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10933  ;;
10934  *)
10935  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10936for as_dir in $PATH
10937do
10938  IFS=$as_save_IFS
10939  test -z "$as_dir" && as_dir=.
10940    for ac_exec_ext in '' $ac_executable_extensions; do
10941  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10942    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10943    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10944    break 2
10945  fi
10946done
10947  done
10948IFS=$as_save_IFS
10949
10950  ;;
10951esac
10952fi
10953SORT=$ac_cv_path_SORT
10954if test -n "$SORT"; then
10955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10956$as_echo "$SORT" >&6; }
10957else
10958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10959$as_echo "no" >&6; }
10960fi
10961
10962
10963  test -n "$SORT" && break
10964done
10965
10966    else
10967      # If it succeeded, then it was overridden by the user. We will use it
10968      # for the tool.
10969
10970      # First remove it from the list of overridden variables, so we can test
10971      # for unknown variables in the end.
10972      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10973
10974      # Check if we try to supply an empty value
10975      if test "x$SORT" = x; then
10976        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
10977$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
10978        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10979$as_echo_n "checking for SORT... " >&6; }
10980        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10981$as_echo "disabled" >&6; }
10982      else
10983        # Check if the provided tool contains a complete path.
10984        tool_specified="$SORT"
10985        tool_basename="${tool_specified##*/}"
10986        if test "x$tool_basename" = "x$tool_specified"; then
10987          # A command without a complete path is provided, search $PATH.
10988          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
10989$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
10990          # Extract the first word of "$tool_basename", so it can be a program name with args.
10991set dummy $tool_basename; ac_word=$2
10992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10993$as_echo_n "checking for $ac_word... " >&6; }
10994if ${ac_cv_path_SORT+:} false; then :
10995  $as_echo_n "(cached) " >&6
10996else
10997  case $SORT in
10998  [\\/]* | ?:[\\/]*)
10999  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11000  ;;
11001  *)
11002  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11003for as_dir in $PATH
11004do
11005  IFS=$as_save_IFS
11006  test -z "$as_dir" && as_dir=.
11007    for ac_exec_ext in '' $ac_executable_extensions; do
11008  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11009    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11010    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11011    break 2
11012  fi
11013done
11014  done
11015IFS=$as_save_IFS
11016
11017  ;;
11018esac
11019fi
11020SORT=$ac_cv_path_SORT
11021if test -n "$SORT"; then
11022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11023$as_echo "$SORT" >&6; }
11024else
11025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11026$as_echo "no" >&6; }
11027fi
11028
11029
11030          if test "x$SORT" = x; then
11031            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11032          fi
11033        else
11034          # Otherwise we believe it is a complete path. Use it as it is.
11035          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
11036$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
11037          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11038$as_echo_n "checking for SORT... " >&6; }
11039          if test ! -x "$tool_specified"; then
11040            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11041$as_echo "not found" >&6; }
11042            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
11043          fi
11044          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11045$as_echo "$tool_specified" >&6; }
11046        fi
11047      fi
11048    fi
11049
11050  fi
11051
11052
11053
11054  if test "x$SORT" = x; then
11055    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
11056  fi
11057
11058
11059
11060
11061
11062  # Publish this variable in the help.
11063
11064
11065  if [ -z "${TAIL+x}" ]; then
11066    # The variable is not set by user, try to locate tool using the code snippet
11067    for ac_prog in tail
11068do
11069  # Extract the first word of "$ac_prog", so it can be a program name with args.
11070set dummy $ac_prog; ac_word=$2
11071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11072$as_echo_n "checking for $ac_word... " >&6; }
11073if ${ac_cv_path_TAIL+:} false; then :
11074  $as_echo_n "(cached) " >&6
11075else
11076  case $TAIL in
11077  [\\/]* | ?:[\\/]*)
11078  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11079  ;;
11080  *)
11081  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11082for as_dir in $PATH
11083do
11084  IFS=$as_save_IFS
11085  test -z "$as_dir" && as_dir=.
11086    for ac_exec_ext in '' $ac_executable_extensions; do
11087  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11088    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11089    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11090    break 2
11091  fi
11092done
11093  done
11094IFS=$as_save_IFS
11095
11096  ;;
11097esac
11098fi
11099TAIL=$ac_cv_path_TAIL
11100if test -n "$TAIL"; then
11101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11102$as_echo "$TAIL" >&6; }
11103else
11104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11105$as_echo "no" >&6; }
11106fi
11107
11108
11109  test -n "$TAIL" && break
11110done
11111
11112  else
11113    # The variable is set, but is it from the command line or the environment?
11114
11115    # Try to remove the string !TAIL! from our list.
11116    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
11117    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11118      # If it failed, the variable was not from the command line. Ignore it,
11119      # but warn the user (except for BASH, which is always set by the calling BASH).
11120      if test "xTAIL" != xBASH; then
11121        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
11122$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
11123      fi
11124      # Try to locate tool using the code snippet
11125      for ac_prog in tail
11126do
11127  # Extract the first word of "$ac_prog", so it can be a program name with args.
11128set dummy $ac_prog; ac_word=$2
11129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11130$as_echo_n "checking for $ac_word... " >&6; }
11131if ${ac_cv_path_TAIL+:} false; then :
11132  $as_echo_n "(cached) " >&6
11133else
11134  case $TAIL in
11135  [\\/]* | ?:[\\/]*)
11136  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11137  ;;
11138  *)
11139  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11140for as_dir in $PATH
11141do
11142  IFS=$as_save_IFS
11143  test -z "$as_dir" && as_dir=.
11144    for ac_exec_ext in '' $ac_executable_extensions; do
11145  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11146    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11147    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11148    break 2
11149  fi
11150done
11151  done
11152IFS=$as_save_IFS
11153
11154  ;;
11155esac
11156fi
11157TAIL=$ac_cv_path_TAIL
11158if test -n "$TAIL"; then
11159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11160$as_echo "$TAIL" >&6; }
11161else
11162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11163$as_echo "no" >&6; }
11164fi
11165
11166
11167  test -n "$TAIL" && break
11168done
11169
11170    else
11171      # If it succeeded, then it was overridden by the user. We will use it
11172      # for the tool.
11173
11174      # First remove it from the list of overridden variables, so we can test
11175      # for unknown variables in the end.
11176      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11177
11178      # Check if we try to supply an empty value
11179      if test "x$TAIL" = x; then
11180        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
11181$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
11182        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11183$as_echo_n "checking for TAIL... " >&6; }
11184        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11185$as_echo "disabled" >&6; }
11186      else
11187        # Check if the provided tool contains a complete path.
11188        tool_specified="$TAIL"
11189        tool_basename="${tool_specified##*/}"
11190        if test "x$tool_basename" = "x$tool_specified"; then
11191          # A command without a complete path is provided, search $PATH.
11192          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
11193$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
11194          # Extract the first word of "$tool_basename", so it can be a program name with args.
11195set dummy $tool_basename; ac_word=$2
11196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11197$as_echo_n "checking for $ac_word... " >&6; }
11198if ${ac_cv_path_TAIL+:} false; then :
11199  $as_echo_n "(cached) " >&6
11200else
11201  case $TAIL in
11202  [\\/]* | ?:[\\/]*)
11203  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11204  ;;
11205  *)
11206  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11207for as_dir in $PATH
11208do
11209  IFS=$as_save_IFS
11210  test -z "$as_dir" && as_dir=.
11211    for ac_exec_ext in '' $ac_executable_extensions; do
11212  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11213    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11214    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11215    break 2
11216  fi
11217done
11218  done
11219IFS=$as_save_IFS
11220
11221  ;;
11222esac
11223fi
11224TAIL=$ac_cv_path_TAIL
11225if test -n "$TAIL"; then
11226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11227$as_echo "$TAIL" >&6; }
11228else
11229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11230$as_echo "no" >&6; }
11231fi
11232
11233
11234          if test "x$TAIL" = x; then
11235            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11236          fi
11237        else
11238          # Otherwise we believe it is a complete path. Use it as it is.
11239          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
11240$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
11241          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11242$as_echo_n "checking for TAIL... " >&6; }
11243          if test ! -x "$tool_specified"; then
11244            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11245$as_echo "not found" >&6; }
11246            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
11247          fi
11248          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11249$as_echo "$tool_specified" >&6; }
11250        fi
11251      fi
11252    fi
11253
11254  fi
11255
11256
11257
11258  if test "x$TAIL" = x; then
11259    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
11260  fi
11261
11262
11263
11264
11265
11266  # Publish this variable in the help.
11267
11268
11269  if [ -z "${TAR+x}" ]; then
11270    # The variable is not set by user, try to locate tool using the code snippet
11271    for ac_prog in gtar tar
11272do
11273  # Extract the first word of "$ac_prog", so it can be a program name with args.
11274set dummy $ac_prog; ac_word=$2
11275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11276$as_echo_n "checking for $ac_word... " >&6; }
11277if ${ac_cv_path_TAR+:} false; then :
11278  $as_echo_n "(cached) " >&6
11279else
11280  case $TAR in
11281  [\\/]* | ?:[\\/]*)
11282  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11283  ;;
11284  *)
11285  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11286for as_dir in $PATH
11287do
11288  IFS=$as_save_IFS
11289  test -z "$as_dir" && as_dir=.
11290    for ac_exec_ext in '' $ac_executable_extensions; do
11291  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11292    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11293    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11294    break 2
11295  fi
11296done
11297  done
11298IFS=$as_save_IFS
11299
11300  ;;
11301esac
11302fi
11303TAR=$ac_cv_path_TAR
11304if test -n "$TAR"; then
11305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11306$as_echo "$TAR" >&6; }
11307else
11308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11309$as_echo "no" >&6; }
11310fi
11311
11312
11313  test -n "$TAR" && break
11314done
11315
11316  else
11317    # The variable is set, but is it from the command line or the environment?
11318
11319    # Try to remove the string !TAR! from our list.
11320    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
11321    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11322      # If it failed, the variable was not from the command line. Ignore it,
11323      # but warn the user (except for BASH, which is always set by the calling BASH).
11324      if test "xTAR" != xBASH; then
11325        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
11326$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
11327      fi
11328      # Try to locate tool using the code snippet
11329      for ac_prog in gtar tar
11330do
11331  # Extract the first word of "$ac_prog", so it can be a program name with args.
11332set dummy $ac_prog; ac_word=$2
11333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11334$as_echo_n "checking for $ac_word... " >&6; }
11335if ${ac_cv_path_TAR+:} false; then :
11336  $as_echo_n "(cached) " >&6
11337else
11338  case $TAR in
11339  [\\/]* | ?:[\\/]*)
11340  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11341  ;;
11342  *)
11343  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11344for as_dir in $PATH
11345do
11346  IFS=$as_save_IFS
11347  test -z "$as_dir" && as_dir=.
11348    for ac_exec_ext in '' $ac_executable_extensions; do
11349  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11350    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11351    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11352    break 2
11353  fi
11354done
11355  done
11356IFS=$as_save_IFS
11357
11358  ;;
11359esac
11360fi
11361TAR=$ac_cv_path_TAR
11362if test -n "$TAR"; then
11363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11364$as_echo "$TAR" >&6; }
11365else
11366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11367$as_echo "no" >&6; }
11368fi
11369
11370
11371  test -n "$TAR" && break
11372done
11373
11374    else
11375      # If it succeeded, then it was overridden by the user. We will use it
11376      # for the tool.
11377
11378      # First remove it from the list of overridden variables, so we can test
11379      # for unknown variables in the end.
11380      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11381
11382      # Check if we try to supply an empty value
11383      if test "x$TAR" = x; then
11384        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
11385$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
11386        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11387$as_echo_n "checking for TAR... " >&6; }
11388        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11389$as_echo "disabled" >&6; }
11390      else
11391        # Check if the provided tool contains a complete path.
11392        tool_specified="$TAR"
11393        tool_basename="${tool_specified##*/}"
11394        if test "x$tool_basename" = "x$tool_specified"; then
11395          # A command without a complete path is provided, search $PATH.
11396          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
11397$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
11398          # Extract the first word of "$tool_basename", so it can be a program name with args.
11399set dummy $tool_basename; ac_word=$2
11400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11401$as_echo_n "checking for $ac_word... " >&6; }
11402if ${ac_cv_path_TAR+:} false; then :
11403  $as_echo_n "(cached) " >&6
11404else
11405  case $TAR in
11406  [\\/]* | ?:[\\/]*)
11407  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11408  ;;
11409  *)
11410  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11411for as_dir in $PATH
11412do
11413  IFS=$as_save_IFS
11414  test -z "$as_dir" && as_dir=.
11415    for ac_exec_ext in '' $ac_executable_extensions; do
11416  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11417    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11418    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11419    break 2
11420  fi
11421done
11422  done
11423IFS=$as_save_IFS
11424
11425  ;;
11426esac
11427fi
11428TAR=$ac_cv_path_TAR
11429if test -n "$TAR"; then
11430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11431$as_echo "$TAR" >&6; }
11432else
11433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11434$as_echo "no" >&6; }
11435fi
11436
11437
11438          if test "x$TAR" = x; then
11439            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11440          fi
11441        else
11442          # Otherwise we believe it is a complete path. Use it as it is.
11443          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11444$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11445          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11446$as_echo_n "checking for TAR... " >&6; }
11447          if test ! -x "$tool_specified"; then
11448            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11449$as_echo "not found" >&6; }
11450            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11451          fi
11452          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11453$as_echo "$tool_specified" >&6; }
11454        fi
11455      fi
11456    fi
11457
11458  fi
11459
11460
11461
11462  if test "x$TAR" = x; then
11463    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11464  fi
11465
11466
11467
11468
11469
11470  # Publish this variable in the help.
11471
11472
11473  if [ -z "${TEE+x}" ]; then
11474    # The variable is not set by user, try to locate tool using the code snippet
11475    for ac_prog in tee
11476do
11477  # Extract the first word of "$ac_prog", so it can be a program name with args.
11478set dummy $ac_prog; ac_word=$2
11479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11480$as_echo_n "checking for $ac_word... " >&6; }
11481if ${ac_cv_path_TEE+:} false; then :
11482  $as_echo_n "(cached) " >&6
11483else
11484  case $TEE in
11485  [\\/]* | ?:[\\/]*)
11486  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11487  ;;
11488  *)
11489  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11490for as_dir in $PATH
11491do
11492  IFS=$as_save_IFS
11493  test -z "$as_dir" && as_dir=.
11494    for ac_exec_ext in '' $ac_executable_extensions; do
11495  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11496    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11497    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11498    break 2
11499  fi
11500done
11501  done
11502IFS=$as_save_IFS
11503
11504  ;;
11505esac
11506fi
11507TEE=$ac_cv_path_TEE
11508if test -n "$TEE"; then
11509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11510$as_echo "$TEE" >&6; }
11511else
11512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11513$as_echo "no" >&6; }
11514fi
11515
11516
11517  test -n "$TEE" && break
11518done
11519
11520  else
11521    # The variable is set, but is it from the command line or the environment?
11522
11523    # Try to remove the string !TEE! from our list.
11524    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11525    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11526      # If it failed, the variable was not from the command line. Ignore it,
11527      # but warn the user (except for BASH, which is always set by the calling BASH).
11528      if test "xTEE" != xBASH; then
11529        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11530$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11531      fi
11532      # Try to locate tool using the code snippet
11533      for ac_prog in tee
11534do
11535  # Extract the first word of "$ac_prog", so it can be a program name with args.
11536set dummy $ac_prog; ac_word=$2
11537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11538$as_echo_n "checking for $ac_word... " >&6; }
11539if ${ac_cv_path_TEE+:} false; then :
11540  $as_echo_n "(cached) " >&6
11541else
11542  case $TEE in
11543  [\\/]* | ?:[\\/]*)
11544  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11545  ;;
11546  *)
11547  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11548for as_dir in $PATH
11549do
11550  IFS=$as_save_IFS
11551  test -z "$as_dir" && as_dir=.
11552    for ac_exec_ext in '' $ac_executable_extensions; do
11553  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11554    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11555    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11556    break 2
11557  fi
11558done
11559  done
11560IFS=$as_save_IFS
11561
11562  ;;
11563esac
11564fi
11565TEE=$ac_cv_path_TEE
11566if test -n "$TEE"; then
11567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11568$as_echo "$TEE" >&6; }
11569else
11570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11571$as_echo "no" >&6; }
11572fi
11573
11574
11575  test -n "$TEE" && break
11576done
11577
11578    else
11579      # If it succeeded, then it was overridden by the user. We will use it
11580      # for the tool.
11581
11582      # First remove it from the list of overridden variables, so we can test
11583      # for unknown variables in the end.
11584      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11585
11586      # Check if we try to supply an empty value
11587      if test "x$TEE" = x; then
11588        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11589$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11590        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11591$as_echo_n "checking for TEE... " >&6; }
11592        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11593$as_echo "disabled" >&6; }
11594      else
11595        # Check if the provided tool contains a complete path.
11596        tool_specified="$TEE"
11597        tool_basename="${tool_specified##*/}"
11598        if test "x$tool_basename" = "x$tool_specified"; then
11599          # A command without a complete path is provided, search $PATH.
11600          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11601$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11602          # Extract the first word of "$tool_basename", so it can be a program name with args.
11603set dummy $tool_basename; ac_word=$2
11604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11605$as_echo_n "checking for $ac_word... " >&6; }
11606if ${ac_cv_path_TEE+:} false; then :
11607  $as_echo_n "(cached) " >&6
11608else
11609  case $TEE in
11610  [\\/]* | ?:[\\/]*)
11611  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11612  ;;
11613  *)
11614  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11615for as_dir in $PATH
11616do
11617  IFS=$as_save_IFS
11618  test -z "$as_dir" && as_dir=.
11619    for ac_exec_ext in '' $ac_executable_extensions; do
11620  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11621    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11622    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11623    break 2
11624  fi
11625done
11626  done
11627IFS=$as_save_IFS
11628
11629  ;;
11630esac
11631fi
11632TEE=$ac_cv_path_TEE
11633if test -n "$TEE"; then
11634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11635$as_echo "$TEE" >&6; }
11636else
11637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11638$as_echo "no" >&6; }
11639fi
11640
11641
11642          if test "x$TEE" = x; then
11643            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11644          fi
11645        else
11646          # Otherwise we believe it is a complete path. Use it as it is.
11647          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11648$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11649          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11650$as_echo_n "checking for TEE... " >&6; }
11651          if test ! -x "$tool_specified"; then
11652            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11653$as_echo "not found" >&6; }
11654            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11655          fi
11656          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11657$as_echo "$tool_specified" >&6; }
11658        fi
11659      fi
11660    fi
11661
11662  fi
11663
11664
11665
11666  if test "x$TEE" = x; then
11667    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11668  fi
11669
11670
11671
11672
11673
11674  # Publish this variable in the help.
11675
11676
11677  if [ -z "${TOUCH+x}" ]; then
11678    # The variable is not set by user, try to locate tool using the code snippet
11679    for ac_prog in touch
11680do
11681  # Extract the first word of "$ac_prog", so it can be a program name with args.
11682set dummy $ac_prog; ac_word=$2
11683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11684$as_echo_n "checking for $ac_word... " >&6; }
11685if ${ac_cv_path_TOUCH+:} false; then :
11686  $as_echo_n "(cached) " >&6
11687else
11688  case $TOUCH in
11689  [\\/]* | ?:[\\/]*)
11690  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11691  ;;
11692  *)
11693  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11694for as_dir in $PATH
11695do
11696  IFS=$as_save_IFS
11697  test -z "$as_dir" && as_dir=.
11698    for ac_exec_ext in '' $ac_executable_extensions; do
11699  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11700    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11701    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11702    break 2
11703  fi
11704done
11705  done
11706IFS=$as_save_IFS
11707
11708  ;;
11709esac
11710fi
11711TOUCH=$ac_cv_path_TOUCH
11712if test -n "$TOUCH"; then
11713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11714$as_echo "$TOUCH" >&6; }
11715else
11716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11717$as_echo "no" >&6; }
11718fi
11719
11720
11721  test -n "$TOUCH" && break
11722done
11723
11724  else
11725    # The variable is set, but is it from the command line or the environment?
11726
11727    # Try to remove the string !TOUCH! from our list.
11728    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11729    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11730      # If it failed, the variable was not from the command line. Ignore it,
11731      # but warn the user (except for BASH, which is always set by the calling BASH).
11732      if test "xTOUCH" != xBASH; then
11733        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11734$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11735      fi
11736      # Try to locate tool using the code snippet
11737      for ac_prog in touch
11738do
11739  # Extract the first word of "$ac_prog", so it can be a program name with args.
11740set dummy $ac_prog; ac_word=$2
11741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11742$as_echo_n "checking for $ac_word... " >&6; }
11743if ${ac_cv_path_TOUCH+:} false; then :
11744  $as_echo_n "(cached) " >&6
11745else
11746  case $TOUCH in
11747  [\\/]* | ?:[\\/]*)
11748  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11749  ;;
11750  *)
11751  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11752for as_dir in $PATH
11753do
11754  IFS=$as_save_IFS
11755  test -z "$as_dir" && as_dir=.
11756    for ac_exec_ext in '' $ac_executable_extensions; do
11757  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11758    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11759    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11760    break 2
11761  fi
11762done
11763  done
11764IFS=$as_save_IFS
11765
11766  ;;
11767esac
11768fi
11769TOUCH=$ac_cv_path_TOUCH
11770if test -n "$TOUCH"; then
11771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11772$as_echo "$TOUCH" >&6; }
11773else
11774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11775$as_echo "no" >&6; }
11776fi
11777
11778
11779  test -n "$TOUCH" && break
11780done
11781
11782    else
11783      # If it succeeded, then it was overridden by the user. We will use it
11784      # for the tool.
11785
11786      # First remove it from the list of overridden variables, so we can test
11787      # for unknown variables in the end.
11788      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11789
11790      # Check if we try to supply an empty value
11791      if test "x$TOUCH" = x; then
11792        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11793$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11794        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11795$as_echo_n "checking for TOUCH... " >&6; }
11796        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11797$as_echo "disabled" >&6; }
11798      else
11799        # Check if the provided tool contains a complete path.
11800        tool_specified="$TOUCH"
11801        tool_basename="${tool_specified##*/}"
11802        if test "x$tool_basename" = "x$tool_specified"; then
11803          # A command without a complete path is provided, search $PATH.
11804          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11805$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11806          # Extract the first word of "$tool_basename", so it can be a program name with args.
11807set dummy $tool_basename; ac_word=$2
11808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11809$as_echo_n "checking for $ac_word... " >&6; }
11810if ${ac_cv_path_TOUCH+:} false; then :
11811  $as_echo_n "(cached) " >&6
11812else
11813  case $TOUCH in
11814  [\\/]* | ?:[\\/]*)
11815  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11816  ;;
11817  *)
11818  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11819for as_dir in $PATH
11820do
11821  IFS=$as_save_IFS
11822  test -z "$as_dir" && as_dir=.
11823    for ac_exec_ext in '' $ac_executable_extensions; do
11824  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11825    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11826    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11827    break 2
11828  fi
11829done
11830  done
11831IFS=$as_save_IFS
11832
11833  ;;
11834esac
11835fi
11836TOUCH=$ac_cv_path_TOUCH
11837if test -n "$TOUCH"; then
11838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11839$as_echo "$TOUCH" >&6; }
11840else
11841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11842$as_echo "no" >&6; }
11843fi
11844
11845
11846          if test "x$TOUCH" = x; then
11847            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11848          fi
11849        else
11850          # Otherwise we believe it is a complete path. Use it as it is.
11851          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11852$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11853          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11854$as_echo_n "checking for TOUCH... " >&6; }
11855          if test ! -x "$tool_specified"; then
11856            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11857$as_echo "not found" >&6; }
11858            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11859          fi
11860          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11861$as_echo "$tool_specified" >&6; }
11862        fi
11863      fi
11864    fi
11865
11866  fi
11867
11868
11869
11870  if test "x$TOUCH" = x; then
11871    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11872  fi
11873
11874
11875
11876
11877
11878  # Publish this variable in the help.
11879
11880
11881  if [ -z "${TR+x}" ]; then
11882    # The variable is not set by user, try to locate tool using the code snippet
11883    for ac_prog in tr
11884do
11885  # Extract the first word of "$ac_prog", so it can be a program name with args.
11886set dummy $ac_prog; ac_word=$2
11887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11888$as_echo_n "checking for $ac_word... " >&6; }
11889if ${ac_cv_path_TR+:} false; then :
11890  $as_echo_n "(cached) " >&6
11891else
11892  case $TR in
11893  [\\/]* | ?:[\\/]*)
11894  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11895  ;;
11896  *)
11897  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11898for as_dir in $PATH
11899do
11900  IFS=$as_save_IFS
11901  test -z "$as_dir" && as_dir=.
11902    for ac_exec_ext in '' $ac_executable_extensions; do
11903  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11904    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11905    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11906    break 2
11907  fi
11908done
11909  done
11910IFS=$as_save_IFS
11911
11912  ;;
11913esac
11914fi
11915TR=$ac_cv_path_TR
11916if test -n "$TR"; then
11917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11918$as_echo "$TR" >&6; }
11919else
11920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11921$as_echo "no" >&6; }
11922fi
11923
11924
11925  test -n "$TR" && break
11926done
11927
11928  else
11929    # The variable is set, but is it from the command line or the environment?
11930
11931    # Try to remove the string !TR! from our list.
11932    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11933    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11934      # If it failed, the variable was not from the command line. Ignore it,
11935      # but warn the user (except for BASH, which is always set by the calling BASH).
11936      if test "xTR" != xBASH; then
11937        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11938$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11939      fi
11940      # Try to locate tool using the code snippet
11941      for ac_prog in tr
11942do
11943  # Extract the first word of "$ac_prog", so it can be a program name with args.
11944set dummy $ac_prog; ac_word=$2
11945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11946$as_echo_n "checking for $ac_word... " >&6; }
11947if ${ac_cv_path_TR+:} false; then :
11948  $as_echo_n "(cached) " >&6
11949else
11950  case $TR in
11951  [\\/]* | ?:[\\/]*)
11952  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11953  ;;
11954  *)
11955  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11956for as_dir in $PATH
11957do
11958  IFS=$as_save_IFS
11959  test -z "$as_dir" && as_dir=.
11960    for ac_exec_ext in '' $ac_executable_extensions; do
11961  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11962    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11963    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11964    break 2
11965  fi
11966done
11967  done
11968IFS=$as_save_IFS
11969
11970  ;;
11971esac
11972fi
11973TR=$ac_cv_path_TR
11974if test -n "$TR"; then
11975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11976$as_echo "$TR" >&6; }
11977else
11978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11979$as_echo "no" >&6; }
11980fi
11981
11982
11983  test -n "$TR" && break
11984done
11985
11986    else
11987      # If it succeeded, then it was overridden by the user. We will use it
11988      # for the tool.
11989
11990      # First remove it from the list of overridden variables, so we can test
11991      # for unknown variables in the end.
11992      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11993
11994      # Check if we try to supply an empty value
11995      if test "x$TR" = x; then
11996        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
11997$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
11998        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11999$as_echo_n "checking for TR... " >&6; }
12000        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12001$as_echo "disabled" >&6; }
12002      else
12003        # Check if the provided tool contains a complete path.
12004        tool_specified="$TR"
12005        tool_basename="${tool_specified##*/}"
12006        if test "x$tool_basename" = "x$tool_specified"; then
12007          # A command without a complete path is provided, search $PATH.
12008          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
12009$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
12010          # Extract the first word of "$tool_basename", so it can be a program name with args.
12011set dummy $tool_basename; ac_word=$2
12012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12013$as_echo_n "checking for $ac_word... " >&6; }
12014if ${ac_cv_path_TR+:} false; then :
12015  $as_echo_n "(cached) " >&6
12016else
12017  case $TR in
12018  [\\/]* | ?:[\\/]*)
12019  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12020  ;;
12021  *)
12022  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12023for as_dir in $PATH
12024do
12025  IFS=$as_save_IFS
12026  test -z "$as_dir" && as_dir=.
12027    for ac_exec_ext in '' $ac_executable_extensions; do
12028  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12029    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12030    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12031    break 2
12032  fi
12033done
12034  done
12035IFS=$as_save_IFS
12036
12037  ;;
12038esac
12039fi
12040TR=$ac_cv_path_TR
12041if test -n "$TR"; then
12042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12043$as_echo "$TR" >&6; }
12044else
12045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12046$as_echo "no" >&6; }
12047fi
12048
12049
12050          if test "x$TR" = x; then
12051            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12052          fi
12053        else
12054          # Otherwise we believe it is a complete path. Use it as it is.
12055          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
12056$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
12057          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12058$as_echo_n "checking for TR... " >&6; }
12059          if test ! -x "$tool_specified"; then
12060            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12061$as_echo "not found" >&6; }
12062            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
12063          fi
12064          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12065$as_echo "$tool_specified" >&6; }
12066        fi
12067      fi
12068    fi
12069
12070  fi
12071
12072
12073
12074  if test "x$TR" = x; then
12075    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
12076  fi
12077
12078
12079
12080
12081
12082  # Publish this variable in the help.
12083
12084
12085  if [ -z "${UNAME+x}" ]; then
12086    # The variable is not set by user, try to locate tool using the code snippet
12087    for ac_prog in uname
12088do
12089  # Extract the first word of "$ac_prog", so it can be a program name with args.
12090set dummy $ac_prog; ac_word=$2
12091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12092$as_echo_n "checking for $ac_word... " >&6; }
12093if ${ac_cv_path_UNAME+:} false; then :
12094  $as_echo_n "(cached) " >&6
12095else
12096  case $UNAME in
12097  [\\/]* | ?:[\\/]*)
12098  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12099  ;;
12100  *)
12101  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12102for as_dir in $PATH
12103do
12104  IFS=$as_save_IFS
12105  test -z "$as_dir" && as_dir=.
12106    for ac_exec_ext in '' $ac_executable_extensions; do
12107  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12108    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12109    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12110    break 2
12111  fi
12112done
12113  done
12114IFS=$as_save_IFS
12115
12116  ;;
12117esac
12118fi
12119UNAME=$ac_cv_path_UNAME
12120if test -n "$UNAME"; then
12121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12122$as_echo "$UNAME" >&6; }
12123else
12124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12125$as_echo "no" >&6; }
12126fi
12127
12128
12129  test -n "$UNAME" && break
12130done
12131
12132  else
12133    # The variable is set, but is it from the command line or the environment?
12134
12135    # Try to remove the string !UNAME! from our list.
12136    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
12137    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12138      # If it failed, the variable was not from the command line. Ignore it,
12139      # but warn the user (except for BASH, which is always set by the calling BASH).
12140      if test "xUNAME" != xBASH; then
12141        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
12142$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
12143      fi
12144      # Try to locate tool using the code snippet
12145      for ac_prog in uname
12146do
12147  # Extract the first word of "$ac_prog", so it can be a program name with args.
12148set dummy $ac_prog; ac_word=$2
12149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12150$as_echo_n "checking for $ac_word... " >&6; }
12151if ${ac_cv_path_UNAME+:} false; then :
12152  $as_echo_n "(cached) " >&6
12153else
12154  case $UNAME in
12155  [\\/]* | ?:[\\/]*)
12156  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12157  ;;
12158  *)
12159  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12160for as_dir in $PATH
12161do
12162  IFS=$as_save_IFS
12163  test -z "$as_dir" && as_dir=.
12164    for ac_exec_ext in '' $ac_executable_extensions; do
12165  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12166    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12167    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12168    break 2
12169  fi
12170done
12171  done
12172IFS=$as_save_IFS
12173
12174  ;;
12175esac
12176fi
12177UNAME=$ac_cv_path_UNAME
12178if test -n "$UNAME"; then
12179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12180$as_echo "$UNAME" >&6; }
12181else
12182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12183$as_echo "no" >&6; }
12184fi
12185
12186
12187  test -n "$UNAME" && break
12188done
12189
12190    else
12191      # If it succeeded, then it was overridden by the user. We will use it
12192      # for the tool.
12193
12194      # First remove it from the list of overridden variables, so we can test
12195      # for unknown variables in the end.
12196      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12197
12198      # Check if we try to supply an empty value
12199      if test "x$UNAME" = x; then
12200        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
12201$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
12202        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12203$as_echo_n "checking for UNAME... " >&6; }
12204        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12205$as_echo "disabled" >&6; }
12206      else
12207        # Check if the provided tool contains a complete path.
12208        tool_specified="$UNAME"
12209        tool_basename="${tool_specified##*/}"
12210        if test "x$tool_basename" = "x$tool_specified"; then
12211          # A command without a complete path is provided, search $PATH.
12212          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
12213$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
12214          # Extract the first word of "$tool_basename", so it can be a program name with args.
12215set dummy $tool_basename; ac_word=$2
12216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12217$as_echo_n "checking for $ac_word... " >&6; }
12218if ${ac_cv_path_UNAME+:} false; then :
12219  $as_echo_n "(cached) " >&6
12220else
12221  case $UNAME in
12222  [\\/]* | ?:[\\/]*)
12223  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12224  ;;
12225  *)
12226  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12227for as_dir in $PATH
12228do
12229  IFS=$as_save_IFS
12230  test -z "$as_dir" && as_dir=.
12231    for ac_exec_ext in '' $ac_executable_extensions; do
12232  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12233    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12234    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12235    break 2
12236  fi
12237done
12238  done
12239IFS=$as_save_IFS
12240
12241  ;;
12242esac
12243fi
12244UNAME=$ac_cv_path_UNAME
12245if test -n "$UNAME"; then
12246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12247$as_echo "$UNAME" >&6; }
12248else
12249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12250$as_echo "no" >&6; }
12251fi
12252
12253
12254          if test "x$UNAME" = x; then
12255            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12256          fi
12257        else
12258          # Otherwise we believe it is a complete path. Use it as it is.
12259          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
12260$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
12261          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12262$as_echo_n "checking for UNAME... " >&6; }
12263          if test ! -x "$tool_specified"; then
12264            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12265$as_echo "not found" >&6; }
12266            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
12267          fi
12268          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12269$as_echo "$tool_specified" >&6; }
12270        fi
12271      fi
12272    fi
12273
12274  fi
12275
12276
12277
12278  if test "x$UNAME" = x; then
12279    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
12280  fi
12281
12282
12283
12284
12285
12286  # Publish this variable in the help.
12287
12288
12289  if [ -z "${UNIQ+x}" ]; then
12290    # The variable is not set by user, try to locate tool using the code snippet
12291    for ac_prog in uniq
12292do
12293  # Extract the first word of "$ac_prog", so it can be a program name with args.
12294set dummy $ac_prog; ac_word=$2
12295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12296$as_echo_n "checking for $ac_word... " >&6; }
12297if ${ac_cv_path_UNIQ+:} false; then :
12298  $as_echo_n "(cached) " >&6
12299else
12300  case $UNIQ in
12301  [\\/]* | ?:[\\/]*)
12302  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12303  ;;
12304  *)
12305  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12306for as_dir in $PATH
12307do
12308  IFS=$as_save_IFS
12309  test -z "$as_dir" && as_dir=.
12310    for ac_exec_ext in '' $ac_executable_extensions; do
12311  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12312    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12313    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12314    break 2
12315  fi
12316done
12317  done
12318IFS=$as_save_IFS
12319
12320  ;;
12321esac
12322fi
12323UNIQ=$ac_cv_path_UNIQ
12324if test -n "$UNIQ"; then
12325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12326$as_echo "$UNIQ" >&6; }
12327else
12328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12329$as_echo "no" >&6; }
12330fi
12331
12332
12333  test -n "$UNIQ" && break
12334done
12335
12336  else
12337    # The variable is set, but is it from the command line or the environment?
12338
12339    # Try to remove the string !UNIQ! from our list.
12340    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
12341    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12342      # If it failed, the variable was not from the command line. Ignore it,
12343      # but warn the user (except for BASH, which is always set by the calling BASH).
12344      if test "xUNIQ" != xBASH; then
12345        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
12346$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
12347      fi
12348      # Try to locate tool using the code snippet
12349      for ac_prog in uniq
12350do
12351  # Extract the first word of "$ac_prog", so it can be a program name with args.
12352set dummy $ac_prog; ac_word=$2
12353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12354$as_echo_n "checking for $ac_word... " >&6; }
12355if ${ac_cv_path_UNIQ+:} false; then :
12356  $as_echo_n "(cached) " >&6
12357else
12358  case $UNIQ in
12359  [\\/]* | ?:[\\/]*)
12360  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12361  ;;
12362  *)
12363  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12364for as_dir in $PATH
12365do
12366  IFS=$as_save_IFS
12367  test -z "$as_dir" && as_dir=.
12368    for ac_exec_ext in '' $ac_executable_extensions; do
12369  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12370    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12371    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12372    break 2
12373  fi
12374done
12375  done
12376IFS=$as_save_IFS
12377
12378  ;;
12379esac
12380fi
12381UNIQ=$ac_cv_path_UNIQ
12382if test -n "$UNIQ"; then
12383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12384$as_echo "$UNIQ" >&6; }
12385else
12386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12387$as_echo "no" >&6; }
12388fi
12389
12390
12391  test -n "$UNIQ" && break
12392done
12393
12394    else
12395      # If it succeeded, then it was overridden by the user. We will use it
12396      # for the tool.
12397
12398      # First remove it from the list of overridden variables, so we can test
12399      # for unknown variables in the end.
12400      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12401
12402      # Check if we try to supply an empty value
12403      if test "x$UNIQ" = x; then
12404        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
12405$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
12406        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12407$as_echo_n "checking for UNIQ... " >&6; }
12408        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12409$as_echo "disabled" >&6; }
12410      else
12411        # Check if the provided tool contains a complete path.
12412        tool_specified="$UNIQ"
12413        tool_basename="${tool_specified##*/}"
12414        if test "x$tool_basename" = "x$tool_specified"; then
12415          # A command without a complete path is provided, search $PATH.
12416          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
12417$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
12418          # Extract the first word of "$tool_basename", so it can be a program name with args.
12419set dummy $tool_basename; ac_word=$2
12420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12421$as_echo_n "checking for $ac_word... " >&6; }
12422if ${ac_cv_path_UNIQ+:} false; then :
12423  $as_echo_n "(cached) " >&6
12424else
12425  case $UNIQ in
12426  [\\/]* | ?:[\\/]*)
12427  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12428  ;;
12429  *)
12430  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12431for as_dir in $PATH
12432do
12433  IFS=$as_save_IFS
12434  test -z "$as_dir" && as_dir=.
12435    for ac_exec_ext in '' $ac_executable_extensions; do
12436  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12437    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12438    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12439    break 2
12440  fi
12441done
12442  done
12443IFS=$as_save_IFS
12444
12445  ;;
12446esac
12447fi
12448UNIQ=$ac_cv_path_UNIQ
12449if test -n "$UNIQ"; then
12450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12451$as_echo "$UNIQ" >&6; }
12452else
12453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12454$as_echo "no" >&6; }
12455fi
12456
12457
12458          if test "x$UNIQ" = x; then
12459            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12460          fi
12461        else
12462          # Otherwise we believe it is a complete path. Use it as it is.
12463          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12464$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12465          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12466$as_echo_n "checking for UNIQ... " >&6; }
12467          if test ! -x "$tool_specified"; then
12468            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12469$as_echo "not found" >&6; }
12470            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12471          fi
12472          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12473$as_echo "$tool_specified" >&6; }
12474        fi
12475      fi
12476    fi
12477
12478  fi
12479
12480
12481
12482  if test "x$UNIQ" = x; then
12483    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12484  fi
12485
12486
12487
12488
12489
12490  # Publish this variable in the help.
12491
12492
12493  if [ -z "${WC+x}" ]; then
12494    # The variable is not set by user, try to locate tool using the code snippet
12495    for ac_prog in wc
12496do
12497  # Extract the first word of "$ac_prog", so it can be a program name with args.
12498set dummy $ac_prog; ac_word=$2
12499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12500$as_echo_n "checking for $ac_word... " >&6; }
12501if ${ac_cv_path_WC+:} false; then :
12502  $as_echo_n "(cached) " >&6
12503else
12504  case $WC in
12505  [\\/]* | ?:[\\/]*)
12506  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12507  ;;
12508  *)
12509  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12510for as_dir in $PATH
12511do
12512  IFS=$as_save_IFS
12513  test -z "$as_dir" && as_dir=.
12514    for ac_exec_ext in '' $ac_executable_extensions; do
12515  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12516    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12517    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12518    break 2
12519  fi
12520done
12521  done
12522IFS=$as_save_IFS
12523
12524  ;;
12525esac
12526fi
12527WC=$ac_cv_path_WC
12528if test -n "$WC"; then
12529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12530$as_echo "$WC" >&6; }
12531else
12532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12533$as_echo "no" >&6; }
12534fi
12535
12536
12537  test -n "$WC" && break
12538done
12539
12540  else
12541    # The variable is set, but is it from the command line or the environment?
12542
12543    # Try to remove the string !WC! from our list.
12544    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12545    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12546      # If it failed, the variable was not from the command line. Ignore it,
12547      # but warn the user (except for BASH, which is always set by the calling BASH).
12548      if test "xWC" != xBASH; then
12549        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12550$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12551      fi
12552      # Try to locate tool using the code snippet
12553      for ac_prog in wc
12554do
12555  # Extract the first word of "$ac_prog", so it can be a program name with args.
12556set dummy $ac_prog; ac_word=$2
12557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12558$as_echo_n "checking for $ac_word... " >&6; }
12559if ${ac_cv_path_WC+:} false; then :
12560  $as_echo_n "(cached) " >&6
12561else
12562  case $WC in
12563  [\\/]* | ?:[\\/]*)
12564  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12565  ;;
12566  *)
12567  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12568for as_dir in $PATH
12569do
12570  IFS=$as_save_IFS
12571  test -z "$as_dir" && as_dir=.
12572    for ac_exec_ext in '' $ac_executable_extensions; do
12573  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12574    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12575    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12576    break 2
12577  fi
12578done
12579  done
12580IFS=$as_save_IFS
12581
12582  ;;
12583esac
12584fi
12585WC=$ac_cv_path_WC
12586if test -n "$WC"; then
12587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12588$as_echo "$WC" >&6; }
12589else
12590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12591$as_echo "no" >&6; }
12592fi
12593
12594
12595  test -n "$WC" && break
12596done
12597
12598    else
12599      # If it succeeded, then it was overridden by the user. We will use it
12600      # for the tool.
12601
12602      # First remove it from the list of overridden variables, so we can test
12603      # for unknown variables in the end.
12604      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12605
12606      # Check if we try to supply an empty value
12607      if test "x$WC" = x; then
12608        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12609$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12610        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12611$as_echo_n "checking for WC... " >&6; }
12612        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12613$as_echo "disabled" >&6; }
12614      else
12615        # Check if the provided tool contains a complete path.
12616        tool_specified="$WC"
12617        tool_basename="${tool_specified##*/}"
12618        if test "x$tool_basename" = "x$tool_specified"; then
12619          # A command without a complete path is provided, search $PATH.
12620          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12621$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12622          # Extract the first word of "$tool_basename", so it can be a program name with args.
12623set dummy $tool_basename; ac_word=$2
12624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12625$as_echo_n "checking for $ac_word... " >&6; }
12626if ${ac_cv_path_WC+:} false; then :
12627  $as_echo_n "(cached) " >&6
12628else
12629  case $WC in
12630  [\\/]* | ?:[\\/]*)
12631  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12632  ;;
12633  *)
12634  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12635for as_dir in $PATH
12636do
12637  IFS=$as_save_IFS
12638  test -z "$as_dir" && as_dir=.
12639    for ac_exec_ext in '' $ac_executable_extensions; do
12640  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12641    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12642    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12643    break 2
12644  fi
12645done
12646  done
12647IFS=$as_save_IFS
12648
12649  ;;
12650esac
12651fi
12652WC=$ac_cv_path_WC
12653if test -n "$WC"; then
12654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12655$as_echo "$WC" >&6; }
12656else
12657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12658$as_echo "no" >&6; }
12659fi
12660
12661
12662          if test "x$WC" = x; then
12663            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12664          fi
12665        else
12666          # Otherwise we believe it is a complete path. Use it as it is.
12667          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12668$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12669          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12670$as_echo_n "checking for WC... " >&6; }
12671          if test ! -x "$tool_specified"; then
12672            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12673$as_echo "not found" >&6; }
12674            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12675          fi
12676          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12677$as_echo "$tool_specified" >&6; }
12678        fi
12679      fi
12680    fi
12681
12682  fi
12683
12684
12685
12686  if test "x$WC" = x; then
12687    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12688  fi
12689
12690
12691
12692
12693
12694  # Publish this variable in the help.
12695
12696
12697  if [ -z "${WHICH+x}" ]; then
12698    # The variable is not set by user, try to locate tool using the code snippet
12699    for ac_prog in which
12700do
12701  # Extract the first word of "$ac_prog", so it can be a program name with args.
12702set dummy $ac_prog; ac_word=$2
12703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12704$as_echo_n "checking for $ac_word... " >&6; }
12705if ${ac_cv_path_WHICH+:} false; then :
12706  $as_echo_n "(cached) " >&6
12707else
12708  case $WHICH in
12709  [\\/]* | ?:[\\/]*)
12710  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12711  ;;
12712  *)
12713  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12714for as_dir in $PATH
12715do
12716  IFS=$as_save_IFS
12717  test -z "$as_dir" && as_dir=.
12718    for ac_exec_ext in '' $ac_executable_extensions; do
12719  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12720    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12721    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12722    break 2
12723  fi
12724done
12725  done
12726IFS=$as_save_IFS
12727
12728  ;;
12729esac
12730fi
12731WHICH=$ac_cv_path_WHICH
12732if test -n "$WHICH"; then
12733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12734$as_echo "$WHICH" >&6; }
12735else
12736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12737$as_echo "no" >&6; }
12738fi
12739
12740
12741  test -n "$WHICH" && break
12742done
12743
12744  else
12745    # The variable is set, but is it from the command line or the environment?
12746
12747    # Try to remove the string !WHICH! from our list.
12748    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12749    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12750      # If it failed, the variable was not from the command line. Ignore it,
12751      # but warn the user (except for BASH, which is always set by the calling BASH).
12752      if test "xWHICH" != xBASH; then
12753        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12754$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12755      fi
12756      # Try to locate tool using the code snippet
12757      for ac_prog in which
12758do
12759  # Extract the first word of "$ac_prog", so it can be a program name with args.
12760set dummy $ac_prog; ac_word=$2
12761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12762$as_echo_n "checking for $ac_word... " >&6; }
12763if ${ac_cv_path_WHICH+:} false; then :
12764  $as_echo_n "(cached) " >&6
12765else
12766  case $WHICH in
12767  [\\/]* | ?:[\\/]*)
12768  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12769  ;;
12770  *)
12771  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12772for as_dir in $PATH
12773do
12774  IFS=$as_save_IFS
12775  test -z "$as_dir" && as_dir=.
12776    for ac_exec_ext in '' $ac_executable_extensions; do
12777  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12778    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12779    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12780    break 2
12781  fi
12782done
12783  done
12784IFS=$as_save_IFS
12785
12786  ;;
12787esac
12788fi
12789WHICH=$ac_cv_path_WHICH
12790if test -n "$WHICH"; then
12791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12792$as_echo "$WHICH" >&6; }
12793else
12794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12795$as_echo "no" >&6; }
12796fi
12797
12798
12799  test -n "$WHICH" && break
12800done
12801
12802    else
12803      # If it succeeded, then it was overridden by the user. We will use it
12804      # for the tool.
12805
12806      # First remove it from the list of overridden variables, so we can test
12807      # for unknown variables in the end.
12808      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12809
12810      # Check if we try to supply an empty value
12811      if test "x$WHICH" = x; then
12812        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12813$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12814        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12815$as_echo_n "checking for WHICH... " >&6; }
12816        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12817$as_echo "disabled" >&6; }
12818      else
12819        # Check if the provided tool contains a complete path.
12820        tool_specified="$WHICH"
12821        tool_basename="${tool_specified##*/}"
12822        if test "x$tool_basename" = "x$tool_specified"; then
12823          # A command without a complete path is provided, search $PATH.
12824          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12825$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12826          # Extract the first word of "$tool_basename", so it can be a program name with args.
12827set dummy $tool_basename; ac_word=$2
12828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12829$as_echo_n "checking for $ac_word... " >&6; }
12830if ${ac_cv_path_WHICH+:} false; then :
12831  $as_echo_n "(cached) " >&6
12832else
12833  case $WHICH in
12834  [\\/]* | ?:[\\/]*)
12835  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12836  ;;
12837  *)
12838  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12839for as_dir in $PATH
12840do
12841  IFS=$as_save_IFS
12842  test -z "$as_dir" && as_dir=.
12843    for ac_exec_ext in '' $ac_executable_extensions; do
12844  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12845    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12846    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12847    break 2
12848  fi
12849done
12850  done
12851IFS=$as_save_IFS
12852
12853  ;;
12854esac
12855fi
12856WHICH=$ac_cv_path_WHICH
12857if test -n "$WHICH"; then
12858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12859$as_echo "$WHICH" >&6; }
12860else
12861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12862$as_echo "no" >&6; }
12863fi
12864
12865
12866          if test "x$WHICH" = x; then
12867            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12868          fi
12869        else
12870          # Otherwise we believe it is a complete path. Use it as it is.
12871          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12872$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12873          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12874$as_echo_n "checking for WHICH... " >&6; }
12875          if test ! -x "$tool_specified"; then
12876            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12877$as_echo "not found" >&6; }
12878            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12879          fi
12880          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12881$as_echo "$tool_specified" >&6; }
12882        fi
12883      fi
12884    fi
12885
12886  fi
12887
12888
12889
12890  if test "x$WHICH" = x; then
12891    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12892  fi
12893
12894
12895
12896
12897
12898  # Publish this variable in the help.
12899
12900
12901  if [ -z "${XARGS+x}" ]; then
12902    # The variable is not set by user, try to locate tool using the code snippet
12903    for ac_prog in xargs
12904do
12905  # Extract the first word of "$ac_prog", so it can be a program name with args.
12906set dummy $ac_prog; ac_word=$2
12907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12908$as_echo_n "checking for $ac_word... " >&6; }
12909if ${ac_cv_path_XARGS+:} false; then :
12910  $as_echo_n "(cached) " >&6
12911else
12912  case $XARGS in
12913  [\\/]* | ?:[\\/]*)
12914  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12915  ;;
12916  *)
12917  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12918for as_dir in $PATH
12919do
12920  IFS=$as_save_IFS
12921  test -z "$as_dir" && as_dir=.
12922    for ac_exec_ext in '' $ac_executable_extensions; do
12923  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12924    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12925    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12926    break 2
12927  fi
12928done
12929  done
12930IFS=$as_save_IFS
12931
12932  ;;
12933esac
12934fi
12935XARGS=$ac_cv_path_XARGS
12936if test -n "$XARGS"; then
12937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12938$as_echo "$XARGS" >&6; }
12939else
12940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12941$as_echo "no" >&6; }
12942fi
12943
12944
12945  test -n "$XARGS" && break
12946done
12947
12948  else
12949    # The variable is set, but is it from the command line or the environment?
12950
12951    # Try to remove the string !XARGS! from our list.
12952    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12953    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12954      # If it failed, the variable was not from the command line. Ignore it,
12955      # but warn the user (except for BASH, which is always set by the calling BASH).
12956      if test "xXARGS" != xBASH; then
12957        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12958$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12959      fi
12960      # Try to locate tool using the code snippet
12961      for ac_prog in xargs
12962do
12963  # Extract the first word of "$ac_prog", so it can be a program name with args.
12964set dummy $ac_prog; ac_word=$2
12965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12966$as_echo_n "checking for $ac_word... " >&6; }
12967if ${ac_cv_path_XARGS+:} false; then :
12968  $as_echo_n "(cached) " >&6
12969else
12970  case $XARGS in
12971  [\\/]* | ?:[\\/]*)
12972  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12973  ;;
12974  *)
12975  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12976for as_dir in $PATH
12977do
12978  IFS=$as_save_IFS
12979  test -z "$as_dir" && as_dir=.
12980    for ac_exec_ext in '' $ac_executable_extensions; do
12981  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12982    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12983    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12984    break 2
12985  fi
12986done
12987  done
12988IFS=$as_save_IFS
12989
12990  ;;
12991esac
12992fi
12993XARGS=$ac_cv_path_XARGS
12994if test -n "$XARGS"; then
12995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12996$as_echo "$XARGS" >&6; }
12997else
12998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12999$as_echo "no" >&6; }
13000fi
13001
13002
13003  test -n "$XARGS" && break
13004done
13005
13006    else
13007      # If it succeeded, then it was overridden by the user. We will use it
13008      # for the tool.
13009
13010      # First remove it from the list of overridden variables, so we can test
13011      # for unknown variables in the end.
13012      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13013
13014      # Check if we try to supply an empty value
13015      if test "x$XARGS" = x; then
13016        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
13017$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
13018        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13019$as_echo_n "checking for XARGS... " >&6; }
13020        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13021$as_echo "disabled" >&6; }
13022      else
13023        # Check if the provided tool contains a complete path.
13024        tool_specified="$XARGS"
13025        tool_basename="${tool_specified##*/}"
13026        if test "x$tool_basename" = "x$tool_specified"; then
13027          # A command without a complete path is provided, search $PATH.
13028          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
13029$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
13030          # Extract the first word of "$tool_basename", so it can be a program name with args.
13031set dummy $tool_basename; ac_word=$2
13032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13033$as_echo_n "checking for $ac_word... " >&6; }
13034if ${ac_cv_path_XARGS+:} false; then :
13035  $as_echo_n "(cached) " >&6
13036else
13037  case $XARGS in
13038  [\\/]* | ?:[\\/]*)
13039  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13040  ;;
13041  *)
13042  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13043for as_dir in $PATH
13044do
13045  IFS=$as_save_IFS
13046  test -z "$as_dir" && as_dir=.
13047    for ac_exec_ext in '' $ac_executable_extensions; do
13048  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13049    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13050    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13051    break 2
13052  fi
13053done
13054  done
13055IFS=$as_save_IFS
13056
13057  ;;
13058esac
13059fi
13060XARGS=$ac_cv_path_XARGS
13061if test -n "$XARGS"; then
13062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13063$as_echo "$XARGS" >&6; }
13064else
13065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13066$as_echo "no" >&6; }
13067fi
13068
13069
13070          if test "x$XARGS" = x; then
13071            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13072          fi
13073        else
13074          # Otherwise we believe it is a complete path. Use it as it is.
13075          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
13076$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
13077          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13078$as_echo_n "checking for XARGS... " >&6; }
13079          if test ! -x "$tool_specified"; then
13080            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13081$as_echo "not found" >&6; }
13082            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
13083          fi
13084          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13085$as_echo "$tool_specified" >&6; }
13086        fi
13087      fi
13088    fi
13089
13090  fi
13091
13092
13093
13094  if test "x$XARGS" = x; then
13095    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
13096  fi
13097
13098
13099
13100  # Then required tools that require some special treatment.
13101
13102
13103  # Publish this variable in the help.
13104
13105
13106  if [ -z "${AWK+x}" ]; then
13107    # The variable is not set by user, try to locate tool using the code snippet
13108    for ac_prog in gawk mawk nawk awk
13109do
13110  # Extract the first word of "$ac_prog", so it can be a program name with args.
13111set dummy $ac_prog; ac_word=$2
13112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13113$as_echo_n "checking for $ac_word... " >&6; }
13114if ${ac_cv_prog_AWK+:} false; then :
13115  $as_echo_n "(cached) " >&6
13116else
13117  if test -n "$AWK"; then
13118  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13119else
13120as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13121for as_dir in $PATH
13122do
13123  IFS=$as_save_IFS
13124  test -z "$as_dir" && as_dir=.
13125    for ac_exec_ext in '' $ac_executable_extensions; do
13126  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13127    ac_cv_prog_AWK="$ac_prog"
13128    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13129    break 2
13130  fi
13131done
13132  done
13133IFS=$as_save_IFS
13134
13135fi
13136fi
13137AWK=$ac_cv_prog_AWK
13138if test -n "$AWK"; then
13139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13140$as_echo "$AWK" >&6; }
13141else
13142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13143$as_echo "no" >&6; }
13144fi
13145
13146
13147  test -n "$AWK" && break
13148done
13149
13150  else
13151    # The variable is set, but is it from the command line or the environment?
13152
13153    # Try to remove the string !AWK! from our list.
13154    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
13155    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13156      # If it failed, the variable was not from the command line. Ignore it,
13157      # but warn the user (except for BASH, which is always set by the calling BASH).
13158      if test "xAWK" != xBASH; then
13159        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
13160$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
13161      fi
13162      # Try to locate tool using the code snippet
13163      for ac_prog in gawk mawk nawk awk
13164do
13165  # Extract the first word of "$ac_prog", so it can be a program name with args.
13166set dummy $ac_prog; ac_word=$2
13167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13168$as_echo_n "checking for $ac_word... " >&6; }
13169if ${ac_cv_prog_AWK+:} false; then :
13170  $as_echo_n "(cached) " >&6
13171else
13172  if test -n "$AWK"; then
13173  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13174else
13175as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13176for as_dir in $PATH
13177do
13178  IFS=$as_save_IFS
13179  test -z "$as_dir" && as_dir=.
13180    for ac_exec_ext in '' $ac_executable_extensions; do
13181  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13182    ac_cv_prog_AWK="$ac_prog"
13183    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13184    break 2
13185  fi
13186done
13187  done
13188IFS=$as_save_IFS
13189
13190fi
13191fi
13192AWK=$ac_cv_prog_AWK
13193if test -n "$AWK"; then
13194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13195$as_echo "$AWK" >&6; }
13196else
13197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13198$as_echo "no" >&6; }
13199fi
13200
13201
13202  test -n "$AWK" && break
13203done
13204
13205    else
13206      # If it succeeded, then it was overridden by the user. We will use it
13207      # for the tool.
13208
13209      # First remove it from the list of overridden variables, so we can test
13210      # for unknown variables in the end.
13211      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13212
13213      # Check if we try to supply an empty value
13214      if test "x$AWK" = x; then
13215        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
13216$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
13217        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13218$as_echo_n "checking for AWK... " >&6; }
13219        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13220$as_echo "disabled" >&6; }
13221      else
13222        # Check if the provided tool contains a complete path.
13223        tool_specified="$AWK"
13224        tool_basename="${tool_specified##*/}"
13225        if test "x$tool_basename" = "x$tool_specified"; then
13226          # A command without a complete path is provided, search $PATH.
13227          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
13228$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
13229          # Extract the first word of "$tool_basename", so it can be a program name with args.
13230set dummy $tool_basename; ac_word=$2
13231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13232$as_echo_n "checking for $ac_word... " >&6; }
13233if ${ac_cv_path_AWK+:} false; then :
13234  $as_echo_n "(cached) " >&6
13235else
13236  case $AWK in
13237  [\\/]* | ?:[\\/]*)
13238  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
13239  ;;
13240  *)
13241  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13242for as_dir in $PATH
13243do
13244  IFS=$as_save_IFS
13245  test -z "$as_dir" && as_dir=.
13246    for ac_exec_ext in '' $ac_executable_extensions; do
13247  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13248    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
13249    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13250    break 2
13251  fi
13252done
13253  done
13254IFS=$as_save_IFS
13255
13256  ;;
13257esac
13258fi
13259AWK=$ac_cv_path_AWK
13260if test -n "$AWK"; then
13261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13262$as_echo "$AWK" >&6; }
13263else
13264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13265$as_echo "no" >&6; }
13266fi
13267
13268
13269          if test "x$AWK" = x; then
13270            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13271          fi
13272        else
13273          # Otherwise we believe it is a complete path. Use it as it is.
13274          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
13275$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
13276          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13277$as_echo_n "checking for AWK... " >&6; }
13278          if test ! -x "$tool_specified"; then
13279            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13280$as_echo "not found" >&6; }
13281            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
13282          fi
13283          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13284$as_echo "$tool_specified" >&6; }
13285        fi
13286      fi
13287    fi
13288
13289  fi
13290
13291
13292  if test "x$AWK" = x; then
13293    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
13294  fi
13295
13296
13297
13298
13299  # Publish this variable in the help.
13300
13301
13302  if [ -z "${GREP+x}" ]; then
13303    # The variable is not set by user, try to locate tool using the code snippet
13304    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13305$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13306if ${ac_cv_path_GREP+:} false; then :
13307  $as_echo_n "(cached) " >&6
13308else
13309  if test -z "$GREP"; then
13310  ac_path_GREP_found=false
13311  # Loop through the user's path and test for each of PROGNAME-LIST
13312  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13313for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13314do
13315  IFS=$as_save_IFS
13316  test -z "$as_dir" && as_dir=.
13317    for ac_prog in grep ggrep; do
13318    for ac_exec_ext in '' $ac_executable_extensions; do
13319      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13320      as_fn_executable_p "$ac_path_GREP" || continue
13321# Check for GNU ac_path_GREP and select it if it is found.
13322  # Check for GNU $ac_path_GREP
13323case `"$ac_path_GREP" --version 2>&1` in
13324*GNU*)
13325  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13326*)
13327  ac_count=0
13328  $as_echo_n 0123456789 >"conftest.in"
13329  while :
13330  do
13331    cat "conftest.in" "conftest.in" >"conftest.tmp"
13332    mv "conftest.tmp" "conftest.in"
13333    cp "conftest.in" "conftest.nl"
13334    $as_echo 'GREP' >> "conftest.nl"
13335    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13336    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13337    as_fn_arith $ac_count + 1 && ac_count=$as_val
13338    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13339      # Best one so far, save it but keep looking for a better one
13340      ac_cv_path_GREP="$ac_path_GREP"
13341      ac_path_GREP_max=$ac_count
13342    fi
13343    # 10*(2^10) chars as input seems more than enough
13344    test $ac_count -gt 10 && break
13345  done
13346  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13347esac
13348
13349      $ac_path_GREP_found && break 3
13350    done
13351  done
13352  done
13353IFS=$as_save_IFS
13354  if test -z "$ac_cv_path_GREP"; then
13355    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13356  fi
13357else
13358  ac_cv_path_GREP=$GREP
13359fi
13360
13361fi
13362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13363$as_echo "$ac_cv_path_GREP" >&6; }
13364 GREP="$ac_cv_path_GREP"
13365
13366
13367  else
13368    # The variable is set, but is it from the command line or the environment?
13369
13370    # Try to remove the string !GREP! from our list.
13371    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
13372    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13373      # If it failed, the variable was not from the command line. Ignore it,
13374      # but warn the user (except for BASH, which is always set by the calling BASH).
13375      if test "xGREP" != xBASH; then
13376        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
13377$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
13378      fi
13379      # Try to locate tool using the code snippet
13380      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13381$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13382if ${ac_cv_path_GREP+:} false; then :
13383  $as_echo_n "(cached) " >&6
13384else
13385  if test -z "$GREP"; then
13386  ac_path_GREP_found=false
13387  # Loop through the user's path and test for each of PROGNAME-LIST
13388  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13389for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13390do
13391  IFS=$as_save_IFS
13392  test -z "$as_dir" && as_dir=.
13393    for ac_prog in grep ggrep; do
13394    for ac_exec_ext in '' $ac_executable_extensions; do
13395      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13396      as_fn_executable_p "$ac_path_GREP" || continue
13397# Check for GNU ac_path_GREP and select it if it is found.
13398  # Check for GNU $ac_path_GREP
13399case `"$ac_path_GREP" --version 2>&1` in
13400*GNU*)
13401  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13402*)
13403  ac_count=0
13404  $as_echo_n 0123456789 >"conftest.in"
13405  while :
13406  do
13407    cat "conftest.in" "conftest.in" >"conftest.tmp"
13408    mv "conftest.tmp" "conftest.in"
13409    cp "conftest.in" "conftest.nl"
13410    $as_echo 'GREP' >> "conftest.nl"
13411    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13412    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13413    as_fn_arith $ac_count + 1 && ac_count=$as_val
13414    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13415      # Best one so far, save it but keep looking for a better one
13416      ac_cv_path_GREP="$ac_path_GREP"
13417      ac_path_GREP_max=$ac_count
13418    fi
13419    # 10*(2^10) chars as input seems more than enough
13420    test $ac_count -gt 10 && break
13421  done
13422  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13423esac
13424
13425      $ac_path_GREP_found && break 3
13426    done
13427  done
13428  done
13429IFS=$as_save_IFS
13430  if test -z "$ac_cv_path_GREP"; then
13431    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13432  fi
13433else
13434  ac_cv_path_GREP=$GREP
13435fi
13436
13437fi
13438{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13439$as_echo "$ac_cv_path_GREP" >&6; }
13440 GREP="$ac_cv_path_GREP"
13441
13442
13443    else
13444      # If it succeeded, then it was overridden by the user. We will use it
13445      # for the tool.
13446
13447      # First remove it from the list of overridden variables, so we can test
13448      # for unknown variables in the end.
13449      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13450
13451      # Check if we try to supply an empty value
13452      if test "x$GREP" = x; then
13453        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13454$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13455        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13456$as_echo_n "checking for GREP... " >&6; }
13457        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13458$as_echo "disabled" >&6; }
13459      else
13460        # Check if the provided tool contains a complete path.
13461        tool_specified="$GREP"
13462        tool_basename="${tool_specified##*/}"
13463        if test "x$tool_basename" = "x$tool_specified"; then
13464          # A command without a complete path is provided, search $PATH.
13465          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13466$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13467          # Extract the first word of "$tool_basename", so it can be a program name with args.
13468set dummy $tool_basename; ac_word=$2
13469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13470$as_echo_n "checking for $ac_word... " >&6; }
13471if ${ac_cv_path_GREP+:} false; then :
13472  $as_echo_n "(cached) " >&6
13473else
13474  case $GREP in
13475  [\\/]* | ?:[\\/]*)
13476  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13477  ;;
13478  *)
13479  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13480for as_dir in $PATH
13481do
13482  IFS=$as_save_IFS
13483  test -z "$as_dir" && as_dir=.
13484    for ac_exec_ext in '' $ac_executable_extensions; do
13485  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13486    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13487    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13488    break 2
13489  fi
13490done
13491  done
13492IFS=$as_save_IFS
13493
13494  ;;
13495esac
13496fi
13497GREP=$ac_cv_path_GREP
13498if test -n "$GREP"; then
13499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13500$as_echo "$GREP" >&6; }
13501else
13502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13503$as_echo "no" >&6; }
13504fi
13505
13506
13507          if test "x$GREP" = x; then
13508            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13509          fi
13510        else
13511          # Otherwise we believe it is a complete path. Use it as it is.
13512          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13513$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13514          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13515$as_echo_n "checking for GREP... " >&6; }
13516          if test ! -x "$tool_specified"; then
13517            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13518$as_echo "not found" >&6; }
13519            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13520          fi
13521          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13522$as_echo "$tool_specified" >&6; }
13523        fi
13524      fi
13525    fi
13526
13527  fi
13528
13529
13530  if test "x$GREP" = x; then
13531    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13532  fi
13533
13534
13535
13536
13537  # Publish this variable in the help.
13538
13539
13540  if [ -z "${EGREP+x}" ]; then
13541    # The variable is not set by user, try to locate tool using the code snippet
13542    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13543$as_echo_n "checking for egrep... " >&6; }
13544if ${ac_cv_path_EGREP+:} false; then :
13545  $as_echo_n "(cached) " >&6
13546else
13547  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13548   then ac_cv_path_EGREP="$GREP -E"
13549   else
13550     if test -z "$EGREP"; then
13551  ac_path_EGREP_found=false
13552  # Loop through the user's path and test for each of PROGNAME-LIST
13553  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13554for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13555do
13556  IFS=$as_save_IFS
13557  test -z "$as_dir" && as_dir=.
13558    for ac_prog in egrep; do
13559    for ac_exec_ext in '' $ac_executable_extensions; do
13560      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13561      as_fn_executable_p "$ac_path_EGREP" || continue
13562# Check for GNU ac_path_EGREP and select it if it is found.
13563  # Check for GNU $ac_path_EGREP
13564case `"$ac_path_EGREP" --version 2>&1` in
13565*GNU*)
13566  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13567*)
13568  ac_count=0
13569  $as_echo_n 0123456789 >"conftest.in"
13570  while :
13571  do
13572    cat "conftest.in" "conftest.in" >"conftest.tmp"
13573    mv "conftest.tmp" "conftest.in"
13574    cp "conftest.in" "conftest.nl"
13575    $as_echo 'EGREP' >> "conftest.nl"
13576    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13577    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13578    as_fn_arith $ac_count + 1 && ac_count=$as_val
13579    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13580      # Best one so far, save it but keep looking for a better one
13581      ac_cv_path_EGREP="$ac_path_EGREP"
13582      ac_path_EGREP_max=$ac_count
13583    fi
13584    # 10*(2^10) chars as input seems more than enough
13585    test $ac_count -gt 10 && break
13586  done
13587  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13588esac
13589
13590      $ac_path_EGREP_found && break 3
13591    done
13592  done
13593  done
13594IFS=$as_save_IFS
13595  if test -z "$ac_cv_path_EGREP"; then
13596    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13597  fi
13598else
13599  ac_cv_path_EGREP=$EGREP
13600fi
13601
13602   fi
13603fi
13604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13605$as_echo "$ac_cv_path_EGREP" >&6; }
13606 EGREP="$ac_cv_path_EGREP"
13607
13608
13609  else
13610    # The variable is set, but is it from the command line or the environment?
13611
13612    # Try to remove the string !EGREP! from our list.
13613    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13614    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13615      # If it failed, the variable was not from the command line. Ignore it,
13616      # but warn the user (except for BASH, which is always set by the calling BASH).
13617      if test "xEGREP" != xBASH; then
13618        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13619$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13620      fi
13621      # Try to locate tool using the code snippet
13622      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13623$as_echo_n "checking for egrep... " >&6; }
13624if ${ac_cv_path_EGREP+:} false; then :
13625  $as_echo_n "(cached) " >&6
13626else
13627  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13628   then ac_cv_path_EGREP="$GREP -E"
13629   else
13630     if test -z "$EGREP"; then
13631  ac_path_EGREP_found=false
13632  # Loop through the user's path and test for each of PROGNAME-LIST
13633  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13634for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13635do
13636  IFS=$as_save_IFS
13637  test -z "$as_dir" && as_dir=.
13638    for ac_prog in egrep; do
13639    for ac_exec_ext in '' $ac_executable_extensions; do
13640      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13641      as_fn_executable_p "$ac_path_EGREP" || continue
13642# Check for GNU ac_path_EGREP and select it if it is found.
13643  # Check for GNU $ac_path_EGREP
13644case `"$ac_path_EGREP" --version 2>&1` in
13645*GNU*)
13646  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13647*)
13648  ac_count=0
13649  $as_echo_n 0123456789 >"conftest.in"
13650  while :
13651  do
13652    cat "conftest.in" "conftest.in" >"conftest.tmp"
13653    mv "conftest.tmp" "conftest.in"
13654    cp "conftest.in" "conftest.nl"
13655    $as_echo 'EGREP' >> "conftest.nl"
13656    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13657    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13658    as_fn_arith $ac_count + 1 && ac_count=$as_val
13659    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13660      # Best one so far, save it but keep looking for a better one
13661      ac_cv_path_EGREP="$ac_path_EGREP"
13662      ac_path_EGREP_max=$ac_count
13663    fi
13664    # 10*(2^10) chars as input seems more than enough
13665    test $ac_count -gt 10 && break
13666  done
13667  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13668esac
13669
13670      $ac_path_EGREP_found && break 3
13671    done
13672  done
13673  done
13674IFS=$as_save_IFS
13675  if test -z "$ac_cv_path_EGREP"; then
13676    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13677  fi
13678else
13679  ac_cv_path_EGREP=$EGREP
13680fi
13681
13682   fi
13683fi
13684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13685$as_echo "$ac_cv_path_EGREP" >&6; }
13686 EGREP="$ac_cv_path_EGREP"
13687
13688
13689    else
13690      # If it succeeded, then it was overridden by the user. We will use it
13691      # for the tool.
13692
13693      # First remove it from the list of overridden variables, so we can test
13694      # for unknown variables in the end.
13695      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13696
13697      # Check if we try to supply an empty value
13698      if test "x$EGREP" = x; then
13699        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13700$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13701        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13702$as_echo_n "checking for EGREP... " >&6; }
13703        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13704$as_echo "disabled" >&6; }
13705      else
13706        # Check if the provided tool contains a complete path.
13707        tool_specified="$EGREP"
13708        tool_basename="${tool_specified##*/}"
13709        if test "x$tool_basename" = "x$tool_specified"; then
13710          # A command without a complete path is provided, search $PATH.
13711          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13712$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13713          # Extract the first word of "$tool_basename", so it can be a program name with args.
13714set dummy $tool_basename; ac_word=$2
13715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13716$as_echo_n "checking for $ac_word... " >&6; }
13717if ${ac_cv_path_EGREP+:} false; then :
13718  $as_echo_n "(cached) " >&6
13719else
13720  case $EGREP in
13721  [\\/]* | ?:[\\/]*)
13722  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13723  ;;
13724  *)
13725  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13726for as_dir in $PATH
13727do
13728  IFS=$as_save_IFS
13729  test -z "$as_dir" && as_dir=.
13730    for ac_exec_ext in '' $ac_executable_extensions; do
13731  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13732    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13733    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13734    break 2
13735  fi
13736done
13737  done
13738IFS=$as_save_IFS
13739
13740  ;;
13741esac
13742fi
13743EGREP=$ac_cv_path_EGREP
13744if test -n "$EGREP"; then
13745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13746$as_echo "$EGREP" >&6; }
13747else
13748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13749$as_echo "no" >&6; }
13750fi
13751
13752
13753          if test "x$EGREP" = x; then
13754            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13755          fi
13756        else
13757          # Otherwise we believe it is a complete path. Use it as it is.
13758          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13759$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13760          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13761$as_echo_n "checking for EGREP... " >&6; }
13762          if test ! -x "$tool_specified"; then
13763            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13764$as_echo "not found" >&6; }
13765            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13766          fi
13767          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13768$as_echo "$tool_specified" >&6; }
13769        fi
13770      fi
13771    fi
13772
13773  fi
13774
13775
13776  if test "x$EGREP" = x; then
13777    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13778  fi
13779
13780
13781
13782
13783  # Publish this variable in the help.
13784
13785
13786  if [ -z "${FGREP+x}" ]; then
13787    # The variable is not set by user, try to locate tool using the code snippet
13788    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13789$as_echo_n "checking for fgrep... " >&6; }
13790if ${ac_cv_path_FGREP+:} false; then :
13791  $as_echo_n "(cached) " >&6
13792else
13793  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13794   then ac_cv_path_FGREP="$GREP -F"
13795   else
13796     if test -z "$FGREP"; then
13797  ac_path_FGREP_found=false
13798  # Loop through the user's path and test for each of PROGNAME-LIST
13799  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13800for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13801do
13802  IFS=$as_save_IFS
13803  test -z "$as_dir" && as_dir=.
13804    for ac_prog in fgrep; do
13805    for ac_exec_ext in '' $ac_executable_extensions; do
13806      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13807      as_fn_executable_p "$ac_path_FGREP" || continue
13808# Check for GNU ac_path_FGREP and select it if it is found.
13809  # Check for GNU $ac_path_FGREP
13810case `"$ac_path_FGREP" --version 2>&1` in
13811*GNU*)
13812  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13813*)
13814  ac_count=0
13815  $as_echo_n 0123456789 >"conftest.in"
13816  while :
13817  do
13818    cat "conftest.in" "conftest.in" >"conftest.tmp"
13819    mv "conftest.tmp" "conftest.in"
13820    cp "conftest.in" "conftest.nl"
13821    $as_echo 'FGREP' >> "conftest.nl"
13822    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13823    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13824    as_fn_arith $ac_count + 1 && ac_count=$as_val
13825    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13826      # Best one so far, save it but keep looking for a better one
13827      ac_cv_path_FGREP="$ac_path_FGREP"
13828      ac_path_FGREP_max=$ac_count
13829    fi
13830    # 10*(2^10) chars as input seems more than enough
13831    test $ac_count -gt 10 && break
13832  done
13833  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13834esac
13835
13836      $ac_path_FGREP_found && break 3
13837    done
13838  done
13839  done
13840IFS=$as_save_IFS
13841  if test -z "$ac_cv_path_FGREP"; then
13842    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13843  fi
13844else
13845  ac_cv_path_FGREP=$FGREP
13846fi
13847
13848   fi
13849fi
13850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13851$as_echo "$ac_cv_path_FGREP" >&6; }
13852 FGREP="$ac_cv_path_FGREP"
13853
13854
13855  else
13856    # The variable is set, but is it from the command line or the environment?
13857
13858    # Try to remove the string !FGREP! from our list.
13859    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13860    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13861      # If it failed, the variable was not from the command line. Ignore it,
13862      # but warn the user (except for BASH, which is always set by the calling BASH).
13863      if test "xFGREP" != xBASH; then
13864        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13865$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13866      fi
13867      # Try to locate tool using the code snippet
13868      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13869$as_echo_n "checking for fgrep... " >&6; }
13870if ${ac_cv_path_FGREP+:} false; then :
13871  $as_echo_n "(cached) " >&6
13872else
13873  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13874   then ac_cv_path_FGREP="$GREP -F"
13875   else
13876     if test -z "$FGREP"; then
13877  ac_path_FGREP_found=false
13878  # Loop through the user's path and test for each of PROGNAME-LIST
13879  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13880for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13881do
13882  IFS=$as_save_IFS
13883  test -z "$as_dir" && as_dir=.
13884    for ac_prog in fgrep; do
13885    for ac_exec_ext in '' $ac_executable_extensions; do
13886      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13887      as_fn_executable_p "$ac_path_FGREP" || continue
13888# Check for GNU ac_path_FGREP and select it if it is found.
13889  # Check for GNU $ac_path_FGREP
13890case `"$ac_path_FGREP" --version 2>&1` in
13891*GNU*)
13892  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13893*)
13894  ac_count=0
13895  $as_echo_n 0123456789 >"conftest.in"
13896  while :
13897  do
13898    cat "conftest.in" "conftest.in" >"conftest.tmp"
13899    mv "conftest.tmp" "conftest.in"
13900    cp "conftest.in" "conftest.nl"
13901    $as_echo 'FGREP' >> "conftest.nl"
13902    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13903    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13904    as_fn_arith $ac_count + 1 && ac_count=$as_val
13905    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13906      # Best one so far, save it but keep looking for a better one
13907      ac_cv_path_FGREP="$ac_path_FGREP"
13908      ac_path_FGREP_max=$ac_count
13909    fi
13910    # 10*(2^10) chars as input seems more than enough
13911    test $ac_count -gt 10 && break
13912  done
13913  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13914esac
13915
13916      $ac_path_FGREP_found && break 3
13917    done
13918  done
13919  done
13920IFS=$as_save_IFS
13921  if test -z "$ac_cv_path_FGREP"; then
13922    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13923  fi
13924else
13925  ac_cv_path_FGREP=$FGREP
13926fi
13927
13928   fi
13929fi
13930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13931$as_echo "$ac_cv_path_FGREP" >&6; }
13932 FGREP="$ac_cv_path_FGREP"
13933
13934
13935    else
13936      # If it succeeded, then it was overridden by the user. We will use it
13937      # for the tool.
13938
13939      # First remove it from the list of overridden variables, so we can test
13940      # for unknown variables in the end.
13941      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13942
13943      # Check if we try to supply an empty value
13944      if test "x$FGREP" = x; then
13945        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13946$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13947        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13948$as_echo_n "checking for FGREP... " >&6; }
13949        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13950$as_echo "disabled" >&6; }
13951      else
13952        # Check if the provided tool contains a complete path.
13953        tool_specified="$FGREP"
13954        tool_basename="${tool_specified##*/}"
13955        if test "x$tool_basename" = "x$tool_specified"; then
13956          # A command without a complete path is provided, search $PATH.
13957          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13958$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13959          # Extract the first word of "$tool_basename", so it can be a program name with args.
13960set dummy $tool_basename; ac_word=$2
13961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13962$as_echo_n "checking for $ac_word... " >&6; }
13963if ${ac_cv_path_FGREP+:} false; then :
13964  $as_echo_n "(cached) " >&6
13965else
13966  case $FGREP in
13967  [\\/]* | ?:[\\/]*)
13968  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
13969  ;;
13970  *)
13971  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13972for as_dir in $PATH
13973do
13974  IFS=$as_save_IFS
13975  test -z "$as_dir" && as_dir=.
13976    for ac_exec_ext in '' $ac_executable_extensions; do
13977  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13978    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
13979    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13980    break 2
13981  fi
13982done
13983  done
13984IFS=$as_save_IFS
13985
13986  ;;
13987esac
13988fi
13989FGREP=$ac_cv_path_FGREP
13990if test -n "$FGREP"; then
13991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
13992$as_echo "$FGREP" >&6; }
13993else
13994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13995$as_echo "no" >&6; }
13996fi
13997
13998
13999          if test "x$FGREP" = x; then
14000            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14001          fi
14002        else
14003          # Otherwise we believe it is a complete path. Use it as it is.
14004          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
14005$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
14006          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14007$as_echo_n "checking for FGREP... " >&6; }
14008          if test ! -x "$tool_specified"; then
14009            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14010$as_echo "not found" >&6; }
14011            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
14012          fi
14013          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14014$as_echo "$tool_specified" >&6; }
14015        fi
14016      fi
14017    fi
14018
14019  fi
14020
14021
14022  if test "x$FGREP" = x; then
14023    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
14024  fi
14025
14026
14027
14028
14029  # Publish this variable in the help.
14030
14031
14032  if [ -z "${SED+x}" ]; then
14033    # The variable is not set by user, try to locate tool using the code snippet
14034    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14035$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14036if ${ac_cv_path_SED+:} false; then :
14037  $as_echo_n "(cached) " >&6
14038else
14039            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14040     for ac_i in 1 2 3 4 5 6 7; do
14041       ac_script="$ac_script$as_nl$ac_script"
14042     done
14043     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14044     { ac_script=; unset ac_script;}
14045     if test -z "$SED"; then
14046  ac_path_SED_found=false
14047  # Loop through the user's path and test for each of PROGNAME-LIST
14048  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14049for as_dir in $PATH
14050do
14051  IFS=$as_save_IFS
14052  test -z "$as_dir" && as_dir=.
14053    for ac_prog in sed gsed; do
14054    for ac_exec_ext in '' $ac_executable_extensions; do
14055      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14056      as_fn_executable_p "$ac_path_SED" || continue
14057# Check for GNU ac_path_SED and select it if it is found.
14058  # Check for GNU $ac_path_SED
14059case `"$ac_path_SED" --version 2>&1` in
14060*GNU*)
14061  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14062*)
14063  ac_count=0
14064  $as_echo_n 0123456789 >"conftest.in"
14065  while :
14066  do
14067    cat "conftest.in" "conftest.in" >"conftest.tmp"
14068    mv "conftest.tmp" "conftest.in"
14069    cp "conftest.in" "conftest.nl"
14070    $as_echo '' >> "conftest.nl"
14071    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14072    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14073    as_fn_arith $ac_count + 1 && ac_count=$as_val
14074    if test $ac_count -gt ${ac_path_SED_max-0}; then
14075      # Best one so far, save it but keep looking for a better one
14076      ac_cv_path_SED="$ac_path_SED"
14077      ac_path_SED_max=$ac_count
14078    fi
14079    # 10*(2^10) chars as input seems more than enough
14080    test $ac_count -gt 10 && break
14081  done
14082  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14083esac
14084
14085      $ac_path_SED_found && break 3
14086    done
14087  done
14088  done
14089IFS=$as_save_IFS
14090  if test -z "$ac_cv_path_SED"; then
14091    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14092  fi
14093else
14094  ac_cv_path_SED=$SED
14095fi
14096
14097fi
14098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14099$as_echo "$ac_cv_path_SED" >&6; }
14100 SED="$ac_cv_path_SED"
14101  rm -f conftest.sed
14102
14103  else
14104    # The variable is set, but is it from the command line or the environment?
14105
14106    # Try to remove the string !SED! from our list.
14107    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
14108    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14109      # If it failed, the variable was not from the command line. Ignore it,
14110      # but warn the user (except for BASH, which is always set by the calling BASH).
14111      if test "xSED" != xBASH; then
14112        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
14113$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
14114      fi
14115      # Try to locate tool using the code snippet
14116      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14117$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14118if ${ac_cv_path_SED+:} false; then :
14119  $as_echo_n "(cached) " >&6
14120else
14121            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14122     for ac_i in 1 2 3 4 5 6 7; do
14123       ac_script="$ac_script$as_nl$ac_script"
14124     done
14125     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14126     { ac_script=; unset ac_script;}
14127     if test -z "$SED"; then
14128  ac_path_SED_found=false
14129  # Loop through the user's path and test for each of PROGNAME-LIST
14130  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14131for as_dir in $PATH
14132do
14133  IFS=$as_save_IFS
14134  test -z "$as_dir" && as_dir=.
14135    for ac_prog in sed gsed; do
14136    for ac_exec_ext in '' $ac_executable_extensions; do
14137      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14138      as_fn_executable_p "$ac_path_SED" || continue
14139# Check for GNU ac_path_SED and select it if it is found.
14140  # Check for GNU $ac_path_SED
14141case `"$ac_path_SED" --version 2>&1` in
14142*GNU*)
14143  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14144*)
14145  ac_count=0
14146  $as_echo_n 0123456789 >"conftest.in"
14147  while :
14148  do
14149    cat "conftest.in" "conftest.in" >"conftest.tmp"
14150    mv "conftest.tmp" "conftest.in"
14151    cp "conftest.in" "conftest.nl"
14152    $as_echo '' >> "conftest.nl"
14153    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14154    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14155    as_fn_arith $ac_count + 1 && ac_count=$as_val
14156    if test $ac_count -gt ${ac_path_SED_max-0}; then
14157      # Best one so far, save it but keep looking for a better one
14158      ac_cv_path_SED="$ac_path_SED"
14159      ac_path_SED_max=$ac_count
14160    fi
14161    # 10*(2^10) chars as input seems more than enough
14162    test $ac_count -gt 10 && break
14163  done
14164  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14165esac
14166
14167      $ac_path_SED_found && break 3
14168    done
14169  done
14170  done
14171IFS=$as_save_IFS
14172  if test -z "$ac_cv_path_SED"; then
14173    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14174  fi
14175else
14176  ac_cv_path_SED=$SED
14177fi
14178
14179fi
14180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14181$as_echo "$ac_cv_path_SED" >&6; }
14182 SED="$ac_cv_path_SED"
14183  rm -f conftest.sed
14184
14185    else
14186      # If it succeeded, then it was overridden by the user. We will use it
14187      # for the tool.
14188
14189      # First remove it from the list of overridden variables, so we can test
14190      # for unknown variables in the end.
14191      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14192
14193      # Check if we try to supply an empty value
14194      if test "x$SED" = x; then
14195        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
14196$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
14197        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14198$as_echo_n "checking for SED... " >&6; }
14199        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14200$as_echo "disabled" >&6; }
14201      else
14202        # Check if the provided tool contains a complete path.
14203        tool_specified="$SED"
14204        tool_basename="${tool_specified##*/}"
14205        if test "x$tool_basename" = "x$tool_specified"; then
14206          # A command without a complete path is provided, search $PATH.
14207          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
14208$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
14209          # Extract the first word of "$tool_basename", so it can be a program name with args.
14210set dummy $tool_basename; ac_word=$2
14211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14212$as_echo_n "checking for $ac_word... " >&6; }
14213if ${ac_cv_path_SED+:} false; then :
14214  $as_echo_n "(cached) " >&6
14215else
14216  case $SED in
14217  [\\/]* | ?:[\\/]*)
14218  ac_cv_path_SED="$SED" # Let the user override the test with a path.
14219  ;;
14220  *)
14221  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14222for as_dir in $PATH
14223do
14224  IFS=$as_save_IFS
14225  test -z "$as_dir" && as_dir=.
14226    for ac_exec_ext in '' $ac_executable_extensions; do
14227  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14228    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
14229    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14230    break 2
14231  fi
14232done
14233  done
14234IFS=$as_save_IFS
14235
14236  ;;
14237esac
14238fi
14239SED=$ac_cv_path_SED
14240if test -n "$SED"; then
14241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
14242$as_echo "$SED" >&6; }
14243else
14244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14245$as_echo "no" >&6; }
14246fi
14247
14248
14249          if test "x$SED" = x; then
14250            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14251          fi
14252        else
14253          # Otherwise we believe it is a complete path. Use it as it is.
14254          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
14255$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
14256          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14257$as_echo_n "checking for SED... " >&6; }
14258          if test ! -x "$tool_specified"; then
14259            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14260$as_echo "not found" >&6; }
14261            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
14262          fi
14263          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14264$as_echo "$tool_specified" >&6; }
14265        fi
14266      fi
14267    fi
14268
14269  fi
14270
14271
14272  if test "x$SED" = x; then
14273    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
14274  fi
14275
14276
14277
14278  # Always force rm.
14279  RM="$RM -f"
14280
14281  # pwd behaves differently on various platforms and some don't support the -L flag.
14282  # Always use the bash builtin pwd to get uniform behavior.
14283  THEPWDCMD=pwd
14284
14285  # These are not required on all platforms
14286
14287
14288  # Publish this variable in the help.
14289
14290
14291  if [ -z "${CYGPATH+x}" ]; then
14292    # The variable is not set by user, try to locate tool using the code snippet
14293    for ac_prog in cygpath
14294do
14295  # Extract the first word of "$ac_prog", so it can be a program name with args.
14296set dummy $ac_prog; ac_word=$2
14297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14298$as_echo_n "checking for $ac_word... " >&6; }
14299if ${ac_cv_path_CYGPATH+:} false; then :
14300  $as_echo_n "(cached) " >&6
14301else
14302  case $CYGPATH in
14303  [\\/]* | ?:[\\/]*)
14304  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14305  ;;
14306  *)
14307  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14308for as_dir in $PATH
14309do
14310  IFS=$as_save_IFS
14311  test -z "$as_dir" && as_dir=.
14312    for ac_exec_ext in '' $ac_executable_extensions; do
14313  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14314    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14315    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14316    break 2
14317  fi
14318done
14319  done
14320IFS=$as_save_IFS
14321
14322  ;;
14323esac
14324fi
14325CYGPATH=$ac_cv_path_CYGPATH
14326if test -n "$CYGPATH"; then
14327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14328$as_echo "$CYGPATH" >&6; }
14329else
14330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14331$as_echo "no" >&6; }
14332fi
14333
14334
14335  test -n "$CYGPATH" && break
14336done
14337
14338  else
14339    # The variable is set, but is it from the command line or the environment?
14340
14341    # Try to remove the string !CYGPATH! from our list.
14342    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
14343    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14344      # If it failed, the variable was not from the command line. Ignore it,
14345      # but warn the user (except for BASH, which is always set by the calling BASH).
14346      if test "xCYGPATH" != xBASH; then
14347        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
14348$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
14349      fi
14350      # Try to locate tool using the code snippet
14351      for ac_prog in cygpath
14352do
14353  # Extract the first word of "$ac_prog", so it can be a program name with args.
14354set dummy $ac_prog; ac_word=$2
14355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14356$as_echo_n "checking for $ac_word... " >&6; }
14357if ${ac_cv_path_CYGPATH+:} false; then :
14358  $as_echo_n "(cached) " >&6
14359else
14360  case $CYGPATH in
14361  [\\/]* | ?:[\\/]*)
14362  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14363  ;;
14364  *)
14365  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14366for as_dir in $PATH
14367do
14368  IFS=$as_save_IFS
14369  test -z "$as_dir" && as_dir=.
14370    for ac_exec_ext in '' $ac_executable_extensions; do
14371  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14372    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14373    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14374    break 2
14375  fi
14376done
14377  done
14378IFS=$as_save_IFS
14379
14380  ;;
14381esac
14382fi
14383CYGPATH=$ac_cv_path_CYGPATH
14384if test -n "$CYGPATH"; then
14385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14386$as_echo "$CYGPATH" >&6; }
14387else
14388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14389$as_echo "no" >&6; }
14390fi
14391
14392
14393  test -n "$CYGPATH" && break
14394done
14395
14396    else
14397      # If it succeeded, then it was overridden by the user. We will use it
14398      # for the tool.
14399
14400      # First remove it from the list of overridden variables, so we can test
14401      # for unknown variables in the end.
14402      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14403
14404      # Check if we try to supply an empty value
14405      if test "x$CYGPATH" = x; then
14406        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
14407$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
14408        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14409$as_echo_n "checking for CYGPATH... " >&6; }
14410        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14411$as_echo "disabled" >&6; }
14412      else
14413        # Check if the provided tool contains a complete path.
14414        tool_specified="$CYGPATH"
14415        tool_basename="${tool_specified##*/}"
14416        if test "x$tool_basename" = "x$tool_specified"; then
14417          # A command without a complete path is provided, search $PATH.
14418          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
14419$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
14420          # Extract the first word of "$tool_basename", so it can be a program name with args.
14421set dummy $tool_basename; ac_word=$2
14422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14423$as_echo_n "checking for $ac_word... " >&6; }
14424if ${ac_cv_path_CYGPATH+:} false; then :
14425  $as_echo_n "(cached) " >&6
14426else
14427  case $CYGPATH in
14428  [\\/]* | ?:[\\/]*)
14429  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14430  ;;
14431  *)
14432  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14433for as_dir in $PATH
14434do
14435  IFS=$as_save_IFS
14436  test -z "$as_dir" && as_dir=.
14437    for ac_exec_ext in '' $ac_executable_extensions; do
14438  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14439    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14440    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14441    break 2
14442  fi
14443done
14444  done
14445IFS=$as_save_IFS
14446
14447  ;;
14448esac
14449fi
14450CYGPATH=$ac_cv_path_CYGPATH
14451if test -n "$CYGPATH"; then
14452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14453$as_echo "$CYGPATH" >&6; }
14454else
14455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14456$as_echo "no" >&6; }
14457fi
14458
14459
14460          if test "x$CYGPATH" = x; then
14461            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14462          fi
14463        else
14464          # Otherwise we believe it is a complete path. Use it as it is.
14465          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14466$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14467          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14468$as_echo_n "checking for CYGPATH... " >&6; }
14469          if test ! -x "$tool_specified"; then
14470            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14471$as_echo "not found" >&6; }
14472            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14473          fi
14474          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14475$as_echo "$tool_specified" >&6; }
14476        fi
14477      fi
14478    fi
14479
14480  fi
14481
14482
14483
14484
14485  # Publish this variable in the help.
14486
14487
14488  if [ -z "${READLINK+x}" ]; then
14489    # The variable is not set by user, try to locate tool using the code snippet
14490    for ac_prog in greadlink readlink
14491do
14492  # Extract the first word of "$ac_prog", so it can be a program name with args.
14493set dummy $ac_prog; ac_word=$2
14494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14495$as_echo_n "checking for $ac_word... " >&6; }
14496if ${ac_cv_path_READLINK+:} false; then :
14497  $as_echo_n "(cached) " >&6
14498else
14499  case $READLINK in
14500  [\\/]* | ?:[\\/]*)
14501  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14502  ;;
14503  *)
14504  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14505for as_dir in $PATH
14506do
14507  IFS=$as_save_IFS
14508  test -z "$as_dir" && as_dir=.
14509    for ac_exec_ext in '' $ac_executable_extensions; do
14510  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14511    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14512    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14513    break 2
14514  fi
14515done
14516  done
14517IFS=$as_save_IFS
14518
14519  ;;
14520esac
14521fi
14522READLINK=$ac_cv_path_READLINK
14523if test -n "$READLINK"; then
14524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14525$as_echo "$READLINK" >&6; }
14526else
14527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14528$as_echo "no" >&6; }
14529fi
14530
14531
14532  test -n "$READLINK" && break
14533done
14534
14535  else
14536    # The variable is set, but is it from the command line or the environment?
14537
14538    # Try to remove the string !READLINK! from our list.
14539    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14540    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14541      # If it failed, the variable was not from the command line. Ignore it,
14542      # but warn the user (except for BASH, which is always set by the calling BASH).
14543      if test "xREADLINK" != xBASH; then
14544        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14545$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14546      fi
14547      # Try to locate tool using the code snippet
14548      for ac_prog in greadlink readlink
14549do
14550  # Extract the first word of "$ac_prog", so it can be a program name with args.
14551set dummy $ac_prog; ac_word=$2
14552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14553$as_echo_n "checking for $ac_word... " >&6; }
14554if ${ac_cv_path_READLINK+:} false; then :
14555  $as_echo_n "(cached) " >&6
14556else
14557  case $READLINK in
14558  [\\/]* | ?:[\\/]*)
14559  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14560  ;;
14561  *)
14562  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14563for as_dir in $PATH
14564do
14565  IFS=$as_save_IFS
14566  test -z "$as_dir" && as_dir=.
14567    for ac_exec_ext in '' $ac_executable_extensions; do
14568  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14569    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14570    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14571    break 2
14572  fi
14573done
14574  done
14575IFS=$as_save_IFS
14576
14577  ;;
14578esac
14579fi
14580READLINK=$ac_cv_path_READLINK
14581if test -n "$READLINK"; then
14582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14583$as_echo "$READLINK" >&6; }
14584else
14585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14586$as_echo "no" >&6; }
14587fi
14588
14589
14590  test -n "$READLINK" && break
14591done
14592
14593    else
14594      # If it succeeded, then it was overridden by the user. We will use it
14595      # for the tool.
14596
14597      # First remove it from the list of overridden variables, so we can test
14598      # for unknown variables in the end.
14599      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14600
14601      # Check if we try to supply an empty value
14602      if test "x$READLINK" = x; then
14603        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14604$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14605        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14606$as_echo_n "checking for READLINK... " >&6; }
14607        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14608$as_echo "disabled" >&6; }
14609      else
14610        # Check if the provided tool contains a complete path.
14611        tool_specified="$READLINK"
14612        tool_basename="${tool_specified##*/}"
14613        if test "x$tool_basename" = "x$tool_specified"; then
14614          # A command without a complete path is provided, search $PATH.
14615          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14616$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14617          # Extract the first word of "$tool_basename", so it can be a program name with args.
14618set dummy $tool_basename; ac_word=$2
14619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14620$as_echo_n "checking for $ac_word... " >&6; }
14621if ${ac_cv_path_READLINK+:} false; then :
14622  $as_echo_n "(cached) " >&6
14623else
14624  case $READLINK in
14625  [\\/]* | ?:[\\/]*)
14626  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14627  ;;
14628  *)
14629  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14630for as_dir in $PATH
14631do
14632  IFS=$as_save_IFS
14633  test -z "$as_dir" && as_dir=.
14634    for ac_exec_ext in '' $ac_executable_extensions; do
14635  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14636    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14637    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14638    break 2
14639  fi
14640done
14641  done
14642IFS=$as_save_IFS
14643
14644  ;;
14645esac
14646fi
14647READLINK=$ac_cv_path_READLINK
14648if test -n "$READLINK"; then
14649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14650$as_echo "$READLINK" >&6; }
14651else
14652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14653$as_echo "no" >&6; }
14654fi
14655
14656
14657          if test "x$READLINK" = x; then
14658            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14659          fi
14660        else
14661          # Otherwise we believe it is a complete path. Use it as it is.
14662          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14663$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14664          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14665$as_echo_n "checking for READLINK... " >&6; }
14666          if test ! -x "$tool_specified"; then
14667            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14668$as_echo "not found" >&6; }
14669            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14670          fi
14671          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14672$as_echo "$tool_specified" >&6; }
14673        fi
14674      fi
14675    fi
14676
14677  fi
14678
14679
14680
14681
14682  # Publish this variable in the help.
14683
14684
14685  if [ -z "${DF+x}" ]; then
14686    # The variable is not set by user, try to locate tool using the code snippet
14687    for ac_prog in df
14688do
14689  # Extract the first word of "$ac_prog", so it can be a program name with args.
14690set dummy $ac_prog; ac_word=$2
14691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14692$as_echo_n "checking for $ac_word... " >&6; }
14693if ${ac_cv_path_DF+:} false; then :
14694  $as_echo_n "(cached) " >&6
14695else
14696  case $DF in
14697  [\\/]* | ?:[\\/]*)
14698  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14699  ;;
14700  *)
14701  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14702for as_dir in $PATH
14703do
14704  IFS=$as_save_IFS
14705  test -z "$as_dir" && as_dir=.
14706    for ac_exec_ext in '' $ac_executable_extensions; do
14707  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14708    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14709    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14710    break 2
14711  fi
14712done
14713  done
14714IFS=$as_save_IFS
14715
14716  ;;
14717esac
14718fi
14719DF=$ac_cv_path_DF
14720if test -n "$DF"; then
14721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14722$as_echo "$DF" >&6; }
14723else
14724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14725$as_echo "no" >&6; }
14726fi
14727
14728
14729  test -n "$DF" && break
14730done
14731
14732  else
14733    # The variable is set, but is it from the command line or the environment?
14734
14735    # Try to remove the string !DF! from our list.
14736    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14737    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14738      # If it failed, the variable was not from the command line. Ignore it,
14739      # but warn the user (except for BASH, which is always set by the calling BASH).
14740      if test "xDF" != xBASH; then
14741        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14742$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14743      fi
14744      # Try to locate tool using the code snippet
14745      for ac_prog in df
14746do
14747  # Extract the first word of "$ac_prog", so it can be a program name with args.
14748set dummy $ac_prog; ac_word=$2
14749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14750$as_echo_n "checking for $ac_word... " >&6; }
14751if ${ac_cv_path_DF+:} false; then :
14752  $as_echo_n "(cached) " >&6
14753else
14754  case $DF in
14755  [\\/]* | ?:[\\/]*)
14756  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14757  ;;
14758  *)
14759  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14760for as_dir in $PATH
14761do
14762  IFS=$as_save_IFS
14763  test -z "$as_dir" && as_dir=.
14764    for ac_exec_ext in '' $ac_executable_extensions; do
14765  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14766    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14767    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14768    break 2
14769  fi
14770done
14771  done
14772IFS=$as_save_IFS
14773
14774  ;;
14775esac
14776fi
14777DF=$ac_cv_path_DF
14778if test -n "$DF"; then
14779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14780$as_echo "$DF" >&6; }
14781else
14782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14783$as_echo "no" >&6; }
14784fi
14785
14786
14787  test -n "$DF" && break
14788done
14789
14790    else
14791      # If it succeeded, then it was overridden by the user. We will use it
14792      # for the tool.
14793
14794      # First remove it from the list of overridden variables, so we can test
14795      # for unknown variables in the end.
14796      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14797
14798      # Check if we try to supply an empty value
14799      if test "x$DF" = x; then
14800        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14801$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14802        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14803$as_echo_n "checking for DF... " >&6; }
14804        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14805$as_echo "disabled" >&6; }
14806      else
14807        # Check if the provided tool contains a complete path.
14808        tool_specified="$DF"
14809        tool_basename="${tool_specified##*/}"
14810        if test "x$tool_basename" = "x$tool_specified"; then
14811          # A command without a complete path is provided, search $PATH.
14812          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14813$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14814          # Extract the first word of "$tool_basename", so it can be a program name with args.
14815set dummy $tool_basename; ac_word=$2
14816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14817$as_echo_n "checking for $ac_word... " >&6; }
14818if ${ac_cv_path_DF+:} false; then :
14819  $as_echo_n "(cached) " >&6
14820else
14821  case $DF in
14822  [\\/]* | ?:[\\/]*)
14823  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14824  ;;
14825  *)
14826  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14827for as_dir in $PATH
14828do
14829  IFS=$as_save_IFS
14830  test -z "$as_dir" && as_dir=.
14831    for ac_exec_ext in '' $ac_executable_extensions; do
14832  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14833    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14834    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14835    break 2
14836  fi
14837done
14838  done
14839IFS=$as_save_IFS
14840
14841  ;;
14842esac
14843fi
14844DF=$ac_cv_path_DF
14845if test -n "$DF"; then
14846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14847$as_echo "$DF" >&6; }
14848else
14849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14850$as_echo "no" >&6; }
14851fi
14852
14853
14854          if test "x$DF" = x; then
14855            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14856          fi
14857        else
14858          # Otherwise we believe it is a complete path. Use it as it is.
14859          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14860$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14861          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14862$as_echo_n "checking for DF... " >&6; }
14863          if test ! -x "$tool_specified"; then
14864            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14865$as_echo "not found" >&6; }
14866            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14867          fi
14868          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14869$as_echo "$tool_specified" >&6; }
14870        fi
14871      fi
14872    fi
14873
14874  fi
14875
14876
14877
14878
14879  # Publish this variable in the help.
14880
14881
14882  if [ -z "${CPIO+x}" ]; then
14883    # The variable is not set by user, try to locate tool using the code snippet
14884    for ac_prog in cpio bsdcpio
14885do
14886  # Extract the first word of "$ac_prog", so it can be a program name with args.
14887set dummy $ac_prog; ac_word=$2
14888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14889$as_echo_n "checking for $ac_word... " >&6; }
14890if ${ac_cv_path_CPIO+:} false; then :
14891  $as_echo_n "(cached) " >&6
14892else
14893  case $CPIO in
14894  [\\/]* | ?:[\\/]*)
14895  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14896  ;;
14897  *)
14898  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14899for as_dir in $PATH
14900do
14901  IFS=$as_save_IFS
14902  test -z "$as_dir" && as_dir=.
14903    for ac_exec_ext in '' $ac_executable_extensions; do
14904  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14905    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14906    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14907    break 2
14908  fi
14909done
14910  done
14911IFS=$as_save_IFS
14912
14913  ;;
14914esac
14915fi
14916CPIO=$ac_cv_path_CPIO
14917if test -n "$CPIO"; then
14918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14919$as_echo "$CPIO" >&6; }
14920else
14921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14922$as_echo "no" >&6; }
14923fi
14924
14925
14926  test -n "$CPIO" && break
14927done
14928
14929  else
14930    # The variable is set, but is it from the command line or the environment?
14931
14932    # Try to remove the string !CPIO! from our list.
14933    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14934    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14935      # If it failed, the variable was not from the command line. Ignore it,
14936      # but warn the user (except for BASH, which is always set by the calling BASH).
14937      if test "xCPIO" != xBASH; then
14938        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14939$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14940      fi
14941      # Try to locate tool using the code snippet
14942      for ac_prog in cpio bsdcpio
14943do
14944  # Extract the first word of "$ac_prog", so it can be a program name with args.
14945set dummy $ac_prog; ac_word=$2
14946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14947$as_echo_n "checking for $ac_word... " >&6; }
14948if ${ac_cv_path_CPIO+:} false; then :
14949  $as_echo_n "(cached) " >&6
14950else
14951  case $CPIO in
14952  [\\/]* | ?:[\\/]*)
14953  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14954  ;;
14955  *)
14956  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14957for as_dir in $PATH
14958do
14959  IFS=$as_save_IFS
14960  test -z "$as_dir" && as_dir=.
14961    for ac_exec_ext in '' $ac_executable_extensions; do
14962  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14963    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14964    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14965    break 2
14966  fi
14967done
14968  done
14969IFS=$as_save_IFS
14970
14971  ;;
14972esac
14973fi
14974CPIO=$ac_cv_path_CPIO
14975if test -n "$CPIO"; then
14976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14977$as_echo "$CPIO" >&6; }
14978else
14979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14980$as_echo "no" >&6; }
14981fi
14982
14983
14984  test -n "$CPIO" && break
14985done
14986
14987    else
14988      # If it succeeded, then it was overridden by the user. We will use it
14989      # for the tool.
14990
14991      # First remove it from the list of overridden variables, so we can test
14992      # for unknown variables in the end.
14993      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14994
14995      # Check if we try to supply an empty value
14996      if test "x$CPIO" = x; then
14997        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
14998$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
14999        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15000$as_echo_n "checking for CPIO... " >&6; }
15001        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15002$as_echo "disabled" >&6; }
15003      else
15004        # Check if the provided tool contains a complete path.
15005        tool_specified="$CPIO"
15006        tool_basename="${tool_specified##*/}"
15007        if test "x$tool_basename" = "x$tool_specified"; then
15008          # A command without a complete path is provided, search $PATH.
15009          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
15010$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
15011          # Extract the first word of "$tool_basename", so it can be a program name with args.
15012set dummy $tool_basename; ac_word=$2
15013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15014$as_echo_n "checking for $ac_word... " >&6; }
15015if ${ac_cv_path_CPIO+:} false; then :
15016  $as_echo_n "(cached) " >&6
15017else
15018  case $CPIO in
15019  [\\/]* | ?:[\\/]*)
15020  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15021  ;;
15022  *)
15023  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15024for as_dir in $PATH
15025do
15026  IFS=$as_save_IFS
15027  test -z "$as_dir" && as_dir=.
15028    for ac_exec_ext in '' $ac_executable_extensions; do
15029  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15030    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15031    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15032    break 2
15033  fi
15034done
15035  done
15036IFS=$as_save_IFS
15037
15038  ;;
15039esac
15040fi
15041CPIO=$ac_cv_path_CPIO
15042if test -n "$CPIO"; then
15043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15044$as_echo "$CPIO" >&6; }
15045else
15046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15047$as_echo "no" >&6; }
15048fi
15049
15050
15051          if test "x$CPIO" = x; then
15052            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15053          fi
15054        else
15055          # Otherwise we believe it is a complete path. Use it as it is.
15056          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
15057$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
15058          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15059$as_echo_n "checking for CPIO... " >&6; }
15060          if test ! -x "$tool_specified"; then
15061            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15062$as_echo "not found" >&6; }
15063            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
15064          fi
15065          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15066$as_echo "$tool_specified" >&6; }
15067        fi
15068      fi
15069    fi
15070
15071  fi
15072
15073
15074
15075
15076  # Publish this variable in the help.
15077
15078
15079  if [ -z "${NICE+x}" ]; then
15080    # The variable is not set by user, try to locate tool using the code snippet
15081    for ac_prog in nice
15082do
15083  # Extract the first word of "$ac_prog", so it can be a program name with args.
15084set dummy $ac_prog; ac_word=$2
15085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15086$as_echo_n "checking for $ac_word... " >&6; }
15087if ${ac_cv_path_NICE+:} false; then :
15088  $as_echo_n "(cached) " >&6
15089else
15090  case $NICE in
15091  [\\/]* | ?:[\\/]*)
15092  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15093  ;;
15094  *)
15095  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15096for as_dir in $PATH
15097do
15098  IFS=$as_save_IFS
15099  test -z "$as_dir" && as_dir=.
15100    for ac_exec_ext in '' $ac_executable_extensions; do
15101  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15102    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15103    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15104    break 2
15105  fi
15106done
15107  done
15108IFS=$as_save_IFS
15109
15110  ;;
15111esac
15112fi
15113NICE=$ac_cv_path_NICE
15114if test -n "$NICE"; then
15115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15116$as_echo "$NICE" >&6; }
15117else
15118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15119$as_echo "no" >&6; }
15120fi
15121
15122
15123  test -n "$NICE" && break
15124done
15125
15126  else
15127    # The variable is set, but is it from the command line or the environment?
15128
15129    # Try to remove the string !NICE! from our list.
15130    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
15131    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15132      # If it failed, the variable was not from the command line. Ignore it,
15133      # but warn the user (except for BASH, which is always set by the calling BASH).
15134      if test "xNICE" != xBASH; then
15135        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
15136$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
15137      fi
15138      # Try to locate tool using the code snippet
15139      for ac_prog in nice
15140do
15141  # Extract the first word of "$ac_prog", so it can be a program name with args.
15142set dummy $ac_prog; ac_word=$2
15143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15144$as_echo_n "checking for $ac_word... " >&6; }
15145if ${ac_cv_path_NICE+:} false; then :
15146  $as_echo_n "(cached) " >&6
15147else
15148  case $NICE in
15149  [\\/]* | ?:[\\/]*)
15150  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15151  ;;
15152  *)
15153  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15154for as_dir in $PATH
15155do
15156  IFS=$as_save_IFS
15157  test -z "$as_dir" && as_dir=.
15158    for ac_exec_ext in '' $ac_executable_extensions; do
15159  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15160    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15161    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15162    break 2
15163  fi
15164done
15165  done
15166IFS=$as_save_IFS
15167
15168  ;;
15169esac
15170fi
15171NICE=$ac_cv_path_NICE
15172if test -n "$NICE"; then
15173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15174$as_echo "$NICE" >&6; }
15175else
15176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15177$as_echo "no" >&6; }
15178fi
15179
15180
15181  test -n "$NICE" && break
15182done
15183
15184    else
15185      # If it succeeded, then it was overridden by the user. We will use it
15186      # for the tool.
15187
15188      # First remove it from the list of overridden variables, so we can test
15189      # for unknown variables in the end.
15190      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15191
15192      # Check if we try to supply an empty value
15193      if test "x$NICE" = x; then
15194        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
15195$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
15196        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15197$as_echo_n "checking for NICE... " >&6; }
15198        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15199$as_echo "disabled" >&6; }
15200      else
15201        # Check if the provided tool contains a complete path.
15202        tool_specified="$NICE"
15203        tool_basename="${tool_specified##*/}"
15204        if test "x$tool_basename" = "x$tool_specified"; then
15205          # A command without a complete path is provided, search $PATH.
15206          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
15207$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
15208          # Extract the first word of "$tool_basename", so it can be a program name with args.
15209set dummy $tool_basename; ac_word=$2
15210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15211$as_echo_n "checking for $ac_word... " >&6; }
15212if ${ac_cv_path_NICE+:} false; then :
15213  $as_echo_n "(cached) " >&6
15214else
15215  case $NICE in
15216  [\\/]* | ?:[\\/]*)
15217  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15218  ;;
15219  *)
15220  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15221for as_dir in $PATH
15222do
15223  IFS=$as_save_IFS
15224  test -z "$as_dir" && as_dir=.
15225    for ac_exec_ext in '' $ac_executable_extensions; do
15226  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15227    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15228    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15229    break 2
15230  fi
15231done
15232  done
15233IFS=$as_save_IFS
15234
15235  ;;
15236esac
15237fi
15238NICE=$ac_cv_path_NICE
15239if test -n "$NICE"; then
15240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15241$as_echo "$NICE" >&6; }
15242else
15243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15244$as_echo "no" >&6; }
15245fi
15246
15247
15248          if test "x$NICE" = x; then
15249            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15250          fi
15251        else
15252          # Otherwise we believe it is a complete path. Use it as it is.
15253          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
15254$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
15255          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15256$as_echo_n "checking for NICE... " >&6; }
15257          if test ! -x "$tool_specified"; then
15258            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15259$as_echo "not found" >&6; }
15260            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
15261          fi
15262          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15263$as_echo "$tool_specified" >&6; }
15264        fi
15265      fi
15266    fi
15267
15268  fi
15269
15270
15271
15272
15273# Now we can determine OpenJDK build and target platforms. This is required to
15274# have early on.
15275# Make sure we can run config.sub.
15276$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
15277  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
15278
15279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
15280$as_echo_n "checking build system type... " >&6; }
15281if ${ac_cv_build+:} false; then :
15282  $as_echo_n "(cached) " >&6
15283else
15284  ac_build_alias=$build_alias
15285test "x$ac_build_alias" = x &&
15286  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
15287test "x$ac_build_alias" = x &&
15288  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
15289ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
15290  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
15291
15292fi
15293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
15294$as_echo "$ac_cv_build" >&6; }
15295case $ac_cv_build in
15296*-*-*) ;;
15297*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
15298esac
15299build=$ac_cv_build
15300ac_save_IFS=$IFS; IFS='-'
15301set x $ac_cv_build
15302shift
15303build_cpu=$1
15304build_vendor=$2
15305shift; shift
15306# Remember, the first character of IFS is used to create $*,
15307# except with old shells:
15308build_os=$*
15309IFS=$ac_save_IFS
15310case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
15311
15312
15313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
15314$as_echo_n "checking host system type... " >&6; }
15315if ${ac_cv_host+:} false; then :
15316  $as_echo_n "(cached) " >&6
15317else
15318  if test "x$host_alias" = x; then
15319  ac_cv_host=$ac_cv_build
15320else
15321  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
15322    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
15323fi
15324
15325fi
15326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
15327$as_echo "$ac_cv_host" >&6; }
15328case $ac_cv_host in
15329*-*-*) ;;
15330*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
15331esac
15332host=$ac_cv_host
15333ac_save_IFS=$IFS; IFS='-'
15334set x $ac_cv_host
15335shift
15336host_cpu=$1
15337host_vendor=$2
15338shift; shift
15339# Remember, the first character of IFS is used to create $*,
15340# except with old shells:
15341host_os=$*
15342IFS=$ac_save_IFS
15343case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
15344
15345
15346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
15347$as_echo_n "checking target system type... " >&6; }
15348if ${ac_cv_target+:} false; then :
15349  $as_echo_n "(cached) " >&6
15350else
15351  if test "x$target_alias" = x; then
15352  ac_cv_target=$ac_cv_host
15353else
15354  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
15355    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
15356fi
15357
15358fi
15359{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
15360$as_echo "$ac_cv_target" >&6; }
15361case $ac_cv_target in
15362*-*-*) ;;
15363*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
15364esac
15365target=$ac_cv_target
15366ac_save_IFS=$IFS; IFS='-'
15367set x $ac_cv_target
15368shift
15369target_cpu=$1
15370target_vendor=$2
15371shift; shift
15372# Remember, the first character of IFS is used to create $*,
15373# except with old shells:
15374target_os=$*
15375IFS=$ac_save_IFS
15376case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
15377
15378
15379# The aliases save the names the user supplied, while $host etc.
15380# will get canonicalized.
15381test -n "$target_alias" &&
15382  test "$program_prefix$program_suffix$program_transform_name" = \
15383    NONENONEs,x,x, &&
15384  program_prefix=${target_alias}-
15385
15386  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
15387  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
15388  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
15389  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
15390  # to use the configure naming style.
15391
15392
15393
15394
15395
15396  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
15397  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
15398  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
15399  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
15400  OPENJDK_TARGET_AUTOCONF_NAME="$host"
15401  OPENJDK_BUILD_AUTOCONF_NAME="$build"
15402
15403
15404
15405  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15406
15407  case "$build_os" in
15408    *linux*)
15409      VAR_OS=linux
15410      VAR_OS_TYPE=unix
15411      ;;
15412    *solaris*)
15413      VAR_OS=solaris
15414      VAR_OS_TYPE=unix
15415      ;;
15416    *darwin*)
15417      VAR_OS=macosx
15418      VAR_OS_TYPE=unix
15419      ;;
15420    *bsd*)
15421      VAR_OS=bsd
15422      VAR_OS_TYPE=unix
15423      ;;
15424    *cygwin*)
15425      VAR_OS=windows
15426      VAR_OS_ENV=windows.cygwin
15427      ;;
15428    *mingw*)
15429      VAR_OS=windows
15430      VAR_OS_ENV=windows.msys
15431      ;;
15432    *aix*)
15433      VAR_OS=aix
15434      VAR_OS_TYPE=unix
15435      ;;
15436    *)
15437      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15438      ;;
15439  esac
15440
15441
15442  # First argument is the cpu name from the trip/quad
15443  case "$build_cpu" in
15444    x86_64)
15445      VAR_CPU=x86_64
15446      VAR_CPU_ARCH=x86
15447      VAR_CPU_BITS=64
15448      VAR_CPU_ENDIAN=little
15449      ;;
15450    i?86)
15451      VAR_CPU=x86
15452      VAR_CPU_ARCH=x86
15453      VAR_CPU_BITS=32
15454      VAR_CPU_ENDIAN=little
15455      ;;
15456    arm*)
15457      VAR_CPU=arm
15458      VAR_CPU_ARCH=arm
15459      VAR_CPU_BITS=32
15460      VAR_CPU_ENDIAN=little
15461      ;;
15462    aarch64)
15463      VAR_CPU=aarch64
15464      VAR_CPU_ARCH=aarch64
15465      VAR_CPU_BITS=64
15466      VAR_CPU_ENDIAN=little
15467      ;;
15468    powerpc)
15469      VAR_CPU=ppc
15470      VAR_CPU_ARCH=ppc
15471      VAR_CPU_BITS=32
15472      VAR_CPU_ENDIAN=big
15473      ;;
15474    powerpc64)
15475      VAR_CPU=ppc64
15476      VAR_CPU_ARCH=ppc
15477      VAR_CPU_BITS=64
15478      VAR_CPU_ENDIAN=big
15479      ;;
15480    powerpc64le)
15481      VAR_CPU=ppc64le
15482      VAR_CPU_ARCH=ppc
15483      VAR_CPU_BITS=64
15484      VAR_CPU_ENDIAN=little
15485      ;;
15486    s390)
15487      VAR_CPU=s390
15488      VAR_CPU_ARCH=s390
15489      VAR_CPU_BITS=32
15490      VAR_CPU_ENDIAN=big
15491      ;;
15492    s390x)
15493      VAR_CPU=s390x
15494      VAR_CPU_ARCH=s390
15495      VAR_CPU_BITS=64
15496      VAR_CPU_ENDIAN=big
15497      ;;
15498    sparc)
15499      VAR_CPU=sparc
15500      VAR_CPU_ARCH=sparc
15501      VAR_CPU_BITS=32
15502      VAR_CPU_ENDIAN=big
15503      ;;
15504    sparcv9|sparc64)
15505      VAR_CPU=sparcv9
15506      VAR_CPU_ARCH=sparc
15507      VAR_CPU_BITS=64
15508      VAR_CPU_ENDIAN=big
15509      ;;
15510    *)
15511      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15512      ;;
15513  esac
15514
15515  # ..and setup our own variables. (Do this explicitly to facilitate searching)
15516  OPENJDK_BUILD_OS="$VAR_OS"
15517  if test "x$VAR_OS_TYPE" != x; then
15518    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15519  else
15520    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15521  fi
15522  if test "x$VAR_OS_ENV" != x; then
15523    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15524  else
15525    OPENJDK_BUILD_OS_ENV="$VAR_OS"
15526  fi
15527  OPENJDK_BUILD_CPU="$VAR_CPU"
15528  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15529  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15530  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15531
15532
15533
15534
15535
15536
15537
15538
15539  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15540$as_echo_n "checking openjdk-build os-cpu... " >&6; }
15541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15542$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15543
15544  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15545
15546  case "$host_os" in
15547    *linux*)
15548      VAR_OS=linux
15549      VAR_OS_TYPE=unix
15550      ;;
15551    *solaris*)
15552      VAR_OS=solaris
15553      VAR_OS_TYPE=unix
15554      ;;
15555    *darwin*)
15556      VAR_OS=macosx
15557      VAR_OS_TYPE=unix
15558      ;;
15559    *bsd*)
15560      VAR_OS=bsd
15561      VAR_OS_TYPE=unix
15562      ;;
15563    *cygwin*)
15564      VAR_OS=windows
15565      VAR_OS_ENV=windows.cygwin
15566      ;;
15567    *mingw*)
15568      VAR_OS=windows
15569      VAR_OS_ENV=windows.msys
15570      ;;
15571    *aix*)
15572      VAR_OS=aix
15573      VAR_OS_TYPE=unix
15574      ;;
15575    *)
15576      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15577      ;;
15578  esac
15579
15580
15581  # First argument is the cpu name from the trip/quad
15582  case "$host_cpu" in
15583    x86_64)
15584      VAR_CPU=x86_64
15585      VAR_CPU_ARCH=x86
15586      VAR_CPU_BITS=64
15587      VAR_CPU_ENDIAN=little
15588      ;;
15589    i?86)
15590      VAR_CPU=x86
15591      VAR_CPU_ARCH=x86
15592      VAR_CPU_BITS=32
15593      VAR_CPU_ENDIAN=little
15594      ;;
15595    arm*)
15596      VAR_CPU=arm
15597      VAR_CPU_ARCH=arm
15598      VAR_CPU_BITS=32
15599      VAR_CPU_ENDIAN=little
15600      ;;
15601    aarch64)
15602      VAR_CPU=aarch64
15603      VAR_CPU_ARCH=aarch64
15604      VAR_CPU_BITS=64
15605      VAR_CPU_ENDIAN=little
15606      ;;
15607    powerpc)
15608      VAR_CPU=ppc
15609      VAR_CPU_ARCH=ppc
15610      VAR_CPU_BITS=32
15611      VAR_CPU_ENDIAN=big
15612      ;;
15613    powerpc64)
15614      VAR_CPU=ppc64
15615      VAR_CPU_ARCH=ppc
15616      VAR_CPU_BITS=64
15617      VAR_CPU_ENDIAN=big
15618      ;;
15619    powerpc64le)
15620      VAR_CPU=ppc64le
15621      VAR_CPU_ARCH=ppc
15622      VAR_CPU_BITS=64
15623      VAR_CPU_ENDIAN=little
15624      ;;
15625    s390)
15626      VAR_CPU=s390
15627      VAR_CPU_ARCH=s390
15628      VAR_CPU_BITS=32
15629      VAR_CPU_ENDIAN=big
15630      ;;
15631    s390x)
15632      VAR_CPU=s390x
15633      VAR_CPU_ARCH=s390
15634      VAR_CPU_BITS=64
15635      VAR_CPU_ENDIAN=big
15636      ;;
15637    sparc)
15638      VAR_CPU=sparc
15639      VAR_CPU_ARCH=sparc
15640      VAR_CPU_BITS=32
15641      VAR_CPU_ENDIAN=big
15642      ;;
15643    sparcv9|sparc64)
15644      VAR_CPU=sparcv9
15645      VAR_CPU_ARCH=sparc
15646      VAR_CPU_BITS=64
15647      VAR_CPU_ENDIAN=big
15648      ;;
15649    *)
15650      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15651      ;;
15652  esac
15653
15654  # ... and setup our own variables. (Do this explicitly to facilitate searching)
15655  OPENJDK_TARGET_OS="$VAR_OS"
15656  if test "x$VAR_OS_TYPE" != x; then
15657    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15658  else
15659    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15660  fi
15661  if test "x$VAR_OS_ENV" != x; then
15662    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15663  else
15664    OPENJDK_TARGET_OS_ENV="$VAR_OS"
15665  fi
15666  OPENJDK_TARGET_CPU="$VAR_CPU"
15667  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15668  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15669  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15670
15671
15672
15673
15674
15675
15676
15677
15678  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15679$as_echo_n "checking openjdk-target os-cpu... " >&6; }
15680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15681$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15682
15683
15684
15685# Check whether --with-target-bits was given.
15686if test "${with_target_bits+set}" = set; then :
15687  withval=$with_target_bits;
15688fi
15689
15690
15691  # We have three types of compiles:
15692  # native  == normal compilation, target system == build system
15693  # cross   == traditional cross compilation, target system != build system; special toolchain needed
15694  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15695  #
15696  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15697    # We're doing a proper cross-compilation
15698    COMPILE_TYPE="cross"
15699  else
15700    COMPILE_TYPE="native"
15701  fi
15702
15703  if test "x$with_target_bits" != x; then
15704    if test "x$COMPILE_TYPE" = "xcross"; then
15705      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15706    fi
15707
15708    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15709      # A reduced build is requested
15710      COMPILE_TYPE="reduced"
15711      OPENJDK_TARGET_CPU_BITS=32
15712      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
15713        OPENJDK_TARGET_CPU=x86
15714      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
15715        OPENJDK_TARGET_CPU=sparc
15716      else
15717        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
15718      fi
15719    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15720      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
15721    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
15722      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
15723$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
15724    else
15725      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
15726    fi
15727  fi
15728
15729
15730  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
15731$as_echo_n "checking compilation type... " >&6; }
15732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
15733$as_echo "$COMPILE_TYPE" >&6; }
15734
15735
15736  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
15737    REQUIRED_OS_NAME=SunOS
15738    REQUIRED_OS_VERSION=5.10
15739  fi
15740  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
15741    REQUIRED_OS_NAME=Linux
15742    REQUIRED_OS_VERSION=2.6
15743  fi
15744  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15745    REQUIRED_OS_NAME=Windows
15746    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
15747      REQUIRED_OS_VERSION=5.2
15748    else
15749      REQUIRED_OS_VERSION=5.1
15750    fi
15751  fi
15752  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15753    REQUIRED_OS_NAME=Darwin
15754    REQUIRED_OS_VERSION=11.2
15755  fi
15756  if test "x$OPENJDK_TARGET_OS" = "xaix"; then
15757    REQUIRED_OS_NAME=AIX
15758    REQUIRED_OS_VERSION=7.1
15759  fi
15760
15761
15762
15763
15764
15765
15766  # Also store the legacy naming of the cpu.
15767  # Ie i586 and amd64 instead of x86 and x86_64
15768  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
15769  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15770    OPENJDK_TARGET_CPU_LEGACY="i586"
15771  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15772    # On all platforms except MacOSX replace x86_64 with amd64.
15773    OPENJDK_TARGET_CPU_LEGACY="amd64"
15774  fi
15775
15776
15777  # And the second legacy naming of the cpu.
15778  # Ie i386 and amd64 instead of x86 and x86_64.
15779  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
15780  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15781    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
15782  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15783    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
15784  fi
15785
15786
15787  # This is the name of the cpu (but using i386 and amd64 instead of
15788  # x86 and x86_64, respectively), preceeded by a /, to be used when
15789  # locating libraries. On macosx, it's empty, though.
15790  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
15791  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15792    OPENJDK_TARGET_CPU_LIBDIR=""
15793  fi
15794
15795
15796  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15797  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15798  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
15799  OPENJDK_TARGET_CPU_ISADIR=""
15800  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15801    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15802      OPENJDK_TARGET_CPU_ISADIR="/amd64"
15803    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15804      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
15805    fi
15806  fi
15807
15808
15809  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
15810  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
15811  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
15812    # On linux only, we replace x86 with i386.
15813    OPENJDK_TARGET_CPU_OSARCH="i386"
15814  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15815    # On all platforms except macosx, we replace x86_64 with amd64.
15816    OPENJDK_TARGET_CPU_OSARCH="amd64"
15817  fi
15818
15819
15820  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
15821  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15822    OPENJDK_TARGET_CPU_JLI="i386"
15823  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15824    # On all platforms except macosx, we replace x86_64 with amd64.
15825    OPENJDK_TARGET_CPU_JLI="amd64"
15826  fi
15827  # Now setup the -D flags for building libjli.
15828  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
15829  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15830    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
15831      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
15832    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
15833      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
15834    fi
15835  fi
15836
15837
15838  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15839      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
15840  else
15841      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
15842  fi
15843
15844
15845  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
15846  # Macosx is osx and x86_64 is x64
15847  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15848    OPENJDK_TARGET_OS_BUNDLE="osx"
15849  else
15850    OPENJDK_TARGET_OS_BUNDLE="$OPENJDK_TARGET_OS"
15851  fi
15852  if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15853    OPENJDK_TARGET_CPU_BUNDLE="x64"
15854  else
15855    OPENJDK_TARGET_CPU_BUNDLE="$OPENJDK_TARGET_CPU"
15856  fi
15857  OPENJDK_TARGET_BUNDLE_PLATFORM="${OPENJDK_TARGET_OS_BUNDLE}-${OPENJDK_TARGET_CPU_BUNDLE}"
15858
15859
15860
15861
15862  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15863    A_LP64="LP64:="
15864    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15865    # unpack200.exe
15866    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
15867      OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
15868    fi
15869  fi
15870  LP64=$A_LP64
15871
15872
15873  if test "x$COMPILE_TYPE" = "xcross"; then
15874    # FIXME: ... or should this include reduced builds..?
15875    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
15876  else
15877    DEFINE_CROSS_COMPILE_ARCH=""
15878  fi
15879
15880
15881  # Convert openjdk platform names to hotspot names
15882
15883  HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
15884  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15885    HOTSPOT_TARGET_OS=bsd
15886  fi
15887
15888
15889  HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
15890  if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
15891    HOTSPOT_TARGET_OS_TYPE=posix
15892  fi
15893
15894
15895  HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
15896  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15897    HOTSPOT_TARGET_CPU=x86_32
15898  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15899    HOTSPOT_TARGET_CPU=sparc
15900  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15901    HOTSPOT_TARGET_CPU=ppc_64
15902  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15903    HOTSPOT_TARGET_CPU=ppc_64
15904  fi
15905
15906
15907  # This is identical with OPENJDK_*, but define anyway for consistency.
15908  HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
15909
15910
15911  # Setup HOTSPOT_TARGET_CPU_DEFINE
15912  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15913    HOTSPOT_TARGET_CPU_DEFINE=IA32
15914  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15915    HOTSPOT_TARGET_CPU_DEFINE=AMD64
15916  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15917    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15918  elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15919    HOTSPOT_TARGET_CPU_DEFINE=AARCH64
15920  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15921    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15922  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15923    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15924
15925  # The cpu defines below are for zero, we don't support them directly.
15926  elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
15927    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15928  elif test "x$OPENJDK_TARGET_CPU" = xppc; then
15929    HOTSPOT_TARGET_CPU_DEFINE=PPC32
15930  elif test "x$OPENJDK_TARGET_CPU" = xs390; then
15931    HOTSPOT_TARGET_CPU_DEFINE=S390
15932  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
15933    HOTSPOT_TARGET_CPU_DEFINE=S390
15934  elif test "x$OPENJDK_TARGET_CPU" != x; then
15935    HOTSPOT_TARGET_CPU_DEFINE=$(echo $OPENJDK_TARGET_CPU | tr a-z A-Z)
15936  fi
15937
15938
15939
15940
15941  # Also store the legacy naming of the cpu.
15942  # Ie i586 and amd64 instead of x86 and x86_64
15943  OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
15944  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15945    OPENJDK_BUILD_CPU_LEGACY="i586"
15946  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15947    # On all platforms except MacOSX replace x86_64 with amd64.
15948    OPENJDK_BUILD_CPU_LEGACY="amd64"
15949  fi
15950
15951
15952  # And the second legacy naming of the cpu.
15953  # Ie i386 and amd64 instead of x86 and x86_64.
15954  OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
15955  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15956    OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
15957  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15958    OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
15959  fi
15960
15961
15962  # This is the name of the cpu (but using i386 and amd64 instead of
15963  # x86 and x86_64, respectively), preceeded by a /, to be used when
15964  # locating libraries. On macosx, it's empty, though.
15965  OPENJDK_BUILD_CPU_LIBDIR="/$OPENJDK_BUILD_CPU_LEGACY_LIB"
15966  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
15967    OPENJDK_BUILD_CPU_LIBDIR=""
15968  fi
15969
15970
15971  # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15972  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15973  # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
15974  OPENJDK_BUILD_CPU_ISADIR=""
15975  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
15976    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15977      OPENJDK_BUILD_CPU_ISADIR="/amd64"
15978    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
15979      OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
15980    fi
15981  fi
15982
15983
15984  # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
15985  OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
15986  if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
15987    # On linux only, we replace x86 with i386.
15988    OPENJDK_BUILD_CPU_OSARCH="i386"
15989  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15990    # On all platforms except macosx, we replace x86_64 with amd64.
15991    OPENJDK_BUILD_CPU_OSARCH="amd64"
15992  fi
15993
15994
15995  OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
15996  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15997    OPENJDK_BUILD_CPU_JLI="i386"
15998  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15999    # On all platforms except macosx, we replace x86_64 with amd64.
16000    OPENJDK_BUILD_CPU_JLI="amd64"
16001  fi
16002  # Now setup the -D flags for building libjli.
16003  OPENJDK_BUILD_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_BUILD_CPU_JLI\"'"
16004  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
16005    if test "x$OPENJDK_BUILD_CPU_ARCH" = xsparc; then
16006      OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
16007    elif test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
16008      OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
16009    fi
16010  fi
16011
16012
16013  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16014      OPENJDK_BUILD_OS_EXPORT_DIR=macosx
16015  else
16016      OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
16017  fi
16018
16019
16020  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16021  # Macosx is osx and x86_64 is x64
16022  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16023    OPENJDK_BUILD_OS_BUNDLE="osx"
16024  else
16025    OPENJDK_BUILD_OS_BUNDLE="$OPENJDK_TARGET_OS"
16026  fi
16027  if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16028    OPENJDK_BUILD_CPU_BUNDLE="x64"
16029  else
16030    OPENJDK_BUILD_CPU_BUNDLE="$OPENJDK_BUILD_CPU"
16031  fi
16032  OPENJDK_BUILD_BUNDLE_PLATFORM="${OPENJDK_BUILD_OS_BUNDLE}-${OPENJDK_BUILD_CPU_BUNDLE}"
16033
16034
16035
16036
16037  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
16038    A_LP64="LP64:="
16039    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16040    # unpack200.exe
16041    if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
16042      OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
16043    fi
16044  fi
16045  LP64=$A_LP64
16046
16047
16048  if test "x$COMPILE_TYPE" = "xcross"; then
16049    # FIXME: ... or should this include reduced builds..?
16050    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
16051  else
16052    DEFINE_CROSS_COMPILE_ARCH=""
16053  fi
16054
16055
16056  # Convert openjdk platform names to hotspot names
16057
16058  HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
16059  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16060    HOTSPOT_BUILD_OS=bsd
16061  fi
16062
16063
16064  HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
16065  if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
16066    HOTSPOT_BUILD_OS_TYPE=posix
16067  fi
16068
16069
16070  HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
16071  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16072    HOTSPOT_BUILD_CPU=x86_32
16073  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16074    HOTSPOT_BUILD_CPU=sparc
16075  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16076    HOTSPOT_BUILD_CPU=ppc_64
16077  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16078    HOTSPOT_BUILD_CPU=ppc_64
16079  fi
16080
16081
16082  # This is identical with OPENJDK_*, but define anyway for consistency.
16083  HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
16084
16085
16086  # Setup HOTSPOT_BUILD_CPU_DEFINE
16087  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16088    HOTSPOT_BUILD_CPU_DEFINE=IA32
16089  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16090    HOTSPOT_BUILD_CPU_DEFINE=AMD64
16091  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16092    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16093  elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
16094    HOTSPOT_BUILD_CPU_DEFINE=AARCH64
16095  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16096    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16097  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16098    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16099
16100  # The cpu defines below are for zero, we don't support them directly.
16101  elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
16102    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16103  elif test "x$OPENJDK_BUILD_CPU" = xppc; then
16104    HOTSPOT_BUILD_CPU_DEFINE=PPC32
16105  elif test "x$OPENJDK_BUILD_CPU" = xs390; then
16106    HOTSPOT_BUILD_CPU_DEFINE=S390
16107  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
16108    HOTSPOT_BUILD_CPU_DEFINE=S390
16109  elif test "x$OPENJDK_BUILD_CPU" != x; then
16110    HOTSPOT_BUILD_CPU_DEFINE=$(echo $OPENJDK_BUILD_CPU | tr a-z A-Z)
16111  fi
16112
16113
16114
16115
16116  # ZERO_ARCHDEF is used to enable architecture-specific code.
16117  # This is used in legacy hotspot build.
16118  ZERO_ARCHDEF="$HOTSPOT_TARGET_CPU_DEFINE"
16119
16120
16121
16122
16123
16124# Continue setting up basic stuff. Most remaining code require fundamental tools.
16125
16126  # Save the current directory this script was started from
16127  CURDIR="$PWD"
16128
16129  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
16130  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
16131  # was not available at that time.
16132  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
16133  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
16134    ORIGINAL_PATH="$REWRITTEN_PATH"
16135    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
16136$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
16137  fi
16138
16139  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16140    PATH_SEP=";"
16141
16142  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
16143  if test $SRC_ROOT_LENGTH -gt 100; then
16144    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
16145  fi
16146
16147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16148    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
16149$as_echo_n "checking cygwin release... " >&6; }
16150    CYGWIN_VERSION=`$UNAME -r`
16151    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
16152$as_echo "$CYGWIN_VERSION" >&6; }
16153    WINDOWS_ENV_VENDOR='cygwin'
16154    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
16155
16156    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
16157    if test "x$CYGWIN_VERSION_OLD" != x; then
16158      { $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
16159$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;}
16160      as_fn_error $? "Cannot continue" "$LINENO" 5
16161    fi
16162    if test "x$CYGPATH" = x; then
16163      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
16164    fi
16165    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
16166$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
16167    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16168    cygwin_winpath_root=`cd / ; cmd /c cd | $GREP ".*"`
16169    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
16170    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
16171    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
16172$as_echo "$CYGWIN_ROOT_PATH" >&6; }
16173    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
16174    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
16175    if test "x$test_cygdrive_prefix" = x; then
16176      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
16177    fi
16178  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16179    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
16180$as_echo_n "checking msys release... " >&6; }
16181    MSYS_VERSION=`$UNAME -r`
16182    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
16183$as_echo "$MSYS_VERSION" >&6; }
16184
16185    WINDOWS_ENV_VENDOR='msys'
16186    WINDOWS_ENV_VERSION="$MSYS_VERSION"
16187
16188    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
16189$as_echo_n "checking msys root directory as unix-style path... " >&6; }
16190    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16191    MSYS_ROOT_PATH=`cd / ; cmd /c cd | $GREP ".*"`
16192
16193  windows_path="$MSYS_ROOT_PATH"
16194  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16195    unix_path=`$CYGPATH -u "$windows_path"`
16196    MSYS_ROOT_PATH="$unix_path"
16197  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16198    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16199    MSYS_ROOT_PATH="$unix_path"
16200  fi
16201
16202    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
16203$as_echo "$MSYS_ROOT_PATH" >&6; }
16204    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
16205  else
16206    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
16207  fi
16208
16209  # Test if windows or unix (cygwin/msys) find is first in path.
16210  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
16211$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
16212  FIND_BINARY_OUTPUT=`find --version 2>&1`
16213  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
16214    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
16215$as_echo "unix style" >&6; }
16216  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
16217    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
16218$as_echo "Windows" >&6; }
16219    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
16220$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
16221    { $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
16222$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
16223    as_fn_error $? "Cannot continue" "$LINENO" 5
16224  else
16225    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
16226$as_echo "unknown" >&6; }
16227    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
16228$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
16229  fi
16230
16231  else
16232    PATH_SEP=":"
16233  fi
16234
16235
16236  # We get the top-level directory from the supporting wrappers.
16237  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
16238$as_echo_n "checking for top-level directory... " >&6; }
16239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
16240$as_echo "$TOPDIR" >&6; }
16241
16242
16243  # Save the original version of TOPDIR for string comparisons
16244  ORIGINAL_TOPDIR="$TOPDIR"
16245
16246
16247  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
16248
16249  # Only process if variable expands to non-empty
16250
16251  if test "x$CURDIR" != x; then
16252    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16253
16254  # Input might be given as Windows format, start by converting to
16255  # unix format.
16256  path="$CURDIR"
16257  new_path=`$CYGPATH -u "$path"`
16258
16259  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16260  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16261  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16262  # "foo.exe" is OK but "foo" is an error.
16263  #
16264  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16265  # It is also a way to make sure we got the proper file name for the real test later on.
16266  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16267  if test "x$test_shortpath" = x; then
16268    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16269$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16270    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
16271  fi
16272
16273  # Call helper function which possibly converts this using DOS-style short mode.
16274  # If so, the updated path is stored in $new_path.
16275
16276  input_path="$new_path"
16277  # Check if we need to convert this using DOS-style short mode. If the path
16278  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16279  # take no chances and rewrite it.
16280  # Note: m4 eats our [], so we need to use [ and ] instead.
16281  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16282  if test "x$has_forbidden_chars" != x; then
16283    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16284    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16285    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16286    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16287      # Going to short mode and back again did indeed matter. Since short mode is
16288      # case insensitive, let's make it lowercase to improve readability.
16289      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16290      # Now convert it back to Unix-style (cygpath)
16291      input_path=`$CYGPATH -u "$shortmode_path"`
16292      new_path="$input_path"
16293    fi
16294  fi
16295
16296  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16297  if test "x$test_cygdrive_prefix" = x; then
16298    # As a simple fix, exclude /usr/bin since it's not a real path.
16299    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16300      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16301      # a path prefixed by /cygdrive for fixpath to work.
16302      new_path="$CYGWIN_ROOT_PATH$input_path"
16303    fi
16304  fi
16305
16306
16307  if test "x$path" != "x$new_path"; then
16308    CURDIR="$new_path"
16309    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16310$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16311  fi
16312
16313    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16314
16315  path="$CURDIR"
16316  has_colon=`$ECHO $path | $GREP ^.:`
16317  new_path="$path"
16318  if test "x$has_colon" = x; then
16319    # Not in mixed or Windows style, start by that.
16320    new_path=`cmd //c echo $path`
16321  fi
16322
16323
16324  input_path="$new_path"
16325  # Check if we need to convert this using DOS-style short mode. If the path
16326  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16327  # take no chances and rewrite it.
16328  # Note: m4 eats our [], so we need to use [ and ] instead.
16329  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16330  if test "x$has_forbidden_chars" != x; then
16331    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16332    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16333  fi
16334
16335
16336  windows_path="$new_path"
16337  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16338    unix_path=`$CYGPATH -u "$windows_path"`
16339    new_path="$unix_path"
16340  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16341    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16342    new_path="$unix_path"
16343  fi
16344
16345  if test "x$path" != "x$new_path"; then
16346    CURDIR="$new_path"
16347    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16348$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16349  fi
16350
16351  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16352  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16353
16354    else
16355      # We're on a unix platform. Hooray! :)
16356      path="$CURDIR"
16357      has_space=`$ECHO "$path" | $GREP " "`
16358      if test "x$has_space" != x; then
16359        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16360$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16361        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16362      fi
16363
16364      # Use eval to expand a potential ~
16365      eval path="$path"
16366      if test ! -f "$path" && test ! -d "$path"; then
16367        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16368      fi
16369
16370      if test -d "$path"; then
16371        CURDIR="`cd "$path"; $THEPWDCMD -L`"
16372      else
16373        dir="`$DIRNAME "$path"`"
16374        base="`$BASENAME "$path"`"
16375        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16376      fi
16377    fi
16378  fi
16379
16380
16381  # Only process if variable expands to non-empty
16382
16383  if test "x$TOPDIR" != x; then
16384    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16385
16386  # Input might be given as Windows format, start by converting to
16387  # unix format.
16388  path="$TOPDIR"
16389  new_path=`$CYGPATH -u "$path"`
16390
16391  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16392  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16393  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16394  # "foo.exe" is OK but "foo" is an error.
16395  #
16396  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16397  # It is also a way to make sure we got the proper file name for the real test later on.
16398  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16399  if test "x$test_shortpath" = x; then
16400    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16401$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16402    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
16403  fi
16404
16405  # Call helper function which possibly converts this using DOS-style short mode.
16406  # If so, the updated path is stored in $new_path.
16407
16408  input_path="$new_path"
16409  # Check if we need to convert this using DOS-style short mode. If the path
16410  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16411  # take no chances and rewrite it.
16412  # Note: m4 eats our [], so we need to use [ and ] instead.
16413  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16414  if test "x$has_forbidden_chars" != x; then
16415    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16416    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16417    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16418    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16419      # Going to short mode and back again did indeed matter. Since short mode is
16420      # case insensitive, let's make it lowercase to improve readability.
16421      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16422      # Now convert it back to Unix-style (cygpath)
16423      input_path=`$CYGPATH -u "$shortmode_path"`
16424      new_path="$input_path"
16425    fi
16426  fi
16427
16428  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16429  if test "x$test_cygdrive_prefix" = x; then
16430    # As a simple fix, exclude /usr/bin since it's not a real path.
16431    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16432      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16433      # a path prefixed by /cygdrive for fixpath to work.
16434      new_path="$CYGWIN_ROOT_PATH$input_path"
16435    fi
16436  fi
16437
16438
16439  if test "x$path" != "x$new_path"; then
16440    TOPDIR="$new_path"
16441    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16442$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16443  fi
16444
16445    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16446
16447  path="$TOPDIR"
16448  has_colon=`$ECHO $path | $GREP ^.:`
16449  new_path="$path"
16450  if test "x$has_colon" = x; then
16451    # Not in mixed or Windows style, start by that.
16452    new_path=`cmd //c echo $path`
16453  fi
16454
16455
16456  input_path="$new_path"
16457  # Check if we need to convert this using DOS-style short mode. If the path
16458  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16459  # take no chances and rewrite it.
16460  # Note: m4 eats our [], so we need to use [ and ] instead.
16461  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16462  if test "x$has_forbidden_chars" != x; then
16463    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16464    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16465  fi
16466
16467
16468  windows_path="$new_path"
16469  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16470    unix_path=`$CYGPATH -u "$windows_path"`
16471    new_path="$unix_path"
16472  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16473    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16474    new_path="$unix_path"
16475  fi
16476
16477  if test "x$path" != "x$new_path"; then
16478    TOPDIR="$new_path"
16479    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16480$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16481  fi
16482
16483  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16484  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16485
16486    else
16487      # We're on a unix platform. Hooray! :)
16488      path="$TOPDIR"
16489      has_space=`$ECHO "$path" | $GREP " "`
16490      if test "x$has_space" != x; then
16491        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16492$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16493        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16494      fi
16495
16496      # Use eval to expand a potential ~
16497      eval path="$path"
16498      if test ! -f "$path" && test ! -d "$path"; then
16499        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16500      fi
16501
16502      if test -d "$path"; then
16503        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16504      else
16505        dir="`$DIRNAME "$path"`"
16506        base="`$BASENAME "$path"`"
16507        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16508      fi
16509    fi
16510  fi
16511
16512  # SRC_ROOT is a traditional alias for TOPDIR.
16513  SRC_ROOT=$TOPDIR
16514
16515  # Calculate a canonical version of TOPDIR for string comparisons
16516  CANONICAL_TOPDIR=$TOPDIR
16517
16518  if test "x$OPENJDK_BUILD_OS" != xwindows; then
16519    # Follow a chain of symbolic links. Use readlink
16520    # where it exists, else fall back to horribly
16521    # complicated shell code.
16522    if test "x$READLINK_TESTED" != yes; then
16523      # On MacOSX there is a readlink tool with a different
16524      # purpose than the GNU readlink tool. Check the found readlink.
16525      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16526      if test "x$ISGNU" = x; then
16527        # A readlink that we do not know how to use.
16528        # Are there other non-GNU readlinks out there?
16529        READLINK_TESTED=yes
16530        READLINK=
16531      fi
16532    fi
16533
16534    if test "x$READLINK" != x; then
16535      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16536    else
16537      # Save the current directory for restoring afterwards
16538      STARTDIR=$PWD
16539      COUNTER=0
16540      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16541      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16542      cd $sym_link_dir
16543      # Use -P flag to resolve symlinks in directories.
16544      cd `$THEPWDCMD -P`
16545      sym_link_dir=`$THEPWDCMD -P`
16546      # Resolve file symlinks
16547      while test $COUNTER -lt 20; do
16548        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16549        if test "x$ISLINK" == x; then
16550          # This is not a symbolic link! We are done!
16551          break
16552        fi
16553        # Again resolve directory symlinks since the target of the just found
16554        # link could be in a different directory
16555        cd `$DIRNAME $ISLINK`
16556        sym_link_dir=`$THEPWDCMD -P`
16557        sym_link_file=`$BASENAME $ISLINK`
16558        let COUNTER=COUNTER+1
16559      done
16560      cd $STARTDIR
16561      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16562    fi
16563  fi
16564
16565
16566
16567  # Locate the directory of this script.
16568  AUTOCONF_DIR=$TOPDIR/common/autoconf
16569
16570  # Setup username (for use in adhoc version strings etc)
16571  # Outer [ ] to quote m4.
16572   USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16573
16574
16575
16576# Check if it's a pure open build or if custom sources are to be used.
16577
16578  # Check whether --enable-openjdk-only was given.
16579if test "${enable_openjdk_only+set}" = set; then :
16580  enableval=$enable_openjdk_only;
16581else
16582  enable_openjdk_only="no"
16583fi
16584
16585
16586  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if custom source is suppressed (openjdk-only)" >&5
16587$as_echo_n "checking if custom source is suppressed (openjdk-only)... " >&6; }
16588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_openjdk_only" >&5
16589$as_echo "$enable_openjdk_only" >&6; }
16590  if test "x$enable_openjdk_only" = "xyes"; then
16591    SUPPRESS_CUSTOM_EXTENSIONS="true"
16592  elif test "x$enable_openjdk_only" = "xno"; then
16593    SUPPRESS_CUSTOM_EXTENSIONS="false"
16594  else
16595    as_fn_error $? "Invalid value for --enable-openjdk-only: $enable_openjdk_only" "$LINENO" 5
16596  fi
16597
16598  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16599  # the IncludeCustomExtension macro.
16600
16601
16602# Check whether --with-custom-make-dir was given.
16603if test "${with_custom_make_dir+set}" = set; then :
16604  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
16605$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16606fi
16607
16608
16609
16610
16611# These are needed to be able to create a configuration name (and thus the output directory)
16612
16613  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16614$as_echo_n "checking which variant of the JDK to build... " >&6; }
16615
16616# Check whether --with-jdk-variant was given.
16617if test "${with_jdk_variant+set}" = set; then :
16618  withval=$with_jdk_variant;
16619fi
16620
16621
16622  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16623    JDK_VARIANT="normal"
16624  else
16625    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16626  fi
16627
16628
16629
16630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16631$as_echo "$JDK_VARIANT" >&6; }
16632
16633
16634  DEBUG_LEVEL="release"
16635  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16636$as_echo_n "checking which debug level to use... " >&6; }
16637  # Check whether --enable-debug was given.
16638if test "${enable_debug+set}" = set; then :
16639  enableval=$enable_debug;
16640        ENABLE_DEBUG="${enableval}"
16641        DEBUG_LEVEL="fastdebug"
16642
16643else
16644  ENABLE_DEBUG="no"
16645fi
16646
16647
16648
16649# Check whether --with-debug-level was given.
16650if test "${with_debug_level+set}" = set; then :
16651  withval=$with_debug_level;
16652        DEBUG_LEVEL="${withval}"
16653        if test "x$ENABLE_DEBUG" = xyes; then
16654          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16655        fi
16656
16657fi
16658
16659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16660$as_echo "$DEBUG_LEVEL" >&6; }
16661
16662  if test "x$DEBUG_LEVEL" != xrelease && \
16663      test "x$DEBUG_LEVEL" != xoptimized && \
16664      test "x$DEBUG_LEVEL" != xfastdebug && \
16665      test "x$DEBUG_LEVEL" != xslowdebug; then
16666    as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16667  fi
16668
16669  # Translate DEBUG_LEVEL to debug level used by Hotspot
16670  HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16671  if test "x$DEBUG_LEVEL" = xrelease; then
16672    HOTSPOT_DEBUG_LEVEL="product"
16673  elif test "x$DEBUG_LEVEL" = xslowdebug; then
16674    HOTSPOT_DEBUG_LEVEL="debug"
16675  fi
16676
16677  if test "x$DEBUG_LEVEL" = xoptimized; then
16678    # The debug level 'optimized' is a little special because it is currently only
16679    # applicable to the HotSpot build where it means to build a completely
16680    # optimized version of the VM without any debugging code (like for the
16681    # 'release' debug level which is called 'product' in the HotSpot build) but
16682    # with the exception that it can contain additional code which is otherwise
16683    # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16684    # test new and/or experimental features which are not intended for customer
16685    # shipment. Because these new features need to be tested and benchmarked in
16686    # real world scenarios, we want to build the containing JDK at the 'release'
16687    # debug level.
16688    DEBUG_LEVEL="release"
16689  fi
16690
16691
16692
16693
16694
16695
16696# Check whether --with-jvm-variants was given.
16697if test "${with_jvm_variants+set}" = set; then :
16698  withval=$with_jvm_variants;
16699fi
16700
16701
16702  if test "x$with_jvm_variants" = x; then
16703    with_jvm_variants="server"
16704  fi
16705  JVM_VARIANTS_OPT="$with_jvm_variants"
16706
16707  # Has the user listed more than one variant?
16708  # Additional [] needed to keep m4 from mangling shell constructs.
16709  if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
16710    BUILDING_MULTIPLE_JVM_VARIANTS=true
16711  else
16712    BUILDING_MULTIPLE_JVM_VARIANTS=false
16713  fi
16714  # Replace the commas with AND for use in the build directory name.
16715  JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
16716
16717  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
16718$as_echo_n "checking which variants of the JVM to build... " >&6; }
16719  # JVM_VARIANTS is a space-separated list.
16720  # Also use minimal, not minimal1 (which is kept for backwards compatibility).
16721  JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
16722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
16723$as_echo "$JVM_VARIANTS" >&6; }
16724
16725  # Check that the selected variants are valid
16726
16727  # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
16728  # Notice that the original variant failes on SLES 10 and 11
16729  NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
16730  STACK=${JVM_VARIANTS// /$'\n'}
16731  INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16732  if test "x$INVALID_VARIANTS" != x; then
16733    { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
16734$as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
16735    as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
16736  fi
16737
16738  # All "special" variants share the same output directory ("server")
16739  VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
16740  NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
16741  STACK=${JVM_VARIANTS// /$'\n'}
16742  INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16743  if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
16744    as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
16745  fi
16746
16747
16748
16749
16750  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
16751    # zero behaves as a platform and rewrites these values. This is really weird. :(
16752    # We are guaranteed that we do not build any other variants when building zero.
16753    HOTSPOT_TARGET_CPU=zero
16754    HOTSPOT_TARGET_CPU_ARCH=zero
16755  fi
16756
16757
16758# With basic setup done, call the custom early hook.
16759
16760
16761# Check if we have devkits, extra paths or sysroot set.
16762
16763
16764# Check whether --with-devkit was given.
16765if test "${with_devkit+set}" = set; then :
16766  withval=$with_devkit;
16767
16768  # Only process if variable expands to non-empty
16769
16770  if test "x$with_devkit" != x; then
16771    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16772
16773  # Input might be given as Windows format, start by converting to
16774  # unix format.
16775  path="$with_devkit"
16776  new_path=`$CYGPATH -u "$path"`
16777
16778  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16779  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16780  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16781  # "foo.exe" is OK but "foo" is an error.
16782  #
16783  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16784  # It is also a way to make sure we got the proper file name for the real test later on.
16785  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16786  if test "x$test_shortpath" = x; then
16787    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16788$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16789    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
16790  fi
16791
16792  # Call helper function which possibly converts this using DOS-style short mode.
16793  # If so, the updated path is stored in $new_path.
16794
16795  input_path="$new_path"
16796  # Check if we need to convert this using DOS-style short mode. If the path
16797  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16798  # take no chances and rewrite it.
16799  # Note: m4 eats our [], so we need to use [ and ] instead.
16800  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16801  if test "x$has_forbidden_chars" != x; then
16802    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16803    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16804    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16805    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16806      # Going to short mode and back again did indeed matter. Since short mode is
16807      # case insensitive, let's make it lowercase to improve readability.
16808      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16809      # Now convert it back to Unix-style (cygpath)
16810      input_path=`$CYGPATH -u "$shortmode_path"`
16811      new_path="$input_path"
16812    fi
16813  fi
16814
16815  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16816  if test "x$test_cygdrive_prefix" = x; then
16817    # As a simple fix, exclude /usr/bin since it's not a real path.
16818    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16819      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16820      # a path prefixed by /cygdrive for fixpath to work.
16821      new_path="$CYGWIN_ROOT_PATH$input_path"
16822    fi
16823  fi
16824
16825
16826  if test "x$path" != "x$new_path"; then
16827    with_devkit="$new_path"
16828    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16829$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16830  fi
16831
16832    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16833
16834  path="$with_devkit"
16835  has_colon=`$ECHO $path | $GREP ^.:`
16836  new_path="$path"
16837  if test "x$has_colon" = x; then
16838    # Not in mixed or Windows style, start by that.
16839    new_path=`cmd //c echo $path`
16840  fi
16841
16842
16843  input_path="$new_path"
16844  # Check if we need to convert this using DOS-style short mode. If the path
16845  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16846  # take no chances and rewrite it.
16847  # Note: m4 eats our [], so we need to use [ and ] instead.
16848  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16849  if test "x$has_forbidden_chars" != x; then
16850    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16851    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16852  fi
16853
16854
16855  windows_path="$new_path"
16856  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16857    unix_path=`$CYGPATH -u "$windows_path"`
16858    new_path="$unix_path"
16859  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16860    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16861    new_path="$unix_path"
16862  fi
16863
16864  if test "x$path" != "x$new_path"; then
16865    with_devkit="$new_path"
16866    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16867$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16868  fi
16869
16870  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16871  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16872
16873    else
16874      # We're on a unix platform. Hooray! :)
16875      path="$with_devkit"
16876      has_space=`$ECHO "$path" | $GREP " "`
16877      if test "x$has_space" != x; then
16878        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16879$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16880        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16881      fi
16882
16883      # Use eval to expand a potential ~
16884      eval path="$path"
16885      if test ! -f "$path" && test ! -d "$path"; then
16886        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
16887      fi
16888
16889      if test -d "$path"; then
16890        with_devkit="`cd "$path"; $THEPWDCMD -L`"
16891      else
16892        dir="`$DIRNAME "$path"`"
16893        base="`$BASENAME "$path"`"
16894        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
16895      fi
16896    fi
16897  fi
16898
16899        DEVKIT_ROOT="$with_devkit"
16900        # Check for a meta data info file in the root of the devkit
16901        if test -f "$DEVKIT_ROOT/devkit.info"; then
16902          . $DEVKIT_ROOT/devkit.info
16903          # This potentially sets the following:
16904          # A descriptive name of the devkit
16905
16906  if test "x$DEVKIT_NAME" = x; then
16907    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
16908  fi
16909
16910          # Corresponds to --with-extra-path
16911
16912  if test "x$DEVKIT_EXTRA_PATH" = x; then
16913    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
16914  fi
16915
16916          # Corresponds to --with-toolchain-path
16917
16918  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16919    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
16920  fi
16921
16922          # Corresponds to --with-sysroot
16923
16924  if test "x$DEVKIT_SYSROOT" = x; then
16925    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
16926  fi
16927
16928
16929          # Identifies the Visual Studio version in the devkit
16930
16931  if test "x$DEVKIT_VS_VERSION" = x; then
16932    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
16933  fi
16934
16935          # The Visual Studio include environment variable
16936
16937  if test "x$DEVKIT_VS_INCLUDE" = x; then
16938    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
16939  fi
16940
16941          # The Visual Studio lib environment variable
16942
16943  if test "x$DEVKIT_VS_LIB" = x; then
16944    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
16945  fi
16946
16947          # Corresponds to --with-msvcr-dll
16948
16949  if test "x$DEVKIT_MSVCR_DLL" = x; then
16950    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
16951  fi
16952
16953          # Corresponds to --with-msvcp-dll
16954
16955  if test "x$DEVKIT_MSVCP_DLL" = x; then
16956    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
16957  fi
16958
16959        fi
16960
16961        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
16962$as_echo_n "checking for devkit... " >&6; }
16963        if test "x$DEVKIT_NAME" != x; then
16964          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
16965$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
16966        else
16967          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
16968$as_echo "$DEVKIT_ROOT" >&6; }
16969        fi
16970
16971
16972  if test "x$DEVKIT_EXTRA_PATH" != x; then
16973    if test "x$EXTRA_PATH" = x; then
16974      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
16975    else
16976      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
16977    fi
16978  fi
16979
16980
16981        # Fallback default of just /bin if DEVKIT_PATH is not defined
16982        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16983          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
16984        fi
16985
16986  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
16987    if test "x$TOOLCHAIN_PATH" = x; then
16988      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
16989    else
16990      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
16991    fi
16992  fi
16993
16994
16995        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
16996        # places for backwards compatiblity.
16997        if test "x$DEVKIT_SYSROOT" != x; then
16998          SYSROOT="$DEVKIT_SYSROOT"
16999        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
17000          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
17001        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
17002          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
17003        fi
17004
17005
17006fi
17007
17008
17009  # You can force the sysroot if the sysroot encoded into the compiler tools
17010  # is not correct.
17011
17012# Check whether --with-sys-root was given.
17013if test "${with_sys_root+set}" = set; then :
17014  withval=$with_sys_root; SYSROOT=$with_sys_root
17015
17016fi
17017
17018
17019
17020# Check whether --with-sysroot was given.
17021if test "${with_sysroot+set}" = set; then :
17022  withval=$with_sysroot; SYSROOT=$with_sysroot
17023
17024fi
17025
17026
17027
17028# Check whether --with-tools-dir was given.
17029if test "${with_tools_dir+set}" = set; then :
17030  withval=$with_tools_dir;
17031  if test "x$with_tools_dir" != x; then
17032    if test "x$TOOLCHAIN_PATH" = x; then
17033      TOOLCHAIN_PATH="$with_tools_dir"
17034    else
17035      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
17036    fi
17037  fi
17038
17039
17040fi
17041
17042
17043
17044# Check whether --with-toolchain-path was given.
17045if test "${with_toolchain_path+set}" = set; then :
17046  withval=$with_toolchain_path;
17047  if test "x$with_toolchain_path" != x; then
17048    if test "x$TOOLCHAIN_PATH" = x; then
17049      TOOLCHAIN_PATH="$with_toolchain_path"
17050    else
17051      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
17052    fi
17053  fi
17054
17055
17056fi
17057
17058
17059
17060# Check whether --with-extra-path was given.
17061if test "${with_extra_path+set}" = set; then :
17062  withval=$with_extra_path;
17063  if test "x$with_extra_path" != x; then
17064    if test "x$EXTRA_PATH" = x; then
17065      EXTRA_PATH="$with_extra_path"
17066    else
17067      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
17068    fi
17069  fi
17070
17071
17072fi
17073
17074
17075  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
17076    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
17077    # If not, detect if Xcode is installed by running xcodebuild -version
17078    # if no Xcode installed, xcodebuild exits with 1
17079    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
17080    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
17081      # We need to use xcodebuild in the toolchain dir provided by the user, this will
17082      # fall back on the stub binary in /usr/bin/xcodebuild
17083      # Extract the first word of "xcodebuild", so it can be a program name with args.
17084set dummy xcodebuild; ac_word=$2
17085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17086$as_echo_n "checking for $ac_word... " >&6; }
17087if ${ac_cv_path_XCODEBUILD+:} false; then :
17088  $as_echo_n "(cached) " >&6
17089else
17090  case $XCODEBUILD in
17091  [\\/]* | ?:[\\/]*)
17092  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
17093  ;;
17094  *)
17095  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17096for as_dir in $TOOLCHAIN_PATH
17097do
17098  IFS=$as_save_IFS
17099  test -z "$as_dir" && as_dir=.
17100    for ac_exec_ext in '' $ac_executable_extensions; do
17101  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17102    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
17103    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17104    break 2
17105  fi
17106done
17107  done
17108IFS=$as_save_IFS
17109
17110  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
17111  ;;
17112esac
17113fi
17114XCODEBUILD=$ac_cv_path_XCODEBUILD
17115if test -n "$XCODEBUILD"; then
17116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
17117$as_echo "$XCODEBUILD" >&6; }
17118else
17119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17120$as_echo "no" >&6; }
17121fi
17122
17123
17124    else
17125      # this should result in SYSROOT being empty, unless --with-sysroot is provided
17126      # when only the command line tools are installed there are no SDKs, so headers
17127      # are copied into the system frameworks
17128      XCODEBUILD=
17129
17130    fi
17131
17132    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
17133$as_echo_n "checking for sdk name... " >&6; }
17134
17135# Check whether --with-sdk-name was given.
17136if test "${with_sdk_name+set}" = set; then :
17137  withval=$with_sdk_name; SDKNAME=$with_sdk_name
17138
17139fi
17140
17141    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
17142$as_echo "$SDKNAME" >&6; }
17143
17144    # if toolchain path is specified then don't rely on system headers, they may not compile
17145    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
17146    test -z "$TOOLCHAIN_PATH" && \
17147      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
17148
17149    if test -z "$SYSROOT"; then
17150      if test -n "$XCODEBUILD"; then
17151        # if we don't have system headers, use default SDK name (last resort)
17152        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17153          SDKNAME=${SDKNAME:-macosx}
17154        fi
17155
17156        if test -n "$SDKNAME"; then
17157          # Call xcodebuild to determine SYSROOT
17158          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | $GREP '^Path: ' | $SED 's/Path: //'`
17159        fi
17160      else
17161        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17162          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
17163        fi
17164      fi
17165    else
17166      # warn user if --with-sdk-name was also set
17167      if test -n "$with_sdk_name"; then
17168        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
17169$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
17170      fi
17171    fi
17172
17173    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
17174      # If no system framework headers, then SYSROOT must be set, or we won't build
17175      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
17176    fi
17177
17178    # Perform a basic sanity test
17179    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
17180      if test -z "$SYSROOT"; then
17181        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
17182      else
17183        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
17184      fi
17185    fi
17186
17187    # set SDKROOT too, Xcode tools will pick it up
17188    SDKROOT=$SYSROOT
17189
17190  fi
17191
17192  # Prepend the extra path to the global path
17193
17194  if test "x$EXTRA_PATH" != x; then
17195    if test "x$PATH" = x; then
17196      PATH="$EXTRA_PATH"
17197    else
17198      PATH="$EXTRA_PATH:$PATH"
17199    fi
17200  fi
17201
17202
17203  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
17204$as_echo_n "checking for sysroot... " >&6; }
17205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
17206$as_echo "$SYSROOT" >&6; }
17207  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
17208$as_echo_n "checking for toolchain path... " >&6; }
17209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
17210$as_echo "$TOOLCHAIN_PATH" >&6; }
17211  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
17212$as_echo_n "checking for extra path... " >&6; }
17213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
17214$as_echo "$EXTRA_PATH" >&6; }
17215
17216
17217# To properly create a configuration name, we need to have the OpenJDK target
17218# and options (variants and debug level) parsed.
17219
17220
17221
17222# Check whether --with-conf-name was given.
17223if test "${with_conf_name+set}" = set; then :
17224  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
17225fi
17226
17227
17228  # Test from where we are running configure, in or outside of src root.
17229  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
17230$as_echo_n "checking where to store configuration... " >&6; }
17231  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
17232      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
17233      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
17234    # We are running configure from the src root.
17235    # Create a default ./build/target-variant-debuglevel output root.
17236    if test "x${CONF_NAME}" = x; then
17237      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
17238$as_echo "in default location" >&6; }
17239      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
17240    else
17241      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
17242$as_echo "in build directory with custom name" >&6; }
17243    fi
17244    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
17245    $MKDIR -p "$OUTPUT_ROOT"
17246    if test ! -d "$OUTPUT_ROOT"; then
17247      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
17248    fi
17249  else
17250    # We are running configure from outside of the src dir.
17251    # Then use the current directory as output dir!
17252    # If configuration is situated in normal build directory, just use the build
17253    # directory name as configuration name, otherwise use the complete path.
17254    if test "x${CONF_NAME}" = x; then
17255      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
17256    fi
17257    OUTPUT_ROOT="$CURDIR"
17258    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
17259$as_echo "in current directory" >&6; }
17260
17261    # WARNING: This might be a bad thing to do. You need to be sure you want to
17262    # have a configuration in this directory. Do some sanity checks!
17263
17264    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
17265      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
17266      # other files
17267      files_present=`$LS $OUTPUT_ROOT`
17268      # Configure has already touched config.log and confdefs.h in the current dir when this check
17269      # is performed.
17270      filtered_files=`$ECHO "$files_present" \
17271          | $SED -e 's/config.log//g' \
17272              -e 's/configure.log//g' \
17273              -e 's/confdefs.h//g' \
17274              -e 's/ //g' \
17275          | $TR -d '\n'`
17276      if test "x$filtered_files" != x; then
17277        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
17278$as_echo "$as_me: Current directory is $CURDIR." >&6;}
17279        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
17280$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
17281        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
17282$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
17283        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
17284$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
17285        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
17286$as_echo "$as_me: seriously mess up just about everything." >&6;}
17287        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
17288$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
17289        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
17290$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
17291        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
17292      fi
17293    fi
17294  fi
17295  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
17296$as_echo_n "checking what configuration name to use... " >&6; }
17297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
17298$as_echo "$CONF_NAME" >&6; }
17299
17300
17301  # Only process if variable expands to non-empty
17302
17303  if test "x$OUTPUT_ROOT" != x; then
17304    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17305
17306  # Input might be given as Windows format, start by converting to
17307  # unix format.
17308  path="$OUTPUT_ROOT"
17309  new_path=`$CYGPATH -u "$path"`
17310
17311  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17312  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17313  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17314  # "foo.exe" is OK but "foo" is an error.
17315  #
17316  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17317  # It is also a way to make sure we got the proper file name for the real test later on.
17318  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17319  if test "x$test_shortpath" = x; then
17320    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17321$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17322    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
17323  fi
17324
17325  # Call helper function which possibly converts this using DOS-style short mode.
17326  # If so, the updated path is stored in $new_path.
17327
17328  input_path="$new_path"
17329  # Check if we need to convert this using DOS-style short mode. If the path
17330  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17331  # take no chances and rewrite it.
17332  # Note: m4 eats our [], so we need to use [ and ] instead.
17333  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17334  if test "x$has_forbidden_chars" != x; then
17335    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17336    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17337    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17338    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17339      # Going to short mode and back again did indeed matter. Since short mode is
17340      # case insensitive, let's make it lowercase to improve readability.
17341      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17342      # Now convert it back to Unix-style (cygpath)
17343      input_path=`$CYGPATH -u "$shortmode_path"`
17344      new_path="$input_path"
17345    fi
17346  fi
17347
17348  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17349  if test "x$test_cygdrive_prefix" = x; then
17350    # As a simple fix, exclude /usr/bin since it's not a real path.
17351    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17352      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17353      # a path prefixed by /cygdrive for fixpath to work.
17354      new_path="$CYGWIN_ROOT_PATH$input_path"
17355    fi
17356  fi
17357
17358
17359  if test "x$path" != "x$new_path"; then
17360    OUTPUT_ROOT="$new_path"
17361    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17362$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17363  fi
17364
17365    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17366
17367  path="$OUTPUT_ROOT"
17368  has_colon=`$ECHO $path | $GREP ^.:`
17369  new_path="$path"
17370  if test "x$has_colon" = x; then
17371    # Not in mixed or Windows style, start by that.
17372    new_path=`cmd //c echo $path`
17373  fi
17374
17375
17376  input_path="$new_path"
17377  # Check if we need to convert this using DOS-style short mode. If the path
17378  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17379  # take no chances and rewrite it.
17380  # Note: m4 eats our [], so we need to use [ and ] instead.
17381  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17382  if test "x$has_forbidden_chars" != x; then
17383    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17384    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17385  fi
17386
17387
17388  windows_path="$new_path"
17389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17390    unix_path=`$CYGPATH -u "$windows_path"`
17391    new_path="$unix_path"
17392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17393    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17394    new_path="$unix_path"
17395  fi
17396
17397  if test "x$path" != "x$new_path"; then
17398    OUTPUT_ROOT="$new_path"
17399    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17400$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17401  fi
17402
17403  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17404  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17405
17406    else
17407      # We're on a unix platform. Hooray! :)
17408      path="$OUTPUT_ROOT"
17409      has_space=`$ECHO "$path" | $GREP " "`
17410      if test "x$has_space" != x; then
17411        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17412$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17413        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17414      fi
17415
17416      # Use eval to expand a potential ~
17417      eval path="$path"
17418      if test ! -f "$path" && test ! -d "$path"; then
17419        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
17420      fi
17421
17422      if test -d "$path"; then
17423        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
17424      else
17425        dir="`$DIRNAME "$path"`"
17426        base="`$BASENAME "$path"`"
17427        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
17428      fi
17429    fi
17430  fi
17431
17432
17433  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
17434  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
17435
17436  SPEC=$OUTPUT_ROOT/spec.gmk
17437
17438  CONF_NAME=$CONF_NAME
17439
17440  OUTPUT_ROOT=$OUTPUT_ROOT
17441
17442
17443
17444  # The spec.gmk file contains all variables for the make system.
17445  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17446
17447  # The bootcycle-spec.gmk file contains support for boot cycle builds.
17448  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17449
17450  # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17451  ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17452
17453  # The compare.sh is used to compare the build output to other builds.
17454  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17455
17456  # The generated Makefile knows where the spec.gmk is and where the source is.
17457  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17458  # which will look for generated configurations
17459  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17460
17461
17462
17463# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17464
17465  for ac_prog in apt-get yum port pkgutil pkgadd
17466do
17467  # Extract the first word of "$ac_prog", so it can be a program name with args.
17468set dummy $ac_prog; ac_word=$2
17469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17470$as_echo_n "checking for $ac_word... " >&6; }
17471if ${ac_cv_prog_PKGHANDLER+:} false; then :
17472  $as_echo_n "(cached) " >&6
17473else
17474  if test -n "$PKGHANDLER"; then
17475  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17476else
17477as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17478for as_dir in $PATH
17479do
17480  IFS=$as_save_IFS
17481  test -z "$as_dir" && as_dir=.
17482    for ac_exec_ext in '' $ac_executable_extensions; do
17483  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17484    ac_cv_prog_PKGHANDLER="$ac_prog"
17485    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17486    break 2
17487  fi
17488done
17489  done
17490IFS=$as_save_IFS
17491
17492fi
17493fi
17494PKGHANDLER=$ac_cv_prog_PKGHANDLER
17495if test -n "$PKGHANDLER"; then
17496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17497$as_echo "$PKGHANDLER" >&6; }
17498else
17499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17500$as_echo "no" >&6; }
17501fi
17502
17503
17504  test -n "$PKGHANDLER" && break
17505done
17506
17507
17508
17509# Setup tools that requires more complex handling, or that is not needed by the configure script.
17510
17511
17512
17513  # Publish this variable in the help.
17514
17515
17516  if [ -z "${MAKE+x}" ]; then
17517    # The variable is not set by user, try to locate tool using the code snippet
17518
17519    # Try our hardest to locate a correct version of GNU make
17520    for ac_prog in gmake
17521do
17522  # Extract the first word of "$ac_prog", so it can be a program name with args.
17523set dummy $ac_prog; ac_word=$2
17524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17525$as_echo_n "checking for $ac_word... " >&6; }
17526if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17527  $as_echo_n "(cached) " >&6
17528else
17529  case $CHECK_GMAKE in
17530  [\\/]* | ?:[\\/]*)
17531  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17532  ;;
17533  *)
17534  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17535for as_dir in $PATH
17536do
17537  IFS=$as_save_IFS
17538  test -z "$as_dir" && as_dir=.
17539    for ac_exec_ext in '' $ac_executable_extensions; do
17540  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17541    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17542    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17543    break 2
17544  fi
17545done
17546  done
17547IFS=$as_save_IFS
17548
17549  ;;
17550esac
17551fi
17552CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17553if test -n "$CHECK_GMAKE"; then
17554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17555$as_echo "$CHECK_GMAKE" >&6; }
17556else
17557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17558$as_echo "no" >&6; }
17559fi
17560
17561
17562  test -n "$CHECK_GMAKE" && break
17563done
17564
17565
17566  MAKE_CANDIDATE=""$CHECK_GMAKE""
17567  DESCRIPTION="gmake in PATH"
17568
17569  # On Cygwin, we require a newer version of make than on other platforms
17570  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17571    MAKE_VERSION_EXPR="-e 4\."
17572    MAKE_REQUIRED_VERSION="4.0"
17573   else
17574    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17575    MAKE_REQUIRED_VERSION="3.81"
17576  fi
17577
17578  if test "x$MAKE_CANDIDATE" != x; then
17579    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17580$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17581    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17582    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17583    if test "x$IS_GNU_MAKE" = x; then
17584      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17585$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17586    else
17587      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17588      if test "x$IS_MODERN_MAKE" = x; then
17589        { $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
17590$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;}
17591      else
17592        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17593          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17594            MAKE_EXPECTED_ENV='cygwin'
17595          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17596            MAKE_EXPECTED_ENV='msys'
17597          else
17598            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17599          fi
17600          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17601          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17602        else
17603          # Not relevant for non-Windows
17604          IS_MAKE_CORRECT_ENV=true
17605        fi
17606        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17607          { $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
17608$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;}
17609        else
17610          FOUND_MAKE=$MAKE_CANDIDATE
17611
17612  # Only process if variable expands to non-empty
17613
17614  if test "x$FOUND_MAKE" != x; then
17615    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17616
17617  # First separate the path from the arguments. This will split at the first
17618  # space.
17619  complete="$FOUND_MAKE"
17620  path="${complete%% *}"
17621  tmp="$complete EOL"
17622  arguments="${tmp#* }"
17623
17624  # Input might be given as Windows format, start by converting to
17625  # unix format.
17626  new_path=`$CYGPATH -u "$path"`
17627
17628  # Now try to locate executable using which
17629  new_path=`$WHICH "$new_path" 2> /dev/null`
17630  # bat and cmd files are not always considered executable in cygwin causing which
17631  # to not find them
17632  if test "x$new_path" = x \
17633      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17634      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17635    new_path=`$CYGPATH -u "$path"`
17636  fi
17637  if test "x$new_path" = x; then
17638    # Oops. Which didn't find the executable.
17639    # The splitting of arguments from the executable at a space might have been incorrect,
17640    # since paths with space are more likely in Windows. Give it another try with the whole
17641    # argument.
17642    path="$complete"
17643    arguments="EOL"
17644    new_path=`$CYGPATH -u "$path"`
17645    new_path=`$WHICH "$new_path" 2> /dev/null`
17646    # bat and cmd files are not always considered executable in cygwin causing which
17647    # to not find them
17648    if test "x$new_path" = x \
17649        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17650        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17651      new_path=`$CYGPATH -u "$path"`
17652    fi
17653    if test "x$new_path" = x; then
17654      # It's still not found. Now this is an unrecoverable error.
17655      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17656$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17657      has_space=`$ECHO "$complete" | $GREP " "`
17658      if test "x$has_space" != x; then
17659        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17660$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17661      fi
17662      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17663    fi
17664  fi
17665
17666  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17667  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17668  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17669  # "foo.exe" is OK but "foo" is an error.
17670  #
17671  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17672  # It is also a way to make sure we got the proper file name for the real test later on.
17673  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17674  if test "x$test_shortpath" = x; then
17675    # Short path failed, file does not exist as specified.
17676    # Try adding .exe or .cmd
17677    if test -f "${new_path}.exe"; then
17678      input_to_shortpath="${new_path}.exe"
17679    elif test -f "${new_path}.cmd"; then
17680      input_to_shortpath="${new_path}.cmd"
17681    else
17682      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17683$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17684      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17685$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17686      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17687    fi
17688  else
17689    input_to_shortpath="$new_path"
17690  fi
17691
17692  # Call helper function which possibly converts this using DOS-style short mode.
17693  # If so, the updated path is stored in $new_path.
17694  new_path="$input_to_shortpath"
17695
17696  input_path="$input_to_shortpath"
17697  # Check if we need to convert this using DOS-style short mode. If the path
17698  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17699  # take no chances and rewrite it.
17700  # Note: m4 eats our [], so we need to use [ and ] instead.
17701  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17702  if test "x$has_forbidden_chars" != x; then
17703    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17704    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17705    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17706    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17707      # Going to short mode and back again did indeed matter. Since short mode is
17708      # case insensitive, let's make it lowercase to improve readability.
17709      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17710      # Now convert it back to Unix-style (cygpath)
17711      input_path=`$CYGPATH -u "$shortmode_path"`
17712      new_path="$input_path"
17713    fi
17714  fi
17715
17716  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17717  if test "x$test_cygdrive_prefix" = x; then
17718    # As a simple fix, exclude /usr/bin since it's not a real path.
17719    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17720      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17721      # a path prefixed by /cygdrive for fixpath to work.
17722      new_path="$CYGWIN_ROOT_PATH$input_path"
17723    fi
17724  fi
17725
17726  # remove trailing .exe if any
17727  new_path="${new_path/%.exe/}"
17728
17729    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17730
17731  # First separate the path from the arguments. This will split at the first
17732  # space.
17733  complete="$FOUND_MAKE"
17734  path="${complete%% *}"
17735  tmp="$complete EOL"
17736  arguments="${tmp#* }"
17737
17738  # Input might be given as Windows format, start by converting to
17739  # unix format.
17740  new_path="$path"
17741
17742  windows_path="$new_path"
17743  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17744    unix_path=`$CYGPATH -u "$windows_path"`
17745    new_path="$unix_path"
17746  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17747    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17748    new_path="$unix_path"
17749  fi
17750
17751
17752  # Now try to locate executable using which
17753  new_path=`$WHICH "$new_path" 2> /dev/null`
17754
17755  if test "x$new_path" = x; then
17756    # Oops. Which didn't find the executable.
17757    # The splitting of arguments from the executable at a space might have been incorrect,
17758    # since paths with space are more likely in Windows. Give it another try with the whole
17759    # argument.
17760    path="$complete"
17761    arguments="EOL"
17762    new_path="$path"
17763
17764  windows_path="$new_path"
17765  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17766    unix_path=`$CYGPATH -u "$windows_path"`
17767    new_path="$unix_path"
17768  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17769    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17770    new_path="$unix_path"
17771  fi
17772
17773
17774    new_path=`$WHICH "$new_path" 2> /dev/null`
17775    # bat and cmd files are not always considered executable in MSYS causing which
17776    # to not find them
17777    if test "x$new_path" = x \
17778        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17779        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17780      new_path="$path"
17781
17782  windows_path="$new_path"
17783  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17784    unix_path=`$CYGPATH -u "$windows_path"`
17785    new_path="$unix_path"
17786  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17787    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17788    new_path="$unix_path"
17789  fi
17790
17791    fi
17792
17793    if test "x$new_path" = x; then
17794      # It's still not found. Now this is an unrecoverable error.
17795      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17796$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17797      has_space=`$ECHO "$complete" | $GREP " "`
17798      if test "x$has_space" != x; then
17799        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17800$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17801      fi
17802      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17803    fi
17804  fi
17805
17806  # Now new_path has a complete unix path to the binary
17807  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17808    # Keep paths in /bin as-is, but remove trailing .exe if any
17809    new_path="${new_path/%.exe/}"
17810    # Do not save /bin paths to all_fixpath_prefixes!
17811  else
17812    # Not in mixed or Windows style, start by that.
17813    new_path=`cmd //c echo $new_path`
17814
17815  input_path="$new_path"
17816  # Check if we need to convert this using DOS-style short mode. If the path
17817  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17818  # take no chances and rewrite it.
17819  # Note: m4 eats our [], so we need to use [ and ] instead.
17820  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17821  if test "x$has_forbidden_chars" != x; then
17822    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17823    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17824  fi
17825
17826    # Output is in $new_path
17827
17828  windows_path="$new_path"
17829  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17830    unix_path=`$CYGPATH -u "$windows_path"`
17831    new_path="$unix_path"
17832  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17833    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17834    new_path="$unix_path"
17835  fi
17836
17837    # remove trailing .exe if any
17838    new_path="${new_path/%.exe/}"
17839
17840    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17841    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17842  fi
17843
17844    else
17845      # We're on a unix platform. Hooray! :)
17846      # First separate the path from the arguments. This will split at the first
17847      # space.
17848      complete="$FOUND_MAKE"
17849      path="${complete%% *}"
17850      tmp="$complete EOL"
17851      arguments="${tmp#* }"
17852
17853      # Cannot rely on the command "which" here since it doesn't always work.
17854      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17855      if test -z "$is_absolute_path"; then
17856        # Path to executable is not absolute. Find it.
17857        IFS_save="$IFS"
17858        IFS=:
17859        for p in $PATH; do
17860          if test -f "$p/$path" && test -x "$p/$path"; then
17861            new_path="$p/$path"
17862            break
17863          fi
17864        done
17865        IFS="$IFS_save"
17866      else
17867        # This is an absolute path, we can use it without further modifications.
17868        new_path="$path"
17869      fi
17870
17871      if test "x$new_path" = x; then
17872        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17873$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17874        has_space=`$ECHO "$complete" | $GREP " "`
17875        if test "x$has_space" != x; then
17876          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17877$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17878        fi
17879        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17880      fi
17881    fi
17882
17883    # Now join together the path and the arguments once again
17884    if test "x$arguments" != xEOL; then
17885      new_complete="$new_path ${arguments% *}"
17886    else
17887      new_complete="$new_path"
17888    fi
17889
17890    if test "x$complete" != "x$new_complete"; then
17891      FOUND_MAKE="$new_complete"
17892      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17893$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17894    fi
17895  fi
17896
17897        fi
17898      fi
17899    fi
17900  fi
17901
17902
17903    if test "x$FOUND_MAKE" = x; then
17904      for ac_prog in make
17905do
17906  # Extract the first word of "$ac_prog", so it can be a program name with args.
17907set dummy $ac_prog; ac_word=$2
17908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17909$as_echo_n "checking for $ac_word... " >&6; }
17910if ${ac_cv_path_CHECK_MAKE+:} false; then :
17911  $as_echo_n "(cached) " >&6
17912else
17913  case $CHECK_MAKE in
17914  [\\/]* | ?:[\\/]*)
17915  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
17916  ;;
17917  *)
17918  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17919for as_dir in $PATH
17920do
17921  IFS=$as_save_IFS
17922  test -z "$as_dir" && as_dir=.
17923    for ac_exec_ext in '' $ac_executable_extensions; do
17924  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17925    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
17926    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17927    break 2
17928  fi
17929done
17930  done
17931IFS=$as_save_IFS
17932
17933  ;;
17934esac
17935fi
17936CHECK_MAKE=$ac_cv_path_CHECK_MAKE
17937if test -n "$CHECK_MAKE"; then
17938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
17939$as_echo "$CHECK_MAKE" >&6; }
17940else
17941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17942$as_echo "no" >&6; }
17943fi
17944
17945
17946  test -n "$CHECK_MAKE" && break
17947done
17948
17949
17950  MAKE_CANDIDATE=""$CHECK_MAKE""
17951  DESCRIPTION="make in PATH"
17952
17953  # On Cygwin, we require a newer version of make than on other platforms
17954  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17955    MAKE_VERSION_EXPR="-e 4\."
17956    MAKE_REQUIRED_VERSION="4.0"
17957   else
17958    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17959    MAKE_REQUIRED_VERSION="3.81"
17960  fi
17961
17962  if test "x$MAKE_CANDIDATE" != x; then
17963    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17964$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17965    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17966    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17967    if test "x$IS_GNU_MAKE" = x; then
17968      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17969$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17970    else
17971      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17972      if test "x$IS_MODERN_MAKE" = x; then
17973        { $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
17974$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;}
17975      else
17976        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17977          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17978            MAKE_EXPECTED_ENV='cygwin'
17979          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17980            MAKE_EXPECTED_ENV='msys'
17981          else
17982            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17983          fi
17984          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17985          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17986        else
17987          # Not relevant for non-Windows
17988          IS_MAKE_CORRECT_ENV=true
17989        fi
17990        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17991          { $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
17992$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;}
17993        else
17994          FOUND_MAKE=$MAKE_CANDIDATE
17995
17996  # Only process if variable expands to non-empty
17997
17998  if test "x$FOUND_MAKE" != x; then
17999    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18000
18001  # First separate the path from the arguments. This will split at the first
18002  # space.
18003  complete="$FOUND_MAKE"
18004  path="${complete%% *}"
18005  tmp="$complete EOL"
18006  arguments="${tmp#* }"
18007
18008  # Input might be given as Windows format, start by converting to
18009  # unix format.
18010  new_path=`$CYGPATH -u "$path"`
18011
18012  # Now try to locate executable using which
18013  new_path=`$WHICH "$new_path" 2> /dev/null`
18014  # bat and cmd files are not always considered executable in cygwin causing which
18015  # to not find them
18016  if test "x$new_path" = x \
18017      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18018      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18019    new_path=`$CYGPATH -u "$path"`
18020  fi
18021  if test "x$new_path" = x; then
18022    # Oops. Which didn't find the executable.
18023    # The splitting of arguments from the executable at a space might have been incorrect,
18024    # since paths with space are more likely in Windows. Give it another try with the whole
18025    # argument.
18026    path="$complete"
18027    arguments="EOL"
18028    new_path=`$CYGPATH -u "$path"`
18029    new_path=`$WHICH "$new_path" 2> /dev/null`
18030    # bat and cmd files are not always considered executable in cygwin causing which
18031    # to not find them
18032    if test "x$new_path" = x \
18033        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18034        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18035      new_path=`$CYGPATH -u "$path"`
18036    fi
18037    if test "x$new_path" = x; then
18038      # It's still not found. Now this is an unrecoverable error.
18039      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18040$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18041      has_space=`$ECHO "$complete" | $GREP " "`
18042      if test "x$has_space" != x; then
18043        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18044$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18045      fi
18046      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18047    fi
18048  fi
18049
18050  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18051  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18052  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18053  # "foo.exe" is OK but "foo" is an error.
18054  #
18055  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18056  # It is also a way to make sure we got the proper file name for the real test later on.
18057  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18058  if test "x$test_shortpath" = x; then
18059    # Short path failed, file does not exist as specified.
18060    # Try adding .exe or .cmd
18061    if test -f "${new_path}.exe"; then
18062      input_to_shortpath="${new_path}.exe"
18063    elif test -f "${new_path}.cmd"; then
18064      input_to_shortpath="${new_path}.cmd"
18065    else
18066      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18067$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18068      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18069$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18070      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18071    fi
18072  else
18073    input_to_shortpath="$new_path"
18074  fi
18075
18076  # Call helper function which possibly converts this using DOS-style short mode.
18077  # If so, the updated path is stored in $new_path.
18078  new_path="$input_to_shortpath"
18079
18080  input_path="$input_to_shortpath"
18081  # Check if we need to convert this using DOS-style short mode. If the path
18082  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18083  # take no chances and rewrite it.
18084  # Note: m4 eats our [], so we need to use [ and ] instead.
18085  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18086  if test "x$has_forbidden_chars" != x; then
18087    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18088    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18089    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18090    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18091      # Going to short mode and back again did indeed matter. Since short mode is
18092      # case insensitive, let's make it lowercase to improve readability.
18093      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18094      # Now convert it back to Unix-style (cygpath)
18095      input_path=`$CYGPATH -u "$shortmode_path"`
18096      new_path="$input_path"
18097    fi
18098  fi
18099
18100  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18101  if test "x$test_cygdrive_prefix" = x; then
18102    # As a simple fix, exclude /usr/bin since it's not a real path.
18103    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18104      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18105      # a path prefixed by /cygdrive for fixpath to work.
18106      new_path="$CYGWIN_ROOT_PATH$input_path"
18107    fi
18108  fi
18109
18110  # remove trailing .exe if any
18111  new_path="${new_path/%.exe/}"
18112
18113    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18114
18115  # First separate the path from the arguments. This will split at the first
18116  # space.
18117  complete="$FOUND_MAKE"
18118  path="${complete%% *}"
18119  tmp="$complete EOL"
18120  arguments="${tmp#* }"
18121
18122  # Input might be given as Windows format, start by converting to
18123  # unix format.
18124  new_path="$path"
18125
18126  windows_path="$new_path"
18127  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18128    unix_path=`$CYGPATH -u "$windows_path"`
18129    new_path="$unix_path"
18130  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18131    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18132    new_path="$unix_path"
18133  fi
18134
18135
18136  # Now try to locate executable using which
18137  new_path=`$WHICH "$new_path" 2> /dev/null`
18138
18139  if test "x$new_path" = x; then
18140    # Oops. Which didn't find the executable.
18141    # The splitting of arguments from the executable at a space might have been incorrect,
18142    # since paths with space are more likely in Windows. Give it another try with the whole
18143    # argument.
18144    path="$complete"
18145    arguments="EOL"
18146    new_path="$path"
18147
18148  windows_path="$new_path"
18149  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18150    unix_path=`$CYGPATH -u "$windows_path"`
18151    new_path="$unix_path"
18152  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18153    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18154    new_path="$unix_path"
18155  fi
18156
18157
18158    new_path=`$WHICH "$new_path" 2> /dev/null`
18159    # bat and cmd files are not always considered executable in MSYS causing which
18160    # to not find them
18161    if test "x$new_path" = x \
18162        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18163        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18164      new_path="$path"
18165
18166  windows_path="$new_path"
18167  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18168    unix_path=`$CYGPATH -u "$windows_path"`
18169    new_path="$unix_path"
18170  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18171    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18172    new_path="$unix_path"
18173  fi
18174
18175    fi
18176
18177    if test "x$new_path" = x; then
18178      # It's still not found. Now this is an unrecoverable error.
18179      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18180$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18181      has_space=`$ECHO "$complete" | $GREP " "`
18182      if test "x$has_space" != x; then
18183        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18184$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18185      fi
18186      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18187    fi
18188  fi
18189
18190  # Now new_path has a complete unix path to the binary
18191  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18192    # Keep paths in /bin as-is, but remove trailing .exe if any
18193    new_path="${new_path/%.exe/}"
18194    # Do not save /bin paths to all_fixpath_prefixes!
18195  else
18196    # Not in mixed or Windows style, start by that.
18197    new_path=`cmd //c echo $new_path`
18198
18199  input_path="$new_path"
18200  # Check if we need to convert this using DOS-style short mode. If the path
18201  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18202  # take no chances and rewrite it.
18203  # Note: m4 eats our [], so we need to use [ and ] instead.
18204  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18205  if test "x$has_forbidden_chars" != x; then
18206    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18207    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18208  fi
18209
18210    # Output is in $new_path
18211
18212  windows_path="$new_path"
18213  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18214    unix_path=`$CYGPATH -u "$windows_path"`
18215    new_path="$unix_path"
18216  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18217    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18218    new_path="$unix_path"
18219  fi
18220
18221    # remove trailing .exe if any
18222    new_path="${new_path/%.exe/}"
18223
18224    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18225    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18226  fi
18227
18228    else
18229      # We're on a unix platform. Hooray! :)
18230      # First separate the path from the arguments. This will split at the first
18231      # space.
18232      complete="$FOUND_MAKE"
18233      path="${complete%% *}"
18234      tmp="$complete EOL"
18235      arguments="${tmp#* }"
18236
18237      # Cannot rely on the command "which" here since it doesn't always work.
18238      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18239      if test -z "$is_absolute_path"; then
18240        # Path to executable is not absolute. Find it.
18241        IFS_save="$IFS"
18242        IFS=:
18243        for p in $PATH; do
18244          if test -f "$p/$path" && test -x "$p/$path"; then
18245            new_path="$p/$path"
18246            break
18247          fi
18248        done
18249        IFS="$IFS_save"
18250      else
18251        # This is an absolute path, we can use it without further modifications.
18252        new_path="$path"
18253      fi
18254
18255      if test "x$new_path" = x; then
18256        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18257$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18258        has_space=`$ECHO "$complete" | $GREP " "`
18259        if test "x$has_space" != x; then
18260          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18261$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18262        fi
18263        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18264      fi
18265    fi
18266
18267    # Now join together the path and the arguments once again
18268    if test "x$arguments" != xEOL; then
18269      new_complete="$new_path ${arguments% *}"
18270    else
18271      new_complete="$new_path"
18272    fi
18273
18274    if test "x$complete" != "x$new_complete"; then
18275      FOUND_MAKE="$new_complete"
18276      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18277$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18278    fi
18279  fi
18280
18281        fi
18282      fi
18283    fi
18284  fi
18285
18286    fi
18287
18288    if test "x$FOUND_MAKE" = x; then
18289      if test "x$TOOLCHAIN_PATH" != x; then
18290        # We have a toolchain path, check that as well before giving up.
18291        OLD_PATH=$PATH
18292        PATH=$TOOLCHAIN_PATH:$PATH
18293        for ac_prog in gmake
18294do
18295  # Extract the first word of "$ac_prog", so it can be a program name with args.
18296set dummy $ac_prog; ac_word=$2
18297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18298$as_echo_n "checking for $ac_word... " >&6; }
18299if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18300  $as_echo_n "(cached) " >&6
18301else
18302  case $CHECK_TOOLSDIR_GMAKE in
18303  [\\/]* | ?:[\\/]*)
18304  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18305  ;;
18306  *)
18307  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18308for as_dir in $PATH
18309do
18310  IFS=$as_save_IFS
18311  test -z "$as_dir" && as_dir=.
18312    for ac_exec_ext in '' $ac_executable_extensions; do
18313  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18314    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18315    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18316    break 2
18317  fi
18318done
18319  done
18320IFS=$as_save_IFS
18321
18322  ;;
18323esac
18324fi
18325CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18326if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18328$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18329else
18330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18331$as_echo "no" >&6; }
18332fi
18333
18334
18335  test -n "$CHECK_TOOLSDIR_GMAKE" && break
18336done
18337
18338
18339  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18340  DESCRIPTION="gmake in tools-dir"
18341
18342  # On Cygwin, we require a newer version of make than on other platforms
18343  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18344    MAKE_VERSION_EXPR="-e 4\."
18345    MAKE_REQUIRED_VERSION="4.0"
18346   else
18347    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18348    MAKE_REQUIRED_VERSION="3.81"
18349  fi
18350
18351  if test "x$MAKE_CANDIDATE" != x; then
18352    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18353$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18354    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18355    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18356    if test "x$IS_GNU_MAKE" = x; then
18357      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18358$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18359    else
18360      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18361      if test "x$IS_MODERN_MAKE" = x; then
18362        { $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
18363$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;}
18364      else
18365        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18366          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18367            MAKE_EXPECTED_ENV='cygwin'
18368          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18369            MAKE_EXPECTED_ENV='msys'
18370          else
18371            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18372          fi
18373          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18374          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18375        else
18376          # Not relevant for non-Windows
18377          IS_MAKE_CORRECT_ENV=true
18378        fi
18379        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18380          { $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
18381$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;}
18382        else
18383          FOUND_MAKE=$MAKE_CANDIDATE
18384
18385  # Only process if variable expands to non-empty
18386
18387  if test "x$FOUND_MAKE" != x; then
18388    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18389
18390  # First separate the path from the arguments. This will split at the first
18391  # space.
18392  complete="$FOUND_MAKE"
18393  path="${complete%% *}"
18394  tmp="$complete EOL"
18395  arguments="${tmp#* }"
18396
18397  # Input might be given as Windows format, start by converting to
18398  # unix format.
18399  new_path=`$CYGPATH -u "$path"`
18400
18401  # Now try to locate executable using which
18402  new_path=`$WHICH "$new_path" 2> /dev/null`
18403  # bat and cmd files are not always considered executable in cygwin causing which
18404  # to not find them
18405  if test "x$new_path" = x \
18406      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18407      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18408    new_path=`$CYGPATH -u "$path"`
18409  fi
18410  if test "x$new_path" = x; then
18411    # Oops. Which didn't find the executable.
18412    # The splitting of arguments from the executable at a space might have been incorrect,
18413    # since paths with space are more likely in Windows. Give it another try with the whole
18414    # argument.
18415    path="$complete"
18416    arguments="EOL"
18417    new_path=`$CYGPATH -u "$path"`
18418    new_path=`$WHICH "$new_path" 2> /dev/null`
18419    # bat and cmd files are not always considered executable in cygwin causing which
18420    # to not find them
18421    if test "x$new_path" = x \
18422        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18423        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18424      new_path=`$CYGPATH -u "$path"`
18425    fi
18426    if test "x$new_path" = x; then
18427      # It's still not found. Now this is an unrecoverable error.
18428      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18429$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18430      has_space=`$ECHO "$complete" | $GREP " "`
18431      if test "x$has_space" != x; then
18432        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18433$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18434      fi
18435      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18436    fi
18437  fi
18438
18439  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18440  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18441  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18442  # "foo.exe" is OK but "foo" is an error.
18443  #
18444  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18445  # It is also a way to make sure we got the proper file name for the real test later on.
18446  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18447  if test "x$test_shortpath" = x; then
18448    # Short path failed, file does not exist as specified.
18449    # Try adding .exe or .cmd
18450    if test -f "${new_path}.exe"; then
18451      input_to_shortpath="${new_path}.exe"
18452    elif test -f "${new_path}.cmd"; then
18453      input_to_shortpath="${new_path}.cmd"
18454    else
18455      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18456$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18457      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18458$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18459      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18460    fi
18461  else
18462    input_to_shortpath="$new_path"
18463  fi
18464
18465  # Call helper function which possibly converts this using DOS-style short mode.
18466  # If so, the updated path is stored in $new_path.
18467  new_path="$input_to_shortpath"
18468
18469  input_path="$input_to_shortpath"
18470  # Check if we need to convert this using DOS-style short mode. If the path
18471  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18472  # take no chances and rewrite it.
18473  # Note: m4 eats our [], so we need to use [ and ] instead.
18474  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18475  if test "x$has_forbidden_chars" != x; then
18476    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18477    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18478    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18479    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18480      # Going to short mode and back again did indeed matter. Since short mode is
18481      # case insensitive, let's make it lowercase to improve readability.
18482      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18483      # Now convert it back to Unix-style (cygpath)
18484      input_path=`$CYGPATH -u "$shortmode_path"`
18485      new_path="$input_path"
18486    fi
18487  fi
18488
18489  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18490  if test "x$test_cygdrive_prefix" = x; then
18491    # As a simple fix, exclude /usr/bin since it's not a real path.
18492    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18493      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18494      # a path prefixed by /cygdrive for fixpath to work.
18495      new_path="$CYGWIN_ROOT_PATH$input_path"
18496    fi
18497  fi
18498
18499  # remove trailing .exe if any
18500  new_path="${new_path/%.exe/}"
18501
18502    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18503
18504  # First separate the path from the arguments. This will split at the first
18505  # space.
18506  complete="$FOUND_MAKE"
18507  path="${complete%% *}"
18508  tmp="$complete EOL"
18509  arguments="${tmp#* }"
18510
18511  # Input might be given as Windows format, start by converting to
18512  # unix format.
18513  new_path="$path"
18514
18515  windows_path="$new_path"
18516  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18517    unix_path=`$CYGPATH -u "$windows_path"`
18518    new_path="$unix_path"
18519  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18520    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18521    new_path="$unix_path"
18522  fi
18523
18524
18525  # Now try to locate executable using which
18526  new_path=`$WHICH "$new_path" 2> /dev/null`
18527
18528  if test "x$new_path" = x; then
18529    # Oops. Which didn't find the executable.
18530    # The splitting of arguments from the executable at a space might have been incorrect,
18531    # since paths with space are more likely in Windows. Give it another try with the whole
18532    # argument.
18533    path="$complete"
18534    arguments="EOL"
18535    new_path="$path"
18536
18537  windows_path="$new_path"
18538  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18539    unix_path=`$CYGPATH -u "$windows_path"`
18540    new_path="$unix_path"
18541  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18542    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18543    new_path="$unix_path"
18544  fi
18545
18546
18547    new_path=`$WHICH "$new_path" 2> /dev/null`
18548    # bat and cmd files are not always considered executable in MSYS causing which
18549    # to not find them
18550    if test "x$new_path" = x \
18551        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18552        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18553      new_path="$path"
18554
18555  windows_path="$new_path"
18556  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18557    unix_path=`$CYGPATH -u "$windows_path"`
18558    new_path="$unix_path"
18559  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18560    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18561    new_path="$unix_path"
18562  fi
18563
18564    fi
18565
18566    if test "x$new_path" = x; then
18567      # It's still not found. Now this is an unrecoverable error.
18568      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18569$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18570      has_space=`$ECHO "$complete" | $GREP " "`
18571      if test "x$has_space" != x; then
18572        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18573$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18574      fi
18575      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18576    fi
18577  fi
18578
18579  # Now new_path has a complete unix path to the binary
18580  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18581    # Keep paths in /bin as-is, but remove trailing .exe if any
18582    new_path="${new_path/%.exe/}"
18583    # Do not save /bin paths to all_fixpath_prefixes!
18584  else
18585    # Not in mixed or Windows style, start by that.
18586    new_path=`cmd //c echo $new_path`
18587
18588  input_path="$new_path"
18589  # Check if we need to convert this using DOS-style short mode. If the path
18590  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18591  # take no chances and rewrite it.
18592  # Note: m4 eats our [], so we need to use [ and ] instead.
18593  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18594  if test "x$has_forbidden_chars" != x; then
18595    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18596    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18597  fi
18598
18599    # Output is in $new_path
18600
18601  windows_path="$new_path"
18602  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18603    unix_path=`$CYGPATH -u "$windows_path"`
18604    new_path="$unix_path"
18605  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18606    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18607    new_path="$unix_path"
18608  fi
18609
18610    # remove trailing .exe if any
18611    new_path="${new_path/%.exe/}"
18612
18613    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18614    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18615  fi
18616
18617    else
18618      # We're on a unix platform. Hooray! :)
18619      # First separate the path from the arguments. This will split at the first
18620      # space.
18621      complete="$FOUND_MAKE"
18622      path="${complete%% *}"
18623      tmp="$complete EOL"
18624      arguments="${tmp#* }"
18625
18626      # Cannot rely on the command "which" here since it doesn't always work.
18627      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18628      if test -z "$is_absolute_path"; then
18629        # Path to executable is not absolute. Find it.
18630        IFS_save="$IFS"
18631        IFS=:
18632        for p in $PATH; do
18633          if test -f "$p/$path" && test -x "$p/$path"; then
18634            new_path="$p/$path"
18635            break
18636          fi
18637        done
18638        IFS="$IFS_save"
18639      else
18640        # This is an absolute path, we can use it without further modifications.
18641        new_path="$path"
18642      fi
18643
18644      if test "x$new_path" = x; then
18645        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18646$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18647        has_space=`$ECHO "$complete" | $GREP " "`
18648        if test "x$has_space" != x; then
18649          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18650$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18651        fi
18652        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18653      fi
18654    fi
18655
18656    # Now join together the path and the arguments once again
18657    if test "x$arguments" != xEOL; then
18658      new_complete="$new_path ${arguments% *}"
18659    else
18660      new_complete="$new_path"
18661    fi
18662
18663    if test "x$complete" != "x$new_complete"; then
18664      FOUND_MAKE="$new_complete"
18665      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18666$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18667    fi
18668  fi
18669
18670        fi
18671      fi
18672    fi
18673  fi
18674
18675        if test "x$FOUND_MAKE" = x; then
18676          for ac_prog in make
18677do
18678  # Extract the first word of "$ac_prog", so it can be a program name with args.
18679set dummy $ac_prog; ac_word=$2
18680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18681$as_echo_n "checking for $ac_word... " >&6; }
18682if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
18683  $as_echo_n "(cached) " >&6
18684else
18685  case $CHECK_TOOLSDIR_MAKE in
18686  [\\/]* | ?:[\\/]*)
18687  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
18688  ;;
18689  *)
18690  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18691for as_dir in $PATH
18692do
18693  IFS=$as_save_IFS
18694  test -z "$as_dir" && as_dir=.
18695    for ac_exec_ext in '' $ac_executable_extensions; do
18696  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18697    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18698    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18699    break 2
18700  fi
18701done
18702  done
18703IFS=$as_save_IFS
18704
18705  ;;
18706esac
18707fi
18708CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18709if test -n "$CHECK_TOOLSDIR_MAKE"; then
18710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
18711$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
18712else
18713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18714$as_echo "no" >&6; }
18715fi
18716
18717
18718  test -n "$CHECK_TOOLSDIR_MAKE" && break
18719done
18720
18721
18722  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
18723  DESCRIPTION="make in tools-dir"
18724
18725  # On Cygwin, we require a newer version of make than on other platforms
18726  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18727    MAKE_VERSION_EXPR="-e 4\."
18728    MAKE_REQUIRED_VERSION="4.0"
18729   else
18730    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18731    MAKE_REQUIRED_VERSION="3.81"
18732  fi
18733
18734  if test "x$MAKE_CANDIDATE" != x; then
18735    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18736$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18737    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18738    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18739    if test "x$IS_GNU_MAKE" = x; then
18740      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18741$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18742    else
18743      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18744      if test "x$IS_MODERN_MAKE" = x; then
18745        { $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
18746$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;}
18747      else
18748        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18749          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18750            MAKE_EXPECTED_ENV='cygwin'
18751          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18752            MAKE_EXPECTED_ENV='msys'
18753          else
18754            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18755          fi
18756          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18757          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18758        else
18759          # Not relevant for non-Windows
18760          IS_MAKE_CORRECT_ENV=true
18761        fi
18762        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18763          { $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
18764$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;}
18765        else
18766          FOUND_MAKE=$MAKE_CANDIDATE
18767
18768  # Only process if variable expands to non-empty
18769
18770  if test "x$FOUND_MAKE" != x; then
18771    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18772
18773  # First separate the path from the arguments. This will split at the first
18774  # space.
18775  complete="$FOUND_MAKE"
18776  path="${complete%% *}"
18777  tmp="$complete EOL"
18778  arguments="${tmp#* }"
18779
18780  # Input might be given as Windows format, start by converting to
18781  # unix format.
18782  new_path=`$CYGPATH -u "$path"`
18783
18784  # Now try to locate executable using which
18785  new_path=`$WHICH "$new_path" 2> /dev/null`
18786  # bat and cmd files are not always considered executable in cygwin causing which
18787  # to not find them
18788  if test "x$new_path" = x \
18789      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18790      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18791    new_path=`$CYGPATH -u "$path"`
18792  fi
18793  if test "x$new_path" = x; then
18794    # Oops. Which didn't find the executable.
18795    # The splitting of arguments from the executable at a space might have been incorrect,
18796    # since paths with space are more likely in Windows. Give it another try with the whole
18797    # argument.
18798    path="$complete"
18799    arguments="EOL"
18800    new_path=`$CYGPATH -u "$path"`
18801    new_path=`$WHICH "$new_path" 2> /dev/null`
18802    # bat and cmd files are not always considered executable in cygwin causing which
18803    # to not find them
18804    if test "x$new_path" = x \
18805        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18806        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18807      new_path=`$CYGPATH -u "$path"`
18808    fi
18809    if test "x$new_path" = x; then
18810      # It's still not found. Now this is an unrecoverable error.
18811      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18812$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18813      has_space=`$ECHO "$complete" | $GREP " "`
18814      if test "x$has_space" != x; then
18815        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18816$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18817      fi
18818      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18819    fi
18820  fi
18821
18822  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18823  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18824  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18825  # "foo.exe" is OK but "foo" is an error.
18826  #
18827  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18828  # It is also a way to make sure we got the proper file name for the real test later on.
18829  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18830  if test "x$test_shortpath" = x; then
18831    # Short path failed, file does not exist as specified.
18832    # Try adding .exe or .cmd
18833    if test -f "${new_path}.exe"; then
18834      input_to_shortpath="${new_path}.exe"
18835    elif test -f "${new_path}.cmd"; then
18836      input_to_shortpath="${new_path}.cmd"
18837    else
18838      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18839$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18840      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18841$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18842      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18843    fi
18844  else
18845    input_to_shortpath="$new_path"
18846  fi
18847
18848  # Call helper function which possibly converts this using DOS-style short mode.
18849  # If so, the updated path is stored in $new_path.
18850  new_path="$input_to_shortpath"
18851
18852  input_path="$input_to_shortpath"
18853  # Check if we need to convert this using DOS-style short mode. If the path
18854  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18855  # take no chances and rewrite it.
18856  # Note: m4 eats our [], so we need to use [ and ] instead.
18857  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18858  if test "x$has_forbidden_chars" != x; then
18859    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18860    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18861    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18862    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18863      # Going to short mode and back again did indeed matter. Since short mode is
18864      # case insensitive, let's make it lowercase to improve readability.
18865      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18866      # Now convert it back to Unix-style (cygpath)
18867      input_path=`$CYGPATH -u "$shortmode_path"`
18868      new_path="$input_path"
18869    fi
18870  fi
18871
18872  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18873  if test "x$test_cygdrive_prefix" = x; then
18874    # As a simple fix, exclude /usr/bin since it's not a real path.
18875    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18876      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18877      # a path prefixed by /cygdrive for fixpath to work.
18878      new_path="$CYGWIN_ROOT_PATH$input_path"
18879    fi
18880  fi
18881
18882  # remove trailing .exe if any
18883  new_path="${new_path/%.exe/}"
18884
18885    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18886
18887  # First separate the path from the arguments. This will split at the first
18888  # space.
18889  complete="$FOUND_MAKE"
18890  path="${complete%% *}"
18891  tmp="$complete EOL"
18892  arguments="${tmp#* }"
18893
18894  # Input might be given as Windows format, start by converting to
18895  # unix format.
18896  new_path="$path"
18897
18898  windows_path="$new_path"
18899  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18900    unix_path=`$CYGPATH -u "$windows_path"`
18901    new_path="$unix_path"
18902  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18903    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18904    new_path="$unix_path"
18905  fi
18906
18907
18908  # Now try to locate executable using which
18909  new_path=`$WHICH "$new_path" 2> /dev/null`
18910
18911  if test "x$new_path" = x; then
18912    # Oops. Which didn't find the executable.
18913    # The splitting of arguments from the executable at a space might have been incorrect,
18914    # since paths with space are more likely in Windows. Give it another try with the whole
18915    # argument.
18916    path="$complete"
18917    arguments="EOL"
18918    new_path="$path"
18919
18920  windows_path="$new_path"
18921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18922    unix_path=`$CYGPATH -u "$windows_path"`
18923    new_path="$unix_path"
18924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18925    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18926    new_path="$unix_path"
18927  fi
18928
18929
18930    new_path=`$WHICH "$new_path" 2> /dev/null`
18931    # bat and cmd files are not always considered executable in MSYS causing which
18932    # to not find them
18933    if test "x$new_path" = x \
18934        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18935        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18936      new_path="$path"
18937
18938  windows_path="$new_path"
18939  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18940    unix_path=`$CYGPATH -u "$windows_path"`
18941    new_path="$unix_path"
18942  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18943    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18944    new_path="$unix_path"
18945  fi
18946
18947    fi
18948
18949    if test "x$new_path" = x; then
18950      # It's still not found. Now this is an unrecoverable error.
18951      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18952$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18953      has_space=`$ECHO "$complete" | $GREP " "`
18954      if test "x$has_space" != x; then
18955        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18956$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18957      fi
18958      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18959    fi
18960  fi
18961
18962  # Now new_path has a complete unix path to the binary
18963  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18964    # Keep paths in /bin as-is, but remove trailing .exe if any
18965    new_path="${new_path/%.exe/}"
18966    # Do not save /bin paths to all_fixpath_prefixes!
18967  else
18968    # Not in mixed or Windows style, start by that.
18969    new_path=`cmd //c echo $new_path`
18970
18971  input_path="$new_path"
18972  # Check if we need to convert this using DOS-style short mode. If the path
18973  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18974  # take no chances and rewrite it.
18975  # Note: m4 eats our [], so we need to use [ and ] instead.
18976  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18977  if test "x$has_forbidden_chars" != x; then
18978    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18979    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18980  fi
18981
18982    # Output is in $new_path
18983
18984  windows_path="$new_path"
18985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18986    unix_path=`$CYGPATH -u "$windows_path"`
18987    new_path="$unix_path"
18988  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18989    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18990    new_path="$unix_path"
18991  fi
18992
18993    # remove trailing .exe if any
18994    new_path="${new_path/%.exe/}"
18995
18996    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18997    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18998  fi
18999
19000    else
19001      # We're on a unix platform. Hooray! :)
19002      # First separate the path from the arguments. This will split at the first
19003      # space.
19004      complete="$FOUND_MAKE"
19005      path="${complete%% *}"
19006      tmp="$complete EOL"
19007      arguments="${tmp#* }"
19008
19009      # Cannot rely on the command "which" here since it doesn't always work.
19010      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19011      if test -z "$is_absolute_path"; then
19012        # Path to executable is not absolute. Find it.
19013        IFS_save="$IFS"
19014        IFS=:
19015        for p in $PATH; do
19016          if test -f "$p/$path" && test -x "$p/$path"; then
19017            new_path="$p/$path"
19018            break
19019          fi
19020        done
19021        IFS="$IFS_save"
19022      else
19023        # This is an absolute path, we can use it without further modifications.
19024        new_path="$path"
19025      fi
19026
19027      if test "x$new_path" = x; then
19028        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19029$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19030        has_space=`$ECHO "$complete" | $GREP " "`
19031        if test "x$has_space" != x; then
19032          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19033$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19034        fi
19035        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19036      fi
19037    fi
19038
19039    # Now join together the path and the arguments once again
19040    if test "x$arguments" != xEOL; then
19041      new_complete="$new_path ${arguments% *}"
19042    else
19043      new_complete="$new_path"
19044    fi
19045
19046    if test "x$complete" != "x$new_complete"; then
19047      FOUND_MAKE="$new_complete"
19048      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19049$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19050    fi
19051  fi
19052
19053        fi
19054      fi
19055    fi
19056  fi
19057
19058        fi
19059        PATH=$OLD_PATH
19060      fi
19061    fi
19062
19063    if test "x$FOUND_MAKE" = x; then
19064      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
19065    fi
19066
19067  else
19068    # The variable is set, but is it from the command line or the environment?
19069
19070    # Try to remove the string !MAKE! from our list.
19071    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
19072    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19073      # If it failed, the variable was not from the command line. Ignore it,
19074      # but warn the user (except for BASH, which is always set by the calling BASH).
19075      if test "xMAKE" != xBASH; then
19076        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
19077$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
19078      fi
19079      # Try to locate tool using the code snippet
19080
19081    # Try our hardest to locate a correct version of GNU make
19082    for ac_prog in gmake
19083do
19084  # Extract the first word of "$ac_prog", so it can be a program name with args.
19085set dummy $ac_prog; ac_word=$2
19086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19087$as_echo_n "checking for $ac_word... " >&6; }
19088if ${ac_cv_path_CHECK_GMAKE+:} false; then :
19089  $as_echo_n "(cached) " >&6
19090else
19091  case $CHECK_GMAKE in
19092  [\\/]* | ?:[\\/]*)
19093  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
19094  ;;
19095  *)
19096  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19097for as_dir in $PATH
19098do
19099  IFS=$as_save_IFS
19100  test -z "$as_dir" && as_dir=.
19101    for ac_exec_ext in '' $ac_executable_extensions; do
19102  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19103    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19104    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19105    break 2
19106  fi
19107done
19108  done
19109IFS=$as_save_IFS
19110
19111  ;;
19112esac
19113fi
19114CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
19115if test -n "$CHECK_GMAKE"; then
19116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
19117$as_echo "$CHECK_GMAKE" >&6; }
19118else
19119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19120$as_echo "no" >&6; }
19121fi
19122
19123
19124  test -n "$CHECK_GMAKE" && break
19125done
19126
19127
19128  MAKE_CANDIDATE=""$CHECK_GMAKE""
19129  DESCRIPTION="gmake in PATH"
19130
19131  # On Cygwin, we require a newer version of make than on other platforms
19132  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19133    MAKE_VERSION_EXPR="-e 4\."
19134    MAKE_REQUIRED_VERSION="4.0"
19135   else
19136    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19137    MAKE_REQUIRED_VERSION="3.81"
19138  fi
19139
19140  if test "x$MAKE_CANDIDATE" != x; then
19141    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19142$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19143    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19144    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19145    if test "x$IS_GNU_MAKE" = x; then
19146      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19147$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19148    else
19149      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19150      if test "x$IS_MODERN_MAKE" = x; then
19151        { $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
19152$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;}
19153      else
19154        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19155          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19156            MAKE_EXPECTED_ENV='cygwin'
19157          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19158            MAKE_EXPECTED_ENV='msys'
19159          else
19160            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19161          fi
19162          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19163          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19164        else
19165          # Not relevant for non-Windows
19166          IS_MAKE_CORRECT_ENV=true
19167        fi
19168        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19169          { $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
19170$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;}
19171        else
19172          FOUND_MAKE=$MAKE_CANDIDATE
19173
19174  # Only process if variable expands to non-empty
19175
19176  if test "x$FOUND_MAKE" != x; then
19177    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19178
19179  # First separate the path from the arguments. This will split at the first
19180  # space.
19181  complete="$FOUND_MAKE"
19182  path="${complete%% *}"
19183  tmp="$complete EOL"
19184  arguments="${tmp#* }"
19185
19186  # Input might be given as Windows format, start by converting to
19187  # unix format.
19188  new_path=`$CYGPATH -u "$path"`
19189
19190  # Now try to locate executable using which
19191  new_path=`$WHICH "$new_path" 2> /dev/null`
19192  # bat and cmd files are not always considered executable in cygwin causing which
19193  # to not find them
19194  if test "x$new_path" = x \
19195      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19196      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19197    new_path=`$CYGPATH -u "$path"`
19198  fi
19199  if test "x$new_path" = x; then
19200    # Oops. Which didn't find the executable.
19201    # The splitting of arguments from the executable at a space might have been incorrect,
19202    # since paths with space are more likely in Windows. Give it another try with the whole
19203    # argument.
19204    path="$complete"
19205    arguments="EOL"
19206    new_path=`$CYGPATH -u "$path"`
19207    new_path=`$WHICH "$new_path" 2> /dev/null`
19208    # bat and cmd files are not always considered executable in cygwin causing which
19209    # to not find them
19210    if test "x$new_path" = x \
19211        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19212        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19213      new_path=`$CYGPATH -u "$path"`
19214    fi
19215    if test "x$new_path" = x; then
19216      # It's still not found. Now this is an unrecoverable error.
19217      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19218$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19219      has_space=`$ECHO "$complete" | $GREP " "`
19220      if test "x$has_space" != x; then
19221        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19222$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19223      fi
19224      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19225    fi
19226  fi
19227
19228  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19229  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19230  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19231  # "foo.exe" is OK but "foo" is an error.
19232  #
19233  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19234  # It is also a way to make sure we got the proper file name for the real test later on.
19235  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19236  if test "x$test_shortpath" = x; then
19237    # Short path failed, file does not exist as specified.
19238    # Try adding .exe or .cmd
19239    if test -f "${new_path}.exe"; then
19240      input_to_shortpath="${new_path}.exe"
19241    elif test -f "${new_path}.cmd"; then
19242      input_to_shortpath="${new_path}.cmd"
19243    else
19244      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19245$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19246      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19247$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19248      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19249    fi
19250  else
19251    input_to_shortpath="$new_path"
19252  fi
19253
19254  # Call helper function which possibly converts this using DOS-style short mode.
19255  # If so, the updated path is stored in $new_path.
19256  new_path="$input_to_shortpath"
19257
19258  input_path="$input_to_shortpath"
19259  # Check if we need to convert this using DOS-style short mode. If the path
19260  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19261  # take no chances and rewrite it.
19262  # Note: m4 eats our [], so we need to use [ and ] instead.
19263  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19264  if test "x$has_forbidden_chars" != x; then
19265    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19266    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19267    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19268    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19269      # Going to short mode and back again did indeed matter. Since short mode is
19270      # case insensitive, let's make it lowercase to improve readability.
19271      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19272      # Now convert it back to Unix-style (cygpath)
19273      input_path=`$CYGPATH -u "$shortmode_path"`
19274      new_path="$input_path"
19275    fi
19276  fi
19277
19278  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19279  if test "x$test_cygdrive_prefix" = x; then
19280    # As a simple fix, exclude /usr/bin since it's not a real path.
19281    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19282      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19283      # a path prefixed by /cygdrive for fixpath to work.
19284      new_path="$CYGWIN_ROOT_PATH$input_path"
19285    fi
19286  fi
19287
19288  # remove trailing .exe if any
19289  new_path="${new_path/%.exe/}"
19290
19291    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19292
19293  # First separate the path from the arguments. This will split at the first
19294  # space.
19295  complete="$FOUND_MAKE"
19296  path="${complete%% *}"
19297  tmp="$complete EOL"
19298  arguments="${tmp#* }"
19299
19300  # Input might be given as Windows format, start by converting to
19301  # unix format.
19302  new_path="$path"
19303
19304  windows_path="$new_path"
19305  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19306    unix_path=`$CYGPATH -u "$windows_path"`
19307    new_path="$unix_path"
19308  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19309    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19310    new_path="$unix_path"
19311  fi
19312
19313
19314  # Now try to locate executable using which
19315  new_path=`$WHICH "$new_path" 2> /dev/null`
19316
19317  if test "x$new_path" = x; then
19318    # Oops. Which didn't find the executable.
19319    # The splitting of arguments from the executable at a space might have been incorrect,
19320    # since paths with space are more likely in Windows. Give it another try with the whole
19321    # argument.
19322    path="$complete"
19323    arguments="EOL"
19324    new_path="$path"
19325
19326  windows_path="$new_path"
19327  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19328    unix_path=`$CYGPATH -u "$windows_path"`
19329    new_path="$unix_path"
19330  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19331    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19332    new_path="$unix_path"
19333  fi
19334
19335
19336    new_path=`$WHICH "$new_path" 2> /dev/null`
19337    # bat and cmd files are not always considered executable in MSYS causing which
19338    # to not find them
19339    if test "x$new_path" = x \
19340        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19341        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19342      new_path="$path"
19343
19344  windows_path="$new_path"
19345  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19346    unix_path=`$CYGPATH -u "$windows_path"`
19347    new_path="$unix_path"
19348  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19349    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19350    new_path="$unix_path"
19351  fi
19352
19353    fi
19354
19355    if test "x$new_path" = x; then
19356      # It's still not found. Now this is an unrecoverable error.
19357      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19358$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19359      has_space=`$ECHO "$complete" | $GREP " "`
19360      if test "x$has_space" != x; then
19361        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19362$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19363      fi
19364      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19365    fi
19366  fi
19367
19368  # Now new_path has a complete unix path to the binary
19369  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19370    # Keep paths in /bin as-is, but remove trailing .exe if any
19371    new_path="${new_path/%.exe/}"
19372    # Do not save /bin paths to all_fixpath_prefixes!
19373  else
19374    # Not in mixed or Windows style, start by that.
19375    new_path=`cmd //c echo $new_path`
19376
19377  input_path="$new_path"
19378  # Check if we need to convert this using DOS-style short mode. If the path
19379  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19380  # take no chances and rewrite it.
19381  # Note: m4 eats our [], so we need to use [ and ] instead.
19382  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19383  if test "x$has_forbidden_chars" != x; then
19384    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19385    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19386  fi
19387
19388    # Output is in $new_path
19389
19390  windows_path="$new_path"
19391  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19392    unix_path=`$CYGPATH -u "$windows_path"`
19393    new_path="$unix_path"
19394  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19395    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19396    new_path="$unix_path"
19397  fi
19398
19399    # remove trailing .exe if any
19400    new_path="${new_path/%.exe/}"
19401
19402    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19403    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19404  fi
19405
19406    else
19407      # We're on a unix platform. Hooray! :)
19408      # First separate the path from the arguments. This will split at the first
19409      # space.
19410      complete="$FOUND_MAKE"
19411      path="${complete%% *}"
19412      tmp="$complete EOL"
19413      arguments="${tmp#* }"
19414
19415      # Cannot rely on the command "which" here since it doesn't always work.
19416      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19417      if test -z "$is_absolute_path"; then
19418        # Path to executable is not absolute. Find it.
19419        IFS_save="$IFS"
19420        IFS=:
19421        for p in $PATH; do
19422          if test -f "$p/$path" && test -x "$p/$path"; then
19423            new_path="$p/$path"
19424            break
19425          fi
19426        done
19427        IFS="$IFS_save"
19428      else
19429        # This is an absolute path, we can use it without further modifications.
19430        new_path="$path"
19431      fi
19432
19433      if test "x$new_path" = x; then
19434        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19435$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19436        has_space=`$ECHO "$complete" | $GREP " "`
19437        if test "x$has_space" != x; then
19438          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19439$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19440        fi
19441        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19442      fi
19443    fi
19444
19445    # Now join together the path and the arguments once again
19446    if test "x$arguments" != xEOL; then
19447      new_complete="$new_path ${arguments% *}"
19448    else
19449      new_complete="$new_path"
19450    fi
19451
19452    if test "x$complete" != "x$new_complete"; then
19453      FOUND_MAKE="$new_complete"
19454      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19455$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19456    fi
19457  fi
19458
19459        fi
19460      fi
19461    fi
19462  fi
19463
19464
19465    if test "x$FOUND_MAKE" = x; then
19466      for ac_prog in make
19467do
19468  # Extract the first word of "$ac_prog", so it can be a program name with args.
19469set dummy $ac_prog; ac_word=$2
19470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19471$as_echo_n "checking for $ac_word... " >&6; }
19472if ${ac_cv_path_CHECK_MAKE+:} false; then :
19473  $as_echo_n "(cached) " >&6
19474else
19475  case $CHECK_MAKE in
19476  [\\/]* | ?:[\\/]*)
19477  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19478  ;;
19479  *)
19480  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19481for as_dir in $PATH
19482do
19483  IFS=$as_save_IFS
19484  test -z "$as_dir" && as_dir=.
19485    for ac_exec_ext in '' $ac_executable_extensions; do
19486  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19487    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19488    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19489    break 2
19490  fi
19491done
19492  done
19493IFS=$as_save_IFS
19494
19495  ;;
19496esac
19497fi
19498CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19499if test -n "$CHECK_MAKE"; then
19500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19501$as_echo "$CHECK_MAKE" >&6; }
19502else
19503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19504$as_echo "no" >&6; }
19505fi
19506
19507
19508  test -n "$CHECK_MAKE" && break
19509done
19510
19511
19512  MAKE_CANDIDATE=""$CHECK_MAKE""
19513  DESCRIPTION="make in PATH"
19514
19515  # On Cygwin, we require a newer version of make than on other platforms
19516  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19517    MAKE_VERSION_EXPR="-e 4\."
19518    MAKE_REQUIRED_VERSION="4.0"
19519   else
19520    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19521    MAKE_REQUIRED_VERSION="3.81"
19522  fi
19523
19524  if test "x$MAKE_CANDIDATE" != x; then
19525    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19526$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19527    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19528    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19529    if test "x$IS_GNU_MAKE" = x; then
19530      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19531$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19532    else
19533      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19534      if test "x$IS_MODERN_MAKE" = x; then
19535        { $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
19536$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;}
19537      else
19538        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19539          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19540            MAKE_EXPECTED_ENV='cygwin'
19541          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19542            MAKE_EXPECTED_ENV='msys'
19543          else
19544            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19545          fi
19546          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19547          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19548        else
19549          # Not relevant for non-Windows
19550          IS_MAKE_CORRECT_ENV=true
19551        fi
19552        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19553          { $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
19554$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;}
19555        else
19556          FOUND_MAKE=$MAKE_CANDIDATE
19557
19558  # Only process if variable expands to non-empty
19559
19560  if test "x$FOUND_MAKE" != x; then
19561    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19562
19563  # First separate the path from the arguments. This will split at the first
19564  # space.
19565  complete="$FOUND_MAKE"
19566  path="${complete%% *}"
19567  tmp="$complete EOL"
19568  arguments="${tmp#* }"
19569
19570  # Input might be given as Windows format, start by converting to
19571  # unix format.
19572  new_path=`$CYGPATH -u "$path"`
19573
19574  # Now try to locate executable using which
19575  new_path=`$WHICH "$new_path" 2> /dev/null`
19576  # bat and cmd files are not always considered executable in cygwin causing which
19577  # to not find them
19578  if test "x$new_path" = x \
19579      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19580      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19581    new_path=`$CYGPATH -u "$path"`
19582  fi
19583  if test "x$new_path" = x; then
19584    # Oops. Which didn't find the executable.
19585    # The splitting of arguments from the executable at a space might have been incorrect,
19586    # since paths with space are more likely in Windows. Give it another try with the whole
19587    # argument.
19588    path="$complete"
19589    arguments="EOL"
19590    new_path=`$CYGPATH -u "$path"`
19591    new_path=`$WHICH "$new_path" 2> /dev/null`
19592    # bat and cmd files are not always considered executable in cygwin causing which
19593    # to not find them
19594    if test "x$new_path" = x \
19595        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19596        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19597      new_path=`$CYGPATH -u "$path"`
19598    fi
19599    if test "x$new_path" = x; then
19600      # It's still not found. Now this is an unrecoverable error.
19601      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19602$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19603      has_space=`$ECHO "$complete" | $GREP " "`
19604      if test "x$has_space" != x; then
19605        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19606$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19607      fi
19608      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19609    fi
19610  fi
19611
19612  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19613  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19614  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19615  # "foo.exe" is OK but "foo" is an error.
19616  #
19617  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19618  # It is also a way to make sure we got the proper file name for the real test later on.
19619  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19620  if test "x$test_shortpath" = x; then
19621    # Short path failed, file does not exist as specified.
19622    # Try adding .exe or .cmd
19623    if test -f "${new_path}.exe"; then
19624      input_to_shortpath="${new_path}.exe"
19625    elif test -f "${new_path}.cmd"; then
19626      input_to_shortpath="${new_path}.cmd"
19627    else
19628      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19629$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19630      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19631$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19632      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19633    fi
19634  else
19635    input_to_shortpath="$new_path"
19636  fi
19637
19638  # Call helper function which possibly converts this using DOS-style short mode.
19639  # If so, the updated path is stored in $new_path.
19640  new_path="$input_to_shortpath"
19641
19642  input_path="$input_to_shortpath"
19643  # Check if we need to convert this using DOS-style short mode. If the path
19644  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19645  # take no chances and rewrite it.
19646  # Note: m4 eats our [], so we need to use [ and ] instead.
19647  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19648  if test "x$has_forbidden_chars" != x; then
19649    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19650    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19651    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19652    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19653      # Going to short mode and back again did indeed matter. Since short mode is
19654      # case insensitive, let's make it lowercase to improve readability.
19655      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19656      # Now convert it back to Unix-style (cygpath)
19657      input_path=`$CYGPATH -u "$shortmode_path"`
19658      new_path="$input_path"
19659    fi
19660  fi
19661
19662  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19663  if test "x$test_cygdrive_prefix" = x; then
19664    # As a simple fix, exclude /usr/bin since it's not a real path.
19665    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19666      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19667      # a path prefixed by /cygdrive for fixpath to work.
19668      new_path="$CYGWIN_ROOT_PATH$input_path"
19669    fi
19670  fi
19671
19672  # remove trailing .exe if any
19673  new_path="${new_path/%.exe/}"
19674
19675    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19676
19677  # First separate the path from the arguments. This will split at the first
19678  # space.
19679  complete="$FOUND_MAKE"
19680  path="${complete%% *}"
19681  tmp="$complete EOL"
19682  arguments="${tmp#* }"
19683
19684  # Input might be given as Windows format, start by converting to
19685  # unix format.
19686  new_path="$path"
19687
19688  windows_path="$new_path"
19689  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19690    unix_path=`$CYGPATH -u "$windows_path"`
19691    new_path="$unix_path"
19692  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19693    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19694    new_path="$unix_path"
19695  fi
19696
19697
19698  # Now try to locate executable using which
19699  new_path=`$WHICH "$new_path" 2> /dev/null`
19700
19701  if test "x$new_path" = x; then
19702    # Oops. Which didn't find the executable.
19703    # The splitting of arguments from the executable at a space might have been incorrect,
19704    # since paths with space are more likely in Windows. Give it another try with the whole
19705    # argument.
19706    path="$complete"
19707    arguments="EOL"
19708    new_path="$path"
19709
19710  windows_path="$new_path"
19711  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19712    unix_path=`$CYGPATH -u "$windows_path"`
19713    new_path="$unix_path"
19714  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19715    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19716    new_path="$unix_path"
19717  fi
19718
19719
19720    new_path=`$WHICH "$new_path" 2> /dev/null`
19721    # bat and cmd files are not always considered executable in MSYS causing which
19722    # to not find them
19723    if test "x$new_path" = x \
19724        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19725        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19726      new_path="$path"
19727
19728  windows_path="$new_path"
19729  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19730    unix_path=`$CYGPATH -u "$windows_path"`
19731    new_path="$unix_path"
19732  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19733    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19734    new_path="$unix_path"
19735  fi
19736
19737    fi
19738
19739    if test "x$new_path" = x; then
19740      # It's still not found. Now this is an unrecoverable error.
19741      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19742$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19743      has_space=`$ECHO "$complete" | $GREP " "`
19744      if test "x$has_space" != x; then
19745        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19746$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19747      fi
19748      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19749    fi
19750  fi
19751
19752  # Now new_path has a complete unix path to the binary
19753  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19754    # Keep paths in /bin as-is, but remove trailing .exe if any
19755    new_path="${new_path/%.exe/}"
19756    # Do not save /bin paths to all_fixpath_prefixes!
19757  else
19758    # Not in mixed or Windows style, start by that.
19759    new_path=`cmd //c echo $new_path`
19760
19761  input_path="$new_path"
19762  # Check if we need to convert this using DOS-style short mode. If the path
19763  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19764  # take no chances and rewrite it.
19765  # Note: m4 eats our [], so we need to use [ and ] instead.
19766  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19767  if test "x$has_forbidden_chars" != x; then
19768    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19769    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19770  fi
19771
19772    # Output is in $new_path
19773
19774  windows_path="$new_path"
19775  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19776    unix_path=`$CYGPATH -u "$windows_path"`
19777    new_path="$unix_path"
19778  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19779    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19780    new_path="$unix_path"
19781  fi
19782
19783    # remove trailing .exe if any
19784    new_path="${new_path/%.exe/}"
19785
19786    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19787    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19788  fi
19789
19790    else
19791      # We're on a unix platform. Hooray! :)
19792      # First separate the path from the arguments. This will split at the first
19793      # space.
19794      complete="$FOUND_MAKE"
19795      path="${complete%% *}"
19796      tmp="$complete EOL"
19797      arguments="${tmp#* }"
19798
19799      # Cannot rely on the command "which" here since it doesn't always work.
19800      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19801      if test -z "$is_absolute_path"; then
19802        # Path to executable is not absolute. Find it.
19803        IFS_save="$IFS"
19804        IFS=:
19805        for p in $PATH; do
19806          if test -f "$p/$path" && test -x "$p/$path"; then
19807            new_path="$p/$path"
19808            break
19809          fi
19810        done
19811        IFS="$IFS_save"
19812      else
19813        # This is an absolute path, we can use it without further modifications.
19814        new_path="$path"
19815      fi
19816
19817      if test "x$new_path" = x; then
19818        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19819$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19820        has_space=`$ECHO "$complete" | $GREP " "`
19821        if test "x$has_space" != x; then
19822          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19823$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19824        fi
19825        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19826      fi
19827    fi
19828
19829    # Now join together the path and the arguments once again
19830    if test "x$arguments" != xEOL; then
19831      new_complete="$new_path ${arguments% *}"
19832    else
19833      new_complete="$new_path"
19834    fi
19835
19836    if test "x$complete" != "x$new_complete"; then
19837      FOUND_MAKE="$new_complete"
19838      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19839$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19840    fi
19841  fi
19842
19843        fi
19844      fi
19845    fi
19846  fi
19847
19848    fi
19849
19850    if test "x$FOUND_MAKE" = x; then
19851      if test "x$TOOLCHAIN_PATH" != x; then
19852        # We have a toolchain path, check that as well before giving up.
19853        OLD_PATH=$PATH
19854        PATH=$TOOLCHAIN_PATH:$PATH
19855        for ac_prog in gmake
19856do
19857  # Extract the first word of "$ac_prog", so it can be a program name with args.
19858set dummy $ac_prog; ac_word=$2
19859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19860$as_echo_n "checking for $ac_word... " >&6; }
19861if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
19862  $as_echo_n "(cached) " >&6
19863else
19864  case $CHECK_TOOLSDIR_GMAKE in
19865  [\\/]* | ?:[\\/]*)
19866  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
19867  ;;
19868  *)
19869  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19870for as_dir in $PATH
19871do
19872  IFS=$as_save_IFS
19873  test -z "$as_dir" && as_dir=.
19874    for ac_exec_ext in '' $ac_executable_extensions; do
19875  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19876    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19877    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19878    break 2
19879  fi
19880done
19881  done
19882IFS=$as_save_IFS
19883
19884  ;;
19885esac
19886fi
19887CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
19888if test -n "$CHECK_TOOLSDIR_GMAKE"; then
19889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
19890$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
19891else
19892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19893$as_echo "no" >&6; }
19894fi
19895
19896
19897  test -n "$CHECK_TOOLSDIR_GMAKE" && break
19898done
19899
19900
19901  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
19902  DESCRIPTION="gmake in tools-dir"
19903
19904  # On Cygwin, we require a newer version of make than on other platforms
19905  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19906    MAKE_VERSION_EXPR="-e 4\."
19907    MAKE_REQUIRED_VERSION="4.0"
19908   else
19909    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19910    MAKE_REQUIRED_VERSION="3.81"
19911  fi
19912
19913  if test "x$MAKE_CANDIDATE" != x; then
19914    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19915$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19916    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19917    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19918    if test "x$IS_GNU_MAKE" = x; then
19919      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19920$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19921    else
19922      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19923      if test "x$IS_MODERN_MAKE" = x; then
19924        { $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
19925$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;}
19926      else
19927        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19928          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19929            MAKE_EXPECTED_ENV='cygwin'
19930          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19931            MAKE_EXPECTED_ENV='msys'
19932          else
19933            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19934          fi
19935          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19936          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19937        else
19938          # Not relevant for non-Windows
19939          IS_MAKE_CORRECT_ENV=true
19940        fi
19941        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19942          { $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
19943$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;}
19944        else
19945          FOUND_MAKE=$MAKE_CANDIDATE
19946
19947  # Only process if variable expands to non-empty
19948
19949  if test "x$FOUND_MAKE" != x; then
19950    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19951
19952  # First separate the path from the arguments. This will split at the first
19953  # space.
19954  complete="$FOUND_MAKE"
19955  path="${complete%% *}"
19956  tmp="$complete EOL"
19957  arguments="${tmp#* }"
19958
19959  # Input might be given as Windows format, start by converting to
19960  # unix format.
19961  new_path=`$CYGPATH -u "$path"`
19962
19963  # Now try to locate executable using which
19964  new_path=`$WHICH "$new_path" 2> /dev/null`
19965  # bat and cmd files are not always considered executable in cygwin causing which
19966  # to not find them
19967  if test "x$new_path" = x \
19968      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19969      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19970    new_path=`$CYGPATH -u "$path"`
19971  fi
19972  if test "x$new_path" = x; then
19973    # Oops. Which didn't find the executable.
19974    # The splitting of arguments from the executable at a space might have been incorrect,
19975    # since paths with space are more likely in Windows. Give it another try with the whole
19976    # argument.
19977    path="$complete"
19978    arguments="EOL"
19979    new_path=`$CYGPATH -u "$path"`
19980    new_path=`$WHICH "$new_path" 2> /dev/null`
19981    # bat and cmd files are not always considered executable in cygwin causing which
19982    # to not find them
19983    if test "x$new_path" = x \
19984        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19985        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19986      new_path=`$CYGPATH -u "$path"`
19987    fi
19988    if test "x$new_path" = x; then
19989      # It's still not found. Now this is an unrecoverable error.
19990      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19991$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19992      has_space=`$ECHO "$complete" | $GREP " "`
19993      if test "x$has_space" != x; then
19994        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19995$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19996      fi
19997      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19998    fi
19999  fi
20000
20001  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20002  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20003  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20004  # "foo.exe" is OK but "foo" is an error.
20005  #
20006  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20007  # It is also a way to make sure we got the proper file name for the real test later on.
20008  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20009  if test "x$test_shortpath" = x; then
20010    # Short path failed, file does not exist as specified.
20011    # Try adding .exe or .cmd
20012    if test -f "${new_path}.exe"; then
20013      input_to_shortpath="${new_path}.exe"
20014    elif test -f "${new_path}.cmd"; then
20015      input_to_shortpath="${new_path}.cmd"
20016    else
20017      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20018$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20019      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20020$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20021      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20022    fi
20023  else
20024    input_to_shortpath="$new_path"
20025  fi
20026
20027  # Call helper function which possibly converts this using DOS-style short mode.
20028  # If so, the updated path is stored in $new_path.
20029  new_path="$input_to_shortpath"
20030
20031  input_path="$input_to_shortpath"
20032  # Check if we need to convert this using DOS-style short mode. If the path
20033  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20034  # take no chances and rewrite it.
20035  # Note: m4 eats our [], so we need to use [ and ] instead.
20036  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20037  if test "x$has_forbidden_chars" != x; then
20038    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20039    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20040    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20041    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20042      # Going to short mode and back again did indeed matter. Since short mode is
20043      # case insensitive, let's make it lowercase to improve readability.
20044      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20045      # Now convert it back to Unix-style (cygpath)
20046      input_path=`$CYGPATH -u "$shortmode_path"`
20047      new_path="$input_path"
20048    fi
20049  fi
20050
20051  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20052  if test "x$test_cygdrive_prefix" = x; then
20053    # As a simple fix, exclude /usr/bin since it's not a real path.
20054    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20055      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20056      # a path prefixed by /cygdrive for fixpath to work.
20057      new_path="$CYGWIN_ROOT_PATH$input_path"
20058    fi
20059  fi
20060
20061  # remove trailing .exe if any
20062  new_path="${new_path/%.exe/}"
20063
20064    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20065
20066  # First separate the path from the arguments. This will split at the first
20067  # space.
20068  complete="$FOUND_MAKE"
20069  path="${complete%% *}"
20070  tmp="$complete EOL"
20071  arguments="${tmp#* }"
20072
20073  # Input might be given as Windows format, start by converting to
20074  # unix format.
20075  new_path="$path"
20076
20077  windows_path="$new_path"
20078  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20079    unix_path=`$CYGPATH -u "$windows_path"`
20080    new_path="$unix_path"
20081  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20082    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20083    new_path="$unix_path"
20084  fi
20085
20086
20087  # Now try to locate executable using which
20088  new_path=`$WHICH "$new_path" 2> /dev/null`
20089
20090  if test "x$new_path" = x; then
20091    # Oops. Which didn't find the executable.
20092    # The splitting of arguments from the executable at a space might have been incorrect,
20093    # since paths with space are more likely in Windows. Give it another try with the whole
20094    # argument.
20095    path="$complete"
20096    arguments="EOL"
20097    new_path="$path"
20098
20099  windows_path="$new_path"
20100  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20101    unix_path=`$CYGPATH -u "$windows_path"`
20102    new_path="$unix_path"
20103  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20104    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20105    new_path="$unix_path"
20106  fi
20107
20108
20109    new_path=`$WHICH "$new_path" 2> /dev/null`
20110    # bat and cmd files are not always considered executable in MSYS causing which
20111    # to not find them
20112    if test "x$new_path" = x \
20113        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20114        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20115      new_path="$path"
20116
20117  windows_path="$new_path"
20118  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20119    unix_path=`$CYGPATH -u "$windows_path"`
20120    new_path="$unix_path"
20121  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20122    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20123    new_path="$unix_path"
20124  fi
20125
20126    fi
20127
20128    if test "x$new_path" = x; then
20129      # It's still not found. Now this is an unrecoverable error.
20130      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20131$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20132      has_space=`$ECHO "$complete" | $GREP " "`
20133      if test "x$has_space" != x; then
20134        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20135$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20136      fi
20137      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20138    fi
20139  fi
20140
20141  # Now new_path has a complete unix path to the binary
20142  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20143    # Keep paths in /bin as-is, but remove trailing .exe if any
20144    new_path="${new_path/%.exe/}"
20145    # Do not save /bin paths to all_fixpath_prefixes!
20146  else
20147    # Not in mixed or Windows style, start by that.
20148    new_path=`cmd //c echo $new_path`
20149
20150  input_path="$new_path"
20151  # Check if we need to convert this using DOS-style short mode. If the path
20152  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20153  # take no chances and rewrite it.
20154  # Note: m4 eats our [], so we need to use [ and ] instead.
20155  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20156  if test "x$has_forbidden_chars" != x; then
20157    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20158    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20159  fi
20160
20161    # Output is in $new_path
20162
20163  windows_path="$new_path"
20164  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20165    unix_path=`$CYGPATH -u "$windows_path"`
20166    new_path="$unix_path"
20167  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20168    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20169    new_path="$unix_path"
20170  fi
20171
20172    # remove trailing .exe if any
20173    new_path="${new_path/%.exe/}"
20174
20175    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20176    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20177  fi
20178
20179    else
20180      # We're on a unix platform. Hooray! :)
20181      # First separate the path from the arguments. This will split at the first
20182      # space.
20183      complete="$FOUND_MAKE"
20184      path="${complete%% *}"
20185      tmp="$complete EOL"
20186      arguments="${tmp#* }"
20187
20188      # Cannot rely on the command "which" here since it doesn't always work.
20189      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20190      if test -z "$is_absolute_path"; then
20191        # Path to executable is not absolute. Find it.
20192        IFS_save="$IFS"
20193        IFS=:
20194        for p in $PATH; do
20195          if test -f "$p/$path" && test -x "$p/$path"; then
20196            new_path="$p/$path"
20197            break
20198          fi
20199        done
20200        IFS="$IFS_save"
20201      else
20202        # This is an absolute path, we can use it without further modifications.
20203        new_path="$path"
20204      fi
20205
20206      if test "x$new_path" = x; then
20207        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20208$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20209        has_space=`$ECHO "$complete" | $GREP " "`
20210        if test "x$has_space" != x; then
20211          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20212$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20213        fi
20214        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20215      fi
20216    fi
20217
20218    # Now join together the path and the arguments once again
20219    if test "x$arguments" != xEOL; then
20220      new_complete="$new_path ${arguments% *}"
20221    else
20222      new_complete="$new_path"
20223    fi
20224
20225    if test "x$complete" != "x$new_complete"; then
20226      FOUND_MAKE="$new_complete"
20227      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20228$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20229    fi
20230  fi
20231
20232        fi
20233      fi
20234    fi
20235  fi
20236
20237        if test "x$FOUND_MAKE" = x; then
20238          for ac_prog in make
20239do
20240  # Extract the first word of "$ac_prog", so it can be a program name with args.
20241set dummy $ac_prog; ac_word=$2
20242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20243$as_echo_n "checking for $ac_word... " >&6; }
20244if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
20245  $as_echo_n "(cached) " >&6
20246else
20247  case $CHECK_TOOLSDIR_MAKE in
20248  [\\/]* | ?:[\\/]*)
20249  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
20250  ;;
20251  *)
20252  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20253for as_dir in $PATH
20254do
20255  IFS=$as_save_IFS
20256  test -z "$as_dir" && as_dir=.
20257    for ac_exec_ext in '' $ac_executable_extensions; do
20258  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20259    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
20260    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20261    break 2
20262  fi
20263done
20264  done
20265IFS=$as_save_IFS
20266
20267  ;;
20268esac
20269fi
20270CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
20271if test -n "$CHECK_TOOLSDIR_MAKE"; then
20272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
20273$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
20274else
20275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20276$as_echo "no" >&6; }
20277fi
20278
20279
20280  test -n "$CHECK_TOOLSDIR_MAKE" && break
20281done
20282
20283
20284  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
20285  DESCRIPTION="make in tools-dir"
20286
20287  # On Cygwin, we require a newer version of make than on other platforms
20288  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20289    MAKE_VERSION_EXPR="-e 4\."
20290    MAKE_REQUIRED_VERSION="4.0"
20291   else
20292    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20293    MAKE_REQUIRED_VERSION="3.81"
20294  fi
20295
20296  if test "x$MAKE_CANDIDATE" != x; then
20297    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20298$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20299    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20300    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20301    if test "x$IS_GNU_MAKE" = x; then
20302      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20303$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20304    else
20305      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20306      if test "x$IS_MODERN_MAKE" = x; then
20307        { $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
20308$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;}
20309      else
20310        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20311          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20312            MAKE_EXPECTED_ENV='cygwin'
20313          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20314            MAKE_EXPECTED_ENV='msys'
20315          else
20316            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20317          fi
20318          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20319          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20320        else
20321          # Not relevant for non-Windows
20322          IS_MAKE_CORRECT_ENV=true
20323        fi
20324        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20325          { $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
20326$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;}
20327        else
20328          FOUND_MAKE=$MAKE_CANDIDATE
20329
20330  # Only process if variable expands to non-empty
20331
20332  if test "x$FOUND_MAKE" != x; then
20333    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20334
20335  # First separate the path from the arguments. This will split at the first
20336  # space.
20337  complete="$FOUND_MAKE"
20338  path="${complete%% *}"
20339  tmp="$complete EOL"
20340  arguments="${tmp#* }"
20341
20342  # Input might be given as Windows format, start by converting to
20343  # unix format.
20344  new_path=`$CYGPATH -u "$path"`
20345
20346  # Now try to locate executable using which
20347  new_path=`$WHICH "$new_path" 2> /dev/null`
20348  # bat and cmd files are not always considered executable in cygwin causing which
20349  # to not find them
20350  if test "x$new_path" = x \
20351      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20352      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20353    new_path=`$CYGPATH -u "$path"`
20354  fi
20355  if test "x$new_path" = x; then
20356    # Oops. Which didn't find the executable.
20357    # The splitting of arguments from the executable at a space might have been incorrect,
20358    # since paths with space are more likely in Windows. Give it another try with the whole
20359    # argument.
20360    path="$complete"
20361    arguments="EOL"
20362    new_path=`$CYGPATH -u "$path"`
20363    new_path=`$WHICH "$new_path" 2> /dev/null`
20364    # bat and cmd files are not always considered executable in cygwin causing which
20365    # to not find them
20366    if test "x$new_path" = x \
20367        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20368        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20369      new_path=`$CYGPATH -u "$path"`
20370    fi
20371    if test "x$new_path" = x; then
20372      # It's still not found. Now this is an unrecoverable error.
20373      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20374$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20375      has_space=`$ECHO "$complete" | $GREP " "`
20376      if test "x$has_space" != x; then
20377        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20378$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20379      fi
20380      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20381    fi
20382  fi
20383
20384  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20385  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20386  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20387  # "foo.exe" is OK but "foo" is an error.
20388  #
20389  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20390  # It is also a way to make sure we got the proper file name for the real test later on.
20391  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20392  if test "x$test_shortpath" = x; then
20393    # Short path failed, file does not exist as specified.
20394    # Try adding .exe or .cmd
20395    if test -f "${new_path}.exe"; then
20396      input_to_shortpath="${new_path}.exe"
20397    elif test -f "${new_path}.cmd"; then
20398      input_to_shortpath="${new_path}.cmd"
20399    else
20400      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20401$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20402      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20403$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20404      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20405    fi
20406  else
20407    input_to_shortpath="$new_path"
20408  fi
20409
20410  # Call helper function which possibly converts this using DOS-style short mode.
20411  # If so, the updated path is stored in $new_path.
20412  new_path="$input_to_shortpath"
20413
20414  input_path="$input_to_shortpath"
20415  # Check if we need to convert this using DOS-style short mode. If the path
20416  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20417  # take no chances and rewrite it.
20418  # Note: m4 eats our [], so we need to use [ and ] instead.
20419  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20420  if test "x$has_forbidden_chars" != x; then
20421    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20422    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20423    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20424    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20425      # Going to short mode and back again did indeed matter. Since short mode is
20426      # case insensitive, let's make it lowercase to improve readability.
20427      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20428      # Now convert it back to Unix-style (cygpath)
20429      input_path=`$CYGPATH -u "$shortmode_path"`
20430      new_path="$input_path"
20431    fi
20432  fi
20433
20434  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20435  if test "x$test_cygdrive_prefix" = x; then
20436    # As a simple fix, exclude /usr/bin since it's not a real path.
20437    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20438      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20439      # a path prefixed by /cygdrive for fixpath to work.
20440      new_path="$CYGWIN_ROOT_PATH$input_path"
20441    fi
20442  fi
20443
20444  # remove trailing .exe if any
20445  new_path="${new_path/%.exe/}"
20446
20447    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20448
20449  # First separate the path from the arguments. This will split at the first
20450  # space.
20451  complete="$FOUND_MAKE"
20452  path="${complete%% *}"
20453  tmp="$complete EOL"
20454  arguments="${tmp#* }"
20455
20456  # Input might be given as Windows format, start by converting to
20457  # unix format.
20458  new_path="$path"
20459
20460  windows_path="$new_path"
20461  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20462    unix_path=`$CYGPATH -u "$windows_path"`
20463    new_path="$unix_path"
20464  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20465    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20466    new_path="$unix_path"
20467  fi
20468
20469
20470  # Now try to locate executable using which
20471  new_path=`$WHICH "$new_path" 2> /dev/null`
20472
20473  if test "x$new_path" = x; then
20474    # Oops. Which didn't find the executable.
20475    # The splitting of arguments from the executable at a space might have been incorrect,
20476    # since paths with space are more likely in Windows. Give it another try with the whole
20477    # argument.
20478    path="$complete"
20479    arguments="EOL"
20480    new_path="$path"
20481
20482  windows_path="$new_path"
20483  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20484    unix_path=`$CYGPATH -u "$windows_path"`
20485    new_path="$unix_path"
20486  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20487    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20488    new_path="$unix_path"
20489  fi
20490
20491
20492    new_path=`$WHICH "$new_path" 2> /dev/null`
20493    # bat and cmd files are not always considered executable in MSYS causing which
20494    # to not find them
20495    if test "x$new_path" = x \
20496        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20497        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20498      new_path="$path"
20499
20500  windows_path="$new_path"
20501  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20502    unix_path=`$CYGPATH -u "$windows_path"`
20503    new_path="$unix_path"
20504  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20505    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20506    new_path="$unix_path"
20507  fi
20508
20509    fi
20510
20511    if test "x$new_path" = x; then
20512      # It's still not found. Now this is an unrecoverable error.
20513      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20514$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20515      has_space=`$ECHO "$complete" | $GREP " "`
20516      if test "x$has_space" != x; then
20517        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20518$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20519      fi
20520      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20521    fi
20522  fi
20523
20524  # Now new_path has a complete unix path to the binary
20525  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20526    # Keep paths in /bin as-is, but remove trailing .exe if any
20527    new_path="${new_path/%.exe/}"
20528    # Do not save /bin paths to all_fixpath_prefixes!
20529  else
20530    # Not in mixed or Windows style, start by that.
20531    new_path=`cmd //c echo $new_path`
20532
20533  input_path="$new_path"
20534  # Check if we need to convert this using DOS-style short mode. If the path
20535  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20536  # take no chances and rewrite it.
20537  # Note: m4 eats our [], so we need to use [ and ] instead.
20538  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20539  if test "x$has_forbidden_chars" != x; then
20540    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20541    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20542  fi
20543
20544    # Output is in $new_path
20545
20546  windows_path="$new_path"
20547  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20548    unix_path=`$CYGPATH -u "$windows_path"`
20549    new_path="$unix_path"
20550  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20551    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20552    new_path="$unix_path"
20553  fi
20554
20555    # remove trailing .exe if any
20556    new_path="${new_path/%.exe/}"
20557
20558    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20559    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20560  fi
20561
20562    else
20563      # We're on a unix platform. Hooray! :)
20564      # First separate the path from the arguments. This will split at the first
20565      # space.
20566      complete="$FOUND_MAKE"
20567      path="${complete%% *}"
20568      tmp="$complete EOL"
20569      arguments="${tmp#* }"
20570
20571      # Cannot rely on the command "which" here since it doesn't always work.
20572      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20573      if test -z "$is_absolute_path"; then
20574        # Path to executable is not absolute. Find it.
20575        IFS_save="$IFS"
20576        IFS=:
20577        for p in $PATH; do
20578          if test -f "$p/$path" && test -x "$p/$path"; then
20579            new_path="$p/$path"
20580            break
20581          fi
20582        done
20583        IFS="$IFS_save"
20584      else
20585        # This is an absolute path, we can use it without further modifications.
20586        new_path="$path"
20587      fi
20588
20589      if test "x$new_path" = x; then
20590        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20591$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20592        has_space=`$ECHO "$complete" | $GREP " "`
20593        if test "x$has_space" != x; then
20594          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20595$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20596        fi
20597        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20598      fi
20599    fi
20600
20601    # Now join together the path and the arguments once again
20602    if test "x$arguments" != xEOL; then
20603      new_complete="$new_path ${arguments% *}"
20604    else
20605      new_complete="$new_path"
20606    fi
20607
20608    if test "x$complete" != "x$new_complete"; then
20609      FOUND_MAKE="$new_complete"
20610      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20611$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20612    fi
20613  fi
20614
20615        fi
20616      fi
20617    fi
20618  fi
20619
20620        fi
20621        PATH=$OLD_PATH
20622      fi
20623    fi
20624
20625    if test "x$FOUND_MAKE" = x; then
20626      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
20627    fi
20628
20629    else
20630      # If it succeeded, then it was overridden by the user. We will use it
20631      # for the tool.
20632
20633      # First remove it from the list of overridden variables, so we can test
20634      # for unknown variables in the end.
20635      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20636
20637      # Check if we try to supply an empty value
20638      if test "x$MAKE" = x; then
20639        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20640$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20641        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20642$as_echo_n "checking for MAKE... " >&6; }
20643        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20644$as_echo "disabled" >&6; }
20645      else
20646        # Check if the provided tool contains a complete path.
20647        tool_specified="$MAKE"
20648        tool_basename="${tool_specified##*/}"
20649        if test "x$tool_basename" = "x$tool_specified"; then
20650          # A command without a complete path is provided, search $PATH.
20651          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20652$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20653          # Extract the first word of "$tool_basename", so it can be a program name with args.
20654set dummy $tool_basename; ac_word=$2
20655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20656$as_echo_n "checking for $ac_word... " >&6; }
20657if ${ac_cv_path_MAKE+:} false; then :
20658  $as_echo_n "(cached) " >&6
20659else
20660  case $MAKE in
20661  [\\/]* | ?:[\\/]*)
20662  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20663  ;;
20664  *)
20665  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20666for as_dir in $PATH
20667do
20668  IFS=$as_save_IFS
20669  test -z "$as_dir" && as_dir=.
20670    for ac_exec_ext in '' $ac_executable_extensions; do
20671  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20672    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
20673    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20674    break 2
20675  fi
20676done
20677  done
20678IFS=$as_save_IFS
20679
20680  ;;
20681esac
20682fi
20683MAKE=$ac_cv_path_MAKE
20684if test -n "$MAKE"; then
20685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
20686$as_echo "$MAKE" >&6; }
20687else
20688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20689$as_echo "no" >&6; }
20690fi
20691
20692
20693          if test "x$MAKE" = x; then
20694            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20695          fi
20696        else
20697          # Otherwise we believe it is a complete path. Use it as it is.
20698          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
20699$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
20700          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20701$as_echo_n "checking for MAKE... " >&6; }
20702          if test ! -x "$tool_specified"; then
20703            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20704$as_echo "not found" >&6; }
20705            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
20706          fi
20707          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20708$as_echo "$tool_specified" >&6; }
20709        fi
20710      fi
20711    fi
20712
20713    # If MAKE was set by user, verify the version
20714
20715  MAKE_CANDIDATE=""$MAKE""
20716  DESCRIPTION="user supplied MAKE=$MAKE"
20717
20718  # On Cygwin, we require a newer version of make than on other platforms
20719  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20720    MAKE_VERSION_EXPR="-e 4\."
20721    MAKE_REQUIRED_VERSION="4.0"
20722   else
20723    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20724    MAKE_REQUIRED_VERSION="3.81"
20725  fi
20726
20727  if test "x$MAKE_CANDIDATE" != x; then
20728    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20729$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20730    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20731    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20732    if test "x$IS_GNU_MAKE" = x; then
20733      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20734$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20735    else
20736      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20737      if test "x$IS_MODERN_MAKE" = x; then
20738        { $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
20739$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;}
20740      else
20741        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20742          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20743            MAKE_EXPECTED_ENV='cygwin'
20744          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20745            MAKE_EXPECTED_ENV='msys'
20746          else
20747            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20748          fi
20749          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20750          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20751        else
20752          # Not relevant for non-Windows
20753          IS_MAKE_CORRECT_ENV=true
20754        fi
20755        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20756          { $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
20757$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;}
20758        else
20759          FOUND_MAKE=$MAKE_CANDIDATE
20760
20761  # Only process if variable expands to non-empty
20762
20763  if test "x$FOUND_MAKE" != x; then
20764    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20765
20766  # First separate the path from the arguments. This will split at the first
20767  # space.
20768  complete="$FOUND_MAKE"
20769  path="${complete%% *}"
20770  tmp="$complete EOL"
20771  arguments="${tmp#* }"
20772
20773  # Input might be given as Windows format, start by converting to
20774  # unix format.
20775  new_path=`$CYGPATH -u "$path"`
20776
20777  # Now try to locate executable using which
20778  new_path=`$WHICH "$new_path" 2> /dev/null`
20779  # bat and cmd files are not always considered executable in cygwin causing which
20780  # to not find them
20781  if test "x$new_path" = x \
20782      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20783      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20784    new_path=`$CYGPATH -u "$path"`
20785  fi
20786  if test "x$new_path" = x; then
20787    # Oops. Which didn't find the executable.
20788    # The splitting of arguments from the executable at a space might have been incorrect,
20789    # since paths with space are more likely in Windows. Give it another try with the whole
20790    # argument.
20791    path="$complete"
20792    arguments="EOL"
20793    new_path=`$CYGPATH -u "$path"`
20794    new_path=`$WHICH "$new_path" 2> /dev/null`
20795    # bat and cmd files are not always considered executable in cygwin causing which
20796    # to not find them
20797    if test "x$new_path" = x \
20798        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20799        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20800      new_path=`$CYGPATH -u "$path"`
20801    fi
20802    if test "x$new_path" = x; then
20803      # It's still not found. Now this is an unrecoverable error.
20804      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20805$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20806      has_space=`$ECHO "$complete" | $GREP " "`
20807      if test "x$has_space" != x; then
20808        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20809$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20810      fi
20811      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20812    fi
20813  fi
20814
20815  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20816  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20817  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20818  # "foo.exe" is OK but "foo" is an error.
20819  #
20820  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20821  # It is also a way to make sure we got the proper file name for the real test later on.
20822  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20823  if test "x$test_shortpath" = x; then
20824    # Short path failed, file does not exist as specified.
20825    # Try adding .exe or .cmd
20826    if test -f "${new_path}.exe"; then
20827      input_to_shortpath="${new_path}.exe"
20828    elif test -f "${new_path}.cmd"; then
20829      input_to_shortpath="${new_path}.cmd"
20830    else
20831      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20832$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20833      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20834$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20835      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20836    fi
20837  else
20838    input_to_shortpath="$new_path"
20839  fi
20840
20841  # Call helper function which possibly converts this using DOS-style short mode.
20842  # If so, the updated path is stored in $new_path.
20843  new_path="$input_to_shortpath"
20844
20845  input_path="$input_to_shortpath"
20846  # Check if we need to convert this using DOS-style short mode. If the path
20847  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20848  # take no chances and rewrite it.
20849  # Note: m4 eats our [], so we need to use [ and ] instead.
20850  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20851  if test "x$has_forbidden_chars" != x; then
20852    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20853    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20854    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20855    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20856      # Going to short mode and back again did indeed matter. Since short mode is
20857      # case insensitive, let's make it lowercase to improve readability.
20858      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20859      # Now convert it back to Unix-style (cygpath)
20860      input_path=`$CYGPATH -u "$shortmode_path"`
20861      new_path="$input_path"
20862    fi
20863  fi
20864
20865  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20866  if test "x$test_cygdrive_prefix" = x; then
20867    # As a simple fix, exclude /usr/bin since it's not a real path.
20868    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20869      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20870      # a path prefixed by /cygdrive for fixpath to work.
20871      new_path="$CYGWIN_ROOT_PATH$input_path"
20872    fi
20873  fi
20874
20875  # remove trailing .exe if any
20876  new_path="${new_path/%.exe/}"
20877
20878    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20879
20880  # First separate the path from the arguments. This will split at the first
20881  # space.
20882  complete="$FOUND_MAKE"
20883  path="${complete%% *}"
20884  tmp="$complete EOL"
20885  arguments="${tmp#* }"
20886
20887  # Input might be given as Windows format, start by converting to
20888  # unix format.
20889  new_path="$path"
20890
20891  windows_path="$new_path"
20892  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20893    unix_path=`$CYGPATH -u "$windows_path"`
20894    new_path="$unix_path"
20895  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20896    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20897    new_path="$unix_path"
20898  fi
20899
20900
20901  # Now try to locate executable using which
20902  new_path=`$WHICH "$new_path" 2> /dev/null`
20903
20904  if test "x$new_path" = x; then
20905    # Oops. Which didn't find the executable.
20906    # The splitting of arguments from the executable at a space might have been incorrect,
20907    # since paths with space are more likely in Windows. Give it another try with the whole
20908    # argument.
20909    path="$complete"
20910    arguments="EOL"
20911    new_path="$path"
20912
20913  windows_path="$new_path"
20914  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20915    unix_path=`$CYGPATH -u "$windows_path"`
20916    new_path="$unix_path"
20917  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20918    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20919    new_path="$unix_path"
20920  fi
20921
20922
20923    new_path=`$WHICH "$new_path" 2> /dev/null`
20924    # bat and cmd files are not always considered executable in MSYS causing which
20925    # to not find them
20926    if test "x$new_path" = x \
20927        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20928        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20929      new_path="$path"
20930
20931  windows_path="$new_path"
20932  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20933    unix_path=`$CYGPATH -u "$windows_path"`
20934    new_path="$unix_path"
20935  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20936    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20937    new_path="$unix_path"
20938  fi
20939
20940    fi
20941
20942    if test "x$new_path" = x; then
20943      # It's still not found. Now this is an unrecoverable error.
20944      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20945$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20946      has_space=`$ECHO "$complete" | $GREP " "`
20947      if test "x$has_space" != x; then
20948        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20949$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20950      fi
20951      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20952    fi
20953  fi
20954
20955  # Now new_path has a complete unix path to the binary
20956  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20957    # Keep paths in /bin as-is, but remove trailing .exe if any
20958    new_path="${new_path/%.exe/}"
20959    # Do not save /bin paths to all_fixpath_prefixes!
20960  else
20961    # Not in mixed or Windows style, start by that.
20962    new_path=`cmd //c echo $new_path`
20963
20964  input_path="$new_path"
20965  # Check if we need to convert this using DOS-style short mode. If the path
20966  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20967  # take no chances and rewrite it.
20968  # Note: m4 eats our [], so we need to use [ and ] instead.
20969  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20970  if test "x$has_forbidden_chars" != x; then
20971    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20972    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20973  fi
20974
20975    # Output is in $new_path
20976
20977  windows_path="$new_path"
20978  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20979    unix_path=`$CYGPATH -u "$windows_path"`
20980    new_path="$unix_path"
20981  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20982    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20983    new_path="$unix_path"
20984  fi
20985
20986    # remove trailing .exe if any
20987    new_path="${new_path/%.exe/}"
20988
20989    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20990    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20991  fi
20992
20993    else
20994      # We're on a unix platform. Hooray! :)
20995      # First separate the path from the arguments. This will split at the first
20996      # space.
20997      complete="$FOUND_MAKE"
20998      path="${complete%% *}"
20999      tmp="$complete EOL"
21000      arguments="${tmp#* }"
21001
21002      # Cannot rely on the command "which" here since it doesn't always work.
21003      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21004      if test -z "$is_absolute_path"; then
21005        # Path to executable is not absolute. Find it.
21006        IFS_save="$IFS"
21007        IFS=:
21008        for p in $PATH; do
21009          if test -f "$p/$path" && test -x "$p/$path"; then
21010            new_path="$p/$path"
21011            break
21012          fi
21013        done
21014        IFS="$IFS_save"
21015      else
21016        # This is an absolute path, we can use it without further modifications.
21017        new_path="$path"
21018      fi
21019
21020      if test "x$new_path" = x; then
21021        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21022$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21023        has_space=`$ECHO "$complete" | $GREP " "`
21024        if test "x$has_space" != x; then
21025          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21026$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21027        fi
21028        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21029      fi
21030    fi
21031
21032    # Now join together the path and the arguments once again
21033    if test "x$arguments" != xEOL; then
21034      new_complete="$new_path ${arguments% *}"
21035    else
21036      new_complete="$new_path"
21037    fi
21038
21039    if test "x$complete" != "x$new_complete"; then
21040      FOUND_MAKE="$new_complete"
21041      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
21042$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
21043    fi
21044  fi
21045
21046        fi
21047      fi
21048    fi
21049  fi
21050
21051    if test "x$FOUND_MAKE" = x; then
21052      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
21053    fi
21054
21055  fi
21056
21057
21058  MAKE=$FOUND_MAKE
21059
21060  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
21061$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
21062
21063
21064  # Check if make supports the output sync option and if so, setup using it.
21065  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
21066$as_echo_n "checking if make --output-sync is supported... " >&6; }
21067  if $MAKE --version -O > /dev/null 2>&1; then
21068    OUTPUT_SYNC_SUPPORTED=true
21069    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21070$as_echo "yes" >&6; }
21071    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
21072$as_echo_n "checking for output-sync value... " >&6; }
21073
21074# Check whether --with-output-sync was given.
21075if test "${with_output_sync+set}" = set; then :
21076  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
21077fi
21078
21079    if test "x$OUTPUT_SYNC" = "x"; then
21080      OUTPUT_SYNC=none
21081    fi
21082    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
21083$as_echo "$OUTPUT_SYNC" >&6; }
21084    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
21085      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
21086    fi
21087  else
21088    OUTPUT_SYNC_SUPPORTED=false
21089    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21090$as_echo "no" >&6; }
21091  fi
21092
21093
21094
21095
21096
21097
21098  # Test if find supports -delete
21099  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
21100$as_echo_n "checking if find supports -delete... " >&6; }
21101  FIND_DELETE="-delete"
21102
21103  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
21104
21105  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
21106
21107  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
21108  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
21109    # No, it does not.
21110    $RM $DELETEDIR/TestIfFindSupportsDelete
21111    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21112      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
21113      FIND_DELETE="-print | $XARGS $RM"
21114    else
21115      FIND_DELETE="-exec $RM \{\} \+"
21116    fi
21117    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21118$as_echo "no" >&6; }
21119  else
21120    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21121$as_echo "yes" >&6; }
21122  fi
21123  $RMDIR $DELETEDIR
21124
21125
21126
21127  # Test which kind of tar was found
21128  if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then
21129    TAR_TYPE="gnu"
21130  elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
21131    TAR_TYPE="bsd"
21132  elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
21133    TAR_TYPE="solaris"
21134  fi
21135  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of tar was found" >&5
21136$as_echo_n "checking what type of tar was found... " >&6; }
21137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR_TYPE" >&5
21138$as_echo "$TAR_TYPE" >&6; }
21139
21140  TAR_CREATE_FILE_PARAM=""
21141
21142  if test "x$TAR_TYPE" = "xgnu"; then
21143    TAR_INCLUDE_PARAM="T"
21144    TAR_SUPPORTS_TRANSFORM="true"
21145    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
21146      # When using gnu tar for Solaris targets, need to use compatibility mode
21147      TAR_CREATE_EXTRA_PARAM="--format=ustar"
21148    fi
21149  else
21150    TAR_INCLUDE_PARAM="I"
21151    TAR_SUPPORTS_TRANSFORM="false"
21152  fi
21153
21154
21155
21156
21157
21158
21159  # These tools might not be installed by default,
21160  # need hint on how to install them.
21161
21162
21163
21164  # Publish this variable in the help.
21165
21166
21167  if [ -z "${UNZIP+x}" ]; then
21168    # The variable is not set by user, try to locate tool using the code snippet
21169    for ac_prog in unzip
21170do
21171  # Extract the first word of "$ac_prog", so it can be a program name with args.
21172set dummy $ac_prog; ac_word=$2
21173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21174$as_echo_n "checking for $ac_word... " >&6; }
21175if ${ac_cv_path_UNZIP+:} false; then :
21176  $as_echo_n "(cached) " >&6
21177else
21178  case $UNZIP in
21179  [\\/]* | ?:[\\/]*)
21180  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21181  ;;
21182  *)
21183  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21184for as_dir in $PATH
21185do
21186  IFS=$as_save_IFS
21187  test -z "$as_dir" && as_dir=.
21188    for ac_exec_ext in '' $ac_executable_extensions; do
21189  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21190    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21191    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21192    break 2
21193  fi
21194done
21195  done
21196IFS=$as_save_IFS
21197
21198  ;;
21199esac
21200fi
21201UNZIP=$ac_cv_path_UNZIP
21202if test -n "$UNZIP"; then
21203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21204$as_echo "$UNZIP" >&6; }
21205else
21206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21207$as_echo "no" >&6; }
21208fi
21209
21210
21211  test -n "$UNZIP" && break
21212done
21213
21214  else
21215    # The variable is set, but is it from the command line or the environment?
21216
21217    # Try to remove the string !UNZIP! from our list.
21218    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
21219    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21220      # If it failed, the variable was not from the command line. Ignore it,
21221      # but warn the user (except for BASH, which is always set by the calling BASH).
21222      if test "xUNZIP" != xBASH; then
21223        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
21224$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
21225      fi
21226      # Try to locate tool using the code snippet
21227      for ac_prog in unzip
21228do
21229  # Extract the first word of "$ac_prog", so it can be a program name with args.
21230set dummy $ac_prog; ac_word=$2
21231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21232$as_echo_n "checking for $ac_word... " >&6; }
21233if ${ac_cv_path_UNZIP+:} false; then :
21234  $as_echo_n "(cached) " >&6
21235else
21236  case $UNZIP in
21237  [\\/]* | ?:[\\/]*)
21238  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21239  ;;
21240  *)
21241  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21242for as_dir in $PATH
21243do
21244  IFS=$as_save_IFS
21245  test -z "$as_dir" && as_dir=.
21246    for ac_exec_ext in '' $ac_executable_extensions; do
21247  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21248    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21249    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21250    break 2
21251  fi
21252done
21253  done
21254IFS=$as_save_IFS
21255
21256  ;;
21257esac
21258fi
21259UNZIP=$ac_cv_path_UNZIP
21260if test -n "$UNZIP"; then
21261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21262$as_echo "$UNZIP" >&6; }
21263else
21264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21265$as_echo "no" >&6; }
21266fi
21267
21268
21269  test -n "$UNZIP" && break
21270done
21271
21272    else
21273      # If it succeeded, then it was overridden by the user. We will use it
21274      # for the tool.
21275
21276      # First remove it from the list of overridden variables, so we can test
21277      # for unknown variables in the end.
21278      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21279
21280      # Check if we try to supply an empty value
21281      if test "x$UNZIP" = x; then
21282        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
21283$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
21284        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21285$as_echo_n "checking for UNZIP... " >&6; }
21286        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21287$as_echo "disabled" >&6; }
21288      else
21289        # Check if the provided tool contains a complete path.
21290        tool_specified="$UNZIP"
21291        tool_basename="${tool_specified##*/}"
21292        if test "x$tool_basename" = "x$tool_specified"; then
21293          # A command without a complete path is provided, search $PATH.
21294          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
21295$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
21296          # Extract the first word of "$tool_basename", so it can be a program name with args.
21297set dummy $tool_basename; ac_word=$2
21298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21299$as_echo_n "checking for $ac_word... " >&6; }
21300if ${ac_cv_path_UNZIP+:} false; then :
21301  $as_echo_n "(cached) " >&6
21302else
21303  case $UNZIP in
21304  [\\/]* | ?:[\\/]*)
21305  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21306  ;;
21307  *)
21308  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21309for as_dir in $PATH
21310do
21311  IFS=$as_save_IFS
21312  test -z "$as_dir" && as_dir=.
21313    for ac_exec_ext in '' $ac_executable_extensions; do
21314  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21315    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21316    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21317    break 2
21318  fi
21319done
21320  done
21321IFS=$as_save_IFS
21322
21323  ;;
21324esac
21325fi
21326UNZIP=$ac_cv_path_UNZIP
21327if test -n "$UNZIP"; then
21328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21329$as_echo "$UNZIP" >&6; }
21330else
21331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21332$as_echo "no" >&6; }
21333fi
21334
21335
21336          if test "x$UNZIP" = x; then
21337            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21338          fi
21339        else
21340          # Otherwise we believe it is a complete path. Use it as it is.
21341          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
21342$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
21343          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21344$as_echo_n "checking for UNZIP... " >&6; }
21345          if test ! -x "$tool_specified"; then
21346            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21347$as_echo "not found" >&6; }
21348            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21349          fi
21350          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21351$as_echo "$tool_specified" >&6; }
21352        fi
21353      fi
21354    fi
21355
21356  fi
21357
21358
21359
21360  if test "x$UNZIP" = x; then
21361    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
21362  fi
21363
21364
21365  # Since zip uses "ZIP" as a environment variable for passing options, we need
21366  # to name our variable differently, hence ZIPEXE.
21367
21368
21369
21370  # Publish this variable in the help.
21371
21372
21373  if [ -z "${ZIPEXE+x}" ]; then
21374    # The variable is not set by user, try to locate tool using the code snippet
21375    for ac_prog in zip
21376do
21377  # Extract the first word of "$ac_prog", so it can be a program name with args.
21378set dummy $ac_prog; ac_word=$2
21379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21380$as_echo_n "checking for $ac_word... " >&6; }
21381if ${ac_cv_path_ZIPEXE+:} false; then :
21382  $as_echo_n "(cached) " >&6
21383else
21384  case $ZIPEXE in
21385  [\\/]* | ?:[\\/]*)
21386  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21387  ;;
21388  *)
21389  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21390for as_dir in $PATH
21391do
21392  IFS=$as_save_IFS
21393  test -z "$as_dir" && as_dir=.
21394    for ac_exec_ext in '' $ac_executable_extensions; do
21395  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21396    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21397    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21398    break 2
21399  fi
21400done
21401  done
21402IFS=$as_save_IFS
21403
21404  ;;
21405esac
21406fi
21407ZIPEXE=$ac_cv_path_ZIPEXE
21408if test -n "$ZIPEXE"; then
21409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21410$as_echo "$ZIPEXE" >&6; }
21411else
21412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21413$as_echo "no" >&6; }
21414fi
21415
21416
21417  test -n "$ZIPEXE" && break
21418done
21419
21420  else
21421    # The variable is set, but is it from the command line or the environment?
21422
21423    # Try to remove the string !ZIPEXE! from our list.
21424    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIPEXE!/}
21425    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21426      # If it failed, the variable was not from the command line. Ignore it,
21427      # but warn the user (except for BASH, which is always set by the calling BASH).
21428      if test "xZIPEXE" != xBASH; then
21429        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&5
21430$as_echo "$as_me: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&2;}
21431      fi
21432      # Try to locate tool using the code snippet
21433      for ac_prog in zip
21434do
21435  # Extract the first word of "$ac_prog", so it can be a program name with args.
21436set dummy $ac_prog; ac_word=$2
21437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21438$as_echo_n "checking for $ac_word... " >&6; }
21439if ${ac_cv_path_ZIPEXE+:} false; then :
21440  $as_echo_n "(cached) " >&6
21441else
21442  case $ZIPEXE in
21443  [\\/]* | ?:[\\/]*)
21444  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21445  ;;
21446  *)
21447  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21448for as_dir in $PATH
21449do
21450  IFS=$as_save_IFS
21451  test -z "$as_dir" && as_dir=.
21452    for ac_exec_ext in '' $ac_executable_extensions; do
21453  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21454    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21455    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21456    break 2
21457  fi
21458done
21459  done
21460IFS=$as_save_IFS
21461
21462  ;;
21463esac
21464fi
21465ZIPEXE=$ac_cv_path_ZIPEXE
21466if test -n "$ZIPEXE"; then
21467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21468$as_echo "$ZIPEXE" >&6; }
21469else
21470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21471$as_echo "no" >&6; }
21472fi
21473
21474
21475  test -n "$ZIPEXE" && break
21476done
21477
21478    else
21479      # If it succeeded, then it was overridden by the user. We will use it
21480      # for the tool.
21481
21482      # First remove it from the list of overridden variables, so we can test
21483      # for unknown variables in the end.
21484      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21485
21486      # Check if we try to supply an empty value
21487      if test "x$ZIPEXE" = x; then
21488        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIPEXE= (no value)" >&5
21489$as_echo "$as_me: Setting user supplied tool ZIPEXE= (no value)" >&6;}
21490        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21491$as_echo_n "checking for ZIPEXE... " >&6; }
21492        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21493$as_echo "disabled" >&6; }
21494      else
21495        # Check if the provided tool contains a complete path.
21496        tool_specified="$ZIPEXE"
21497        tool_basename="${tool_specified##*/}"
21498        if test "x$tool_basename" = "x$tool_specified"; then
21499          # A command without a complete path is provided, search $PATH.
21500          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIPEXE=$tool_basename" >&5
21501$as_echo "$as_me: Will search for user supplied tool ZIPEXE=$tool_basename" >&6;}
21502          # Extract the first word of "$tool_basename", so it can be a program name with args.
21503set dummy $tool_basename; ac_word=$2
21504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21505$as_echo_n "checking for $ac_word... " >&6; }
21506if ${ac_cv_path_ZIPEXE+:} false; then :
21507  $as_echo_n "(cached) " >&6
21508else
21509  case $ZIPEXE in
21510  [\\/]* | ?:[\\/]*)
21511  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21512  ;;
21513  *)
21514  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21515for as_dir in $PATH
21516do
21517  IFS=$as_save_IFS
21518  test -z "$as_dir" && as_dir=.
21519    for ac_exec_ext in '' $ac_executable_extensions; do
21520  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21521    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21522    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21523    break 2
21524  fi
21525done
21526  done
21527IFS=$as_save_IFS
21528
21529  ;;
21530esac
21531fi
21532ZIPEXE=$ac_cv_path_ZIPEXE
21533if test -n "$ZIPEXE"; then
21534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21535$as_echo "$ZIPEXE" >&6; }
21536else
21537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21538$as_echo "no" >&6; }
21539fi
21540
21541
21542          if test "x$ZIPEXE" = x; then
21543            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21544          fi
21545        else
21546          # Otherwise we believe it is a complete path. Use it as it is.
21547          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIPEXE=$tool_specified" >&5
21548$as_echo "$as_me: Will use user supplied tool ZIPEXE=$tool_specified" >&6;}
21549          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21550$as_echo_n "checking for ZIPEXE... " >&6; }
21551          if test ! -x "$tool_specified"; then
21552            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21553$as_echo "not found" >&6; }
21554            as_fn_error $? "User supplied tool ZIPEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
21555          fi
21556          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21557$as_echo "$tool_specified" >&6; }
21558        fi
21559      fi
21560    fi
21561
21562  fi
21563
21564
21565
21566  if test "x$ZIPEXE" = x; then
21567    as_fn_error $? "Could not find required tool for ZIPEXE" "$LINENO" 5
21568  fi
21569
21570
21571
21572  # Non-required basic tools
21573
21574
21575
21576  # Publish this variable in the help.
21577
21578
21579  if [ -z "${LDD+x}" ]; then
21580    # The variable is not set by user, try to locate tool using the code snippet
21581    for ac_prog in ldd
21582do
21583  # Extract the first word of "$ac_prog", so it can be a program name with args.
21584set dummy $ac_prog; ac_word=$2
21585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21586$as_echo_n "checking for $ac_word... " >&6; }
21587if ${ac_cv_path_LDD+:} false; then :
21588  $as_echo_n "(cached) " >&6
21589else
21590  case $LDD in
21591  [\\/]* | ?:[\\/]*)
21592  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21593  ;;
21594  *)
21595  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21596for as_dir in $PATH
21597do
21598  IFS=$as_save_IFS
21599  test -z "$as_dir" && as_dir=.
21600    for ac_exec_ext in '' $ac_executable_extensions; do
21601  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21602    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21603    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21604    break 2
21605  fi
21606done
21607  done
21608IFS=$as_save_IFS
21609
21610  ;;
21611esac
21612fi
21613LDD=$ac_cv_path_LDD
21614if test -n "$LDD"; then
21615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21616$as_echo "$LDD" >&6; }
21617else
21618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21619$as_echo "no" >&6; }
21620fi
21621
21622
21623  test -n "$LDD" && break
21624done
21625
21626  else
21627    # The variable is set, but is it from the command line or the environment?
21628
21629    # Try to remove the string !LDD! from our list.
21630    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
21631    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21632      # If it failed, the variable was not from the command line. Ignore it,
21633      # but warn the user (except for BASH, which is always set by the calling BASH).
21634      if test "xLDD" != xBASH; then
21635        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
21636$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
21637      fi
21638      # Try to locate tool using the code snippet
21639      for ac_prog in ldd
21640do
21641  # Extract the first word of "$ac_prog", so it can be a program name with args.
21642set dummy $ac_prog; ac_word=$2
21643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21644$as_echo_n "checking for $ac_word... " >&6; }
21645if ${ac_cv_path_LDD+:} false; then :
21646  $as_echo_n "(cached) " >&6
21647else
21648  case $LDD in
21649  [\\/]* | ?:[\\/]*)
21650  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21651  ;;
21652  *)
21653  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21654for as_dir in $PATH
21655do
21656  IFS=$as_save_IFS
21657  test -z "$as_dir" && as_dir=.
21658    for ac_exec_ext in '' $ac_executable_extensions; do
21659  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21660    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21661    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21662    break 2
21663  fi
21664done
21665  done
21666IFS=$as_save_IFS
21667
21668  ;;
21669esac
21670fi
21671LDD=$ac_cv_path_LDD
21672if test -n "$LDD"; then
21673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21674$as_echo "$LDD" >&6; }
21675else
21676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21677$as_echo "no" >&6; }
21678fi
21679
21680
21681  test -n "$LDD" && break
21682done
21683
21684    else
21685      # If it succeeded, then it was overridden by the user. We will use it
21686      # for the tool.
21687
21688      # First remove it from the list of overridden variables, so we can test
21689      # for unknown variables in the end.
21690      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21691
21692      # Check if we try to supply an empty value
21693      if test "x$LDD" = x; then
21694        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
21695$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
21696        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21697$as_echo_n "checking for LDD... " >&6; }
21698        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21699$as_echo "disabled" >&6; }
21700      else
21701        # Check if the provided tool contains a complete path.
21702        tool_specified="$LDD"
21703        tool_basename="${tool_specified##*/}"
21704        if test "x$tool_basename" = "x$tool_specified"; then
21705          # A command without a complete path is provided, search $PATH.
21706          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
21707$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
21708          # Extract the first word of "$tool_basename", so it can be a program name with args.
21709set dummy $tool_basename; ac_word=$2
21710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21711$as_echo_n "checking for $ac_word... " >&6; }
21712if ${ac_cv_path_LDD+:} false; then :
21713  $as_echo_n "(cached) " >&6
21714else
21715  case $LDD in
21716  [\\/]* | ?:[\\/]*)
21717  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21718  ;;
21719  *)
21720  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21721for as_dir in $PATH
21722do
21723  IFS=$as_save_IFS
21724  test -z "$as_dir" && as_dir=.
21725    for ac_exec_ext in '' $ac_executable_extensions; do
21726  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21727    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21728    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21729    break 2
21730  fi
21731done
21732  done
21733IFS=$as_save_IFS
21734
21735  ;;
21736esac
21737fi
21738LDD=$ac_cv_path_LDD
21739if test -n "$LDD"; then
21740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21741$as_echo "$LDD" >&6; }
21742else
21743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21744$as_echo "no" >&6; }
21745fi
21746
21747
21748          if test "x$LDD" = x; then
21749            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21750          fi
21751        else
21752          # Otherwise we believe it is a complete path. Use it as it is.
21753          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
21754$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
21755          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21756$as_echo_n "checking for LDD... " >&6; }
21757          if test ! -x "$tool_specified"; then
21758            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21759$as_echo "not found" >&6; }
21760            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
21761          fi
21762          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21763$as_echo "$tool_specified" >&6; }
21764        fi
21765      fi
21766    fi
21767
21768  fi
21769
21770
21771  if test "x$LDD" = "x"; then
21772    # List shared lib dependencies is used for
21773    # debug output and checking for forbidden dependencies.
21774    # We can build without it.
21775    LDD="true"
21776  fi
21777
21778
21779  # Publish this variable in the help.
21780
21781
21782  if [ -z "${OTOOL+x}" ]; then
21783    # The variable is not set by user, try to locate tool using the code snippet
21784    for ac_prog in otool
21785do
21786  # Extract the first word of "$ac_prog", so it can be a program name with args.
21787set dummy $ac_prog; ac_word=$2
21788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21789$as_echo_n "checking for $ac_word... " >&6; }
21790if ${ac_cv_path_OTOOL+:} false; then :
21791  $as_echo_n "(cached) " >&6
21792else
21793  case $OTOOL in
21794  [\\/]* | ?:[\\/]*)
21795  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21796  ;;
21797  *)
21798  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21799for as_dir in $PATH
21800do
21801  IFS=$as_save_IFS
21802  test -z "$as_dir" && as_dir=.
21803    for ac_exec_ext in '' $ac_executable_extensions; do
21804  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21805    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21806    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21807    break 2
21808  fi
21809done
21810  done
21811IFS=$as_save_IFS
21812
21813  ;;
21814esac
21815fi
21816OTOOL=$ac_cv_path_OTOOL
21817if test -n "$OTOOL"; then
21818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21819$as_echo "$OTOOL" >&6; }
21820else
21821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21822$as_echo "no" >&6; }
21823fi
21824
21825
21826  test -n "$OTOOL" && break
21827done
21828
21829  else
21830    # The variable is set, but is it from the command line or the environment?
21831
21832    # Try to remove the string !OTOOL! from our list.
21833    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
21834    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21835      # If it failed, the variable was not from the command line. Ignore it,
21836      # but warn the user (except for BASH, which is always set by the calling BASH).
21837      if test "xOTOOL" != xBASH; then
21838        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
21839$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
21840      fi
21841      # Try to locate tool using the code snippet
21842      for ac_prog in otool
21843do
21844  # Extract the first word of "$ac_prog", so it can be a program name with args.
21845set dummy $ac_prog; ac_word=$2
21846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21847$as_echo_n "checking for $ac_word... " >&6; }
21848if ${ac_cv_path_OTOOL+:} false; then :
21849  $as_echo_n "(cached) " >&6
21850else
21851  case $OTOOL in
21852  [\\/]* | ?:[\\/]*)
21853  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21854  ;;
21855  *)
21856  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21857for as_dir in $PATH
21858do
21859  IFS=$as_save_IFS
21860  test -z "$as_dir" && as_dir=.
21861    for ac_exec_ext in '' $ac_executable_extensions; do
21862  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21863    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21864    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21865    break 2
21866  fi
21867done
21868  done
21869IFS=$as_save_IFS
21870
21871  ;;
21872esac
21873fi
21874OTOOL=$ac_cv_path_OTOOL
21875if test -n "$OTOOL"; then
21876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21877$as_echo "$OTOOL" >&6; }
21878else
21879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21880$as_echo "no" >&6; }
21881fi
21882
21883
21884  test -n "$OTOOL" && break
21885done
21886
21887    else
21888      # If it succeeded, then it was overridden by the user. We will use it
21889      # for the tool.
21890
21891      # First remove it from the list of overridden variables, so we can test
21892      # for unknown variables in the end.
21893      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21894
21895      # Check if we try to supply an empty value
21896      if test "x$OTOOL" = x; then
21897        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
21898$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
21899        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21900$as_echo_n "checking for OTOOL... " >&6; }
21901        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21902$as_echo "disabled" >&6; }
21903      else
21904        # Check if the provided tool contains a complete path.
21905        tool_specified="$OTOOL"
21906        tool_basename="${tool_specified##*/}"
21907        if test "x$tool_basename" = "x$tool_specified"; then
21908          # A command without a complete path is provided, search $PATH.
21909          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
21910$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
21911          # Extract the first word of "$tool_basename", so it can be a program name with args.
21912set dummy $tool_basename; ac_word=$2
21913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21914$as_echo_n "checking for $ac_word... " >&6; }
21915if ${ac_cv_path_OTOOL+:} false; then :
21916  $as_echo_n "(cached) " >&6
21917else
21918  case $OTOOL in
21919  [\\/]* | ?:[\\/]*)
21920  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21921  ;;
21922  *)
21923  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21924for as_dir in $PATH
21925do
21926  IFS=$as_save_IFS
21927  test -z "$as_dir" && as_dir=.
21928    for ac_exec_ext in '' $ac_executable_extensions; do
21929  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21930    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21931    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21932    break 2
21933  fi
21934done
21935  done
21936IFS=$as_save_IFS
21937
21938  ;;
21939esac
21940fi
21941OTOOL=$ac_cv_path_OTOOL
21942if test -n "$OTOOL"; then
21943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21944$as_echo "$OTOOL" >&6; }
21945else
21946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21947$as_echo "no" >&6; }
21948fi
21949
21950
21951          if test "x$OTOOL" = x; then
21952            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21953          fi
21954        else
21955          # Otherwise we believe it is a complete path. Use it as it is.
21956          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
21957$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
21958          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21959$as_echo_n "checking for OTOOL... " >&6; }
21960          if test ! -x "$tool_specified"; then
21961            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21962$as_echo "not found" >&6; }
21963            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
21964          fi
21965          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21966$as_echo "$tool_specified" >&6; }
21967        fi
21968      fi
21969    fi
21970
21971  fi
21972
21973
21974  if test "x$OTOOL" = "x"; then
21975    OTOOL="true"
21976  fi
21977
21978
21979  # Publish this variable in the help.
21980
21981
21982  if [ -z "${READELF+x}" ]; then
21983    # The variable is not set by user, try to locate tool using the code snippet
21984    for ac_prog in greadelf readelf
21985do
21986  # Extract the first word of "$ac_prog", so it can be a program name with args.
21987set dummy $ac_prog; ac_word=$2
21988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21989$as_echo_n "checking for $ac_word... " >&6; }
21990if ${ac_cv_path_READELF+:} false; then :
21991  $as_echo_n "(cached) " >&6
21992else
21993  case $READELF in
21994  [\\/]* | ?:[\\/]*)
21995  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21996  ;;
21997  *)
21998  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21999for as_dir in $PATH
22000do
22001  IFS=$as_save_IFS
22002  test -z "$as_dir" && as_dir=.
22003    for ac_exec_ext in '' $ac_executable_extensions; do
22004  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22005    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22006    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22007    break 2
22008  fi
22009done
22010  done
22011IFS=$as_save_IFS
22012
22013  ;;
22014esac
22015fi
22016READELF=$ac_cv_path_READELF
22017if test -n "$READELF"; then
22018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22019$as_echo "$READELF" >&6; }
22020else
22021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22022$as_echo "no" >&6; }
22023fi
22024
22025
22026  test -n "$READELF" && break
22027done
22028
22029  else
22030    # The variable is set, but is it from the command line or the environment?
22031
22032    # Try to remove the string !READELF! from our list.
22033    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
22034    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22035      # If it failed, the variable was not from the command line. Ignore it,
22036      # but warn the user (except for BASH, which is always set by the calling BASH).
22037      if test "xREADELF" != xBASH; then
22038        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
22039$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
22040      fi
22041      # Try to locate tool using the code snippet
22042      for ac_prog in greadelf readelf
22043do
22044  # Extract the first word of "$ac_prog", so it can be a program name with args.
22045set dummy $ac_prog; ac_word=$2
22046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22047$as_echo_n "checking for $ac_word... " >&6; }
22048if ${ac_cv_path_READELF+:} false; then :
22049  $as_echo_n "(cached) " >&6
22050else
22051  case $READELF in
22052  [\\/]* | ?:[\\/]*)
22053  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22054  ;;
22055  *)
22056  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22057for as_dir in $PATH
22058do
22059  IFS=$as_save_IFS
22060  test -z "$as_dir" && as_dir=.
22061    for ac_exec_ext in '' $ac_executable_extensions; do
22062  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22063    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22064    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22065    break 2
22066  fi
22067done
22068  done
22069IFS=$as_save_IFS
22070
22071  ;;
22072esac
22073fi
22074READELF=$ac_cv_path_READELF
22075if test -n "$READELF"; then
22076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22077$as_echo "$READELF" >&6; }
22078else
22079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22080$as_echo "no" >&6; }
22081fi
22082
22083
22084  test -n "$READELF" && break
22085done
22086
22087    else
22088      # If it succeeded, then it was overridden by the user. We will use it
22089      # for the tool.
22090
22091      # First remove it from the list of overridden variables, so we can test
22092      # for unknown variables in the end.
22093      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22094
22095      # Check if we try to supply an empty value
22096      if test "x$READELF" = x; then
22097        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
22098$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
22099        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22100$as_echo_n "checking for READELF... " >&6; }
22101        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22102$as_echo "disabled" >&6; }
22103      else
22104        # Check if the provided tool contains a complete path.
22105        tool_specified="$READELF"
22106        tool_basename="${tool_specified##*/}"
22107        if test "x$tool_basename" = "x$tool_specified"; then
22108          # A command without a complete path is provided, search $PATH.
22109          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
22110$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
22111          # Extract the first word of "$tool_basename", so it can be a program name with args.
22112set dummy $tool_basename; ac_word=$2
22113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22114$as_echo_n "checking for $ac_word... " >&6; }
22115if ${ac_cv_path_READELF+:} false; then :
22116  $as_echo_n "(cached) " >&6
22117else
22118  case $READELF in
22119  [\\/]* | ?:[\\/]*)
22120  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22121  ;;
22122  *)
22123  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22124for as_dir in $PATH
22125do
22126  IFS=$as_save_IFS
22127  test -z "$as_dir" && as_dir=.
22128    for ac_exec_ext in '' $ac_executable_extensions; do
22129  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22130    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22131    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22132    break 2
22133  fi
22134done
22135  done
22136IFS=$as_save_IFS
22137
22138  ;;
22139esac
22140fi
22141READELF=$ac_cv_path_READELF
22142if test -n "$READELF"; then
22143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22144$as_echo "$READELF" >&6; }
22145else
22146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22147$as_echo "no" >&6; }
22148fi
22149
22150
22151          if test "x$READELF" = x; then
22152            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22153          fi
22154        else
22155          # Otherwise we believe it is a complete path. Use it as it is.
22156          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
22157$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
22158          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22159$as_echo_n "checking for READELF... " >&6; }
22160          if test ! -x "$tool_specified"; then
22161            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22162$as_echo "not found" >&6; }
22163            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
22164          fi
22165          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22166$as_echo "$tool_specified" >&6; }
22167        fi
22168      fi
22169    fi
22170
22171  fi
22172
22173
22174
22175
22176  # Publish this variable in the help.
22177
22178
22179  if [ -z "${HG+x}" ]; then
22180    # The variable is not set by user, try to locate tool using the code snippet
22181    for ac_prog in hg
22182do
22183  # Extract the first word of "$ac_prog", so it can be a program name with args.
22184set dummy $ac_prog; ac_word=$2
22185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22186$as_echo_n "checking for $ac_word... " >&6; }
22187if ${ac_cv_path_HG+:} false; then :
22188  $as_echo_n "(cached) " >&6
22189else
22190  case $HG in
22191  [\\/]* | ?:[\\/]*)
22192  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22193  ;;
22194  *)
22195  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22196for as_dir in $PATH
22197do
22198  IFS=$as_save_IFS
22199  test -z "$as_dir" && as_dir=.
22200    for ac_exec_ext in '' $ac_executable_extensions; do
22201  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22202    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22204    break 2
22205  fi
22206done
22207  done
22208IFS=$as_save_IFS
22209
22210  ;;
22211esac
22212fi
22213HG=$ac_cv_path_HG
22214if test -n "$HG"; then
22215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22216$as_echo "$HG" >&6; }
22217else
22218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22219$as_echo "no" >&6; }
22220fi
22221
22222
22223  test -n "$HG" && break
22224done
22225
22226  else
22227    # The variable is set, but is it from the command line or the environment?
22228
22229    # Try to remove the string !HG! from our list.
22230    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
22231    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22232      # If it failed, the variable was not from the command line. Ignore it,
22233      # but warn the user (except for BASH, which is always set by the calling BASH).
22234      if test "xHG" != xBASH; then
22235        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
22236$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
22237      fi
22238      # Try to locate tool using the code snippet
22239      for ac_prog in hg
22240do
22241  # Extract the first word of "$ac_prog", so it can be a program name with args.
22242set dummy $ac_prog; ac_word=$2
22243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22244$as_echo_n "checking for $ac_word... " >&6; }
22245if ${ac_cv_path_HG+:} false; then :
22246  $as_echo_n "(cached) " >&6
22247else
22248  case $HG in
22249  [\\/]* | ?:[\\/]*)
22250  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22251  ;;
22252  *)
22253  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22254for as_dir in $PATH
22255do
22256  IFS=$as_save_IFS
22257  test -z "$as_dir" && as_dir=.
22258    for ac_exec_ext in '' $ac_executable_extensions; do
22259  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22260    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22261    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22262    break 2
22263  fi
22264done
22265  done
22266IFS=$as_save_IFS
22267
22268  ;;
22269esac
22270fi
22271HG=$ac_cv_path_HG
22272if test -n "$HG"; then
22273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22274$as_echo "$HG" >&6; }
22275else
22276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22277$as_echo "no" >&6; }
22278fi
22279
22280
22281  test -n "$HG" && break
22282done
22283
22284    else
22285      # If it succeeded, then it was overridden by the user. We will use it
22286      # for the tool.
22287
22288      # First remove it from the list of overridden variables, so we can test
22289      # for unknown variables in the end.
22290      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22291
22292      # Check if we try to supply an empty value
22293      if test "x$HG" = x; then
22294        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
22295$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
22296        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22297$as_echo_n "checking for HG... " >&6; }
22298        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22299$as_echo "disabled" >&6; }
22300      else
22301        # Check if the provided tool contains a complete path.
22302        tool_specified="$HG"
22303        tool_basename="${tool_specified##*/}"
22304        if test "x$tool_basename" = "x$tool_specified"; then
22305          # A command without a complete path is provided, search $PATH.
22306          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
22307$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
22308          # Extract the first word of "$tool_basename", so it can be a program name with args.
22309set dummy $tool_basename; ac_word=$2
22310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22311$as_echo_n "checking for $ac_word... " >&6; }
22312if ${ac_cv_path_HG+:} false; then :
22313  $as_echo_n "(cached) " >&6
22314else
22315  case $HG in
22316  [\\/]* | ?:[\\/]*)
22317  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22318  ;;
22319  *)
22320  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22321for as_dir in $PATH
22322do
22323  IFS=$as_save_IFS
22324  test -z "$as_dir" && as_dir=.
22325    for ac_exec_ext in '' $ac_executable_extensions; do
22326  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22327    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22328    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22329    break 2
22330  fi
22331done
22332  done
22333IFS=$as_save_IFS
22334
22335  ;;
22336esac
22337fi
22338HG=$ac_cv_path_HG
22339if test -n "$HG"; then
22340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22341$as_echo "$HG" >&6; }
22342else
22343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22344$as_echo "no" >&6; }
22345fi
22346
22347
22348          if test "x$HG" = x; then
22349            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22350          fi
22351        else
22352          # Otherwise we believe it is a complete path. Use it as it is.
22353          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
22354$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
22355          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22356$as_echo_n "checking for HG... " >&6; }
22357          if test ! -x "$tool_specified"; then
22358            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22359$as_echo "not found" >&6; }
22360            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
22361          fi
22362          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22363$as_echo "$tool_specified" >&6; }
22364        fi
22365      fi
22366    fi
22367
22368  fi
22369
22370
22371
22372
22373  # Publish this variable in the help.
22374
22375
22376  if [ -z "${STAT+x}" ]; then
22377    # The variable is not set by user, try to locate tool using the code snippet
22378    for ac_prog in stat
22379do
22380  # Extract the first word of "$ac_prog", so it can be a program name with args.
22381set dummy $ac_prog; ac_word=$2
22382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22383$as_echo_n "checking for $ac_word... " >&6; }
22384if ${ac_cv_path_STAT+:} false; then :
22385  $as_echo_n "(cached) " >&6
22386else
22387  case $STAT in
22388  [\\/]* | ?:[\\/]*)
22389  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22390  ;;
22391  *)
22392  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22393for as_dir in $PATH
22394do
22395  IFS=$as_save_IFS
22396  test -z "$as_dir" && as_dir=.
22397    for ac_exec_ext in '' $ac_executable_extensions; do
22398  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22399    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22400    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22401    break 2
22402  fi
22403done
22404  done
22405IFS=$as_save_IFS
22406
22407  ;;
22408esac
22409fi
22410STAT=$ac_cv_path_STAT
22411if test -n "$STAT"; then
22412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22413$as_echo "$STAT" >&6; }
22414else
22415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22416$as_echo "no" >&6; }
22417fi
22418
22419
22420  test -n "$STAT" && break
22421done
22422
22423  else
22424    # The variable is set, but is it from the command line or the environment?
22425
22426    # Try to remove the string !STAT! from our list.
22427    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
22428    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22429      # If it failed, the variable was not from the command line. Ignore it,
22430      # but warn the user (except for BASH, which is always set by the calling BASH).
22431      if test "xSTAT" != xBASH; then
22432        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
22433$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
22434      fi
22435      # Try to locate tool using the code snippet
22436      for ac_prog in stat
22437do
22438  # Extract the first word of "$ac_prog", so it can be a program name with args.
22439set dummy $ac_prog; ac_word=$2
22440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22441$as_echo_n "checking for $ac_word... " >&6; }
22442if ${ac_cv_path_STAT+:} false; then :
22443  $as_echo_n "(cached) " >&6
22444else
22445  case $STAT in
22446  [\\/]* | ?:[\\/]*)
22447  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22448  ;;
22449  *)
22450  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22451for as_dir in $PATH
22452do
22453  IFS=$as_save_IFS
22454  test -z "$as_dir" && as_dir=.
22455    for ac_exec_ext in '' $ac_executable_extensions; do
22456  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22457    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22458    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22459    break 2
22460  fi
22461done
22462  done
22463IFS=$as_save_IFS
22464
22465  ;;
22466esac
22467fi
22468STAT=$ac_cv_path_STAT
22469if test -n "$STAT"; then
22470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22471$as_echo "$STAT" >&6; }
22472else
22473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22474$as_echo "no" >&6; }
22475fi
22476
22477
22478  test -n "$STAT" && break
22479done
22480
22481    else
22482      # If it succeeded, then it was overridden by the user. We will use it
22483      # for the tool.
22484
22485      # First remove it from the list of overridden variables, so we can test
22486      # for unknown variables in the end.
22487      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22488
22489      # Check if we try to supply an empty value
22490      if test "x$STAT" = x; then
22491        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
22492$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
22493        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22494$as_echo_n "checking for STAT... " >&6; }
22495        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22496$as_echo "disabled" >&6; }
22497      else
22498        # Check if the provided tool contains a complete path.
22499        tool_specified="$STAT"
22500        tool_basename="${tool_specified##*/}"
22501        if test "x$tool_basename" = "x$tool_specified"; then
22502          # A command without a complete path is provided, search $PATH.
22503          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
22504$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
22505          # Extract the first word of "$tool_basename", so it can be a program name with args.
22506set dummy $tool_basename; ac_word=$2
22507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22508$as_echo_n "checking for $ac_word... " >&6; }
22509if ${ac_cv_path_STAT+:} false; then :
22510  $as_echo_n "(cached) " >&6
22511else
22512  case $STAT in
22513  [\\/]* | ?:[\\/]*)
22514  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22515  ;;
22516  *)
22517  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22518for as_dir in $PATH
22519do
22520  IFS=$as_save_IFS
22521  test -z "$as_dir" && as_dir=.
22522    for ac_exec_ext in '' $ac_executable_extensions; do
22523  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22524    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22525    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22526    break 2
22527  fi
22528done
22529  done
22530IFS=$as_save_IFS
22531
22532  ;;
22533esac
22534fi
22535STAT=$ac_cv_path_STAT
22536if test -n "$STAT"; then
22537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22538$as_echo "$STAT" >&6; }
22539else
22540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22541$as_echo "no" >&6; }
22542fi
22543
22544
22545          if test "x$STAT" = x; then
22546            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22547          fi
22548        else
22549          # Otherwise we believe it is a complete path. Use it as it is.
22550          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
22551$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
22552          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22553$as_echo_n "checking for STAT... " >&6; }
22554          if test ! -x "$tool_specified"; then
22555            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22556$as_echo "not found" >&6; }
22557            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
22558          fi
22559          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22560$as_echo "$tool_specified" >&6; }
22561        fi
22562      fi
22563    fi
22564
22565  fi
22566
22567
22568
22569
22570  # Publish this variable in the help.
22571
22572
22573  if [ -z "${TIME+x}" ]; then
22574    # The variable is not set by user, try to locate tool using the code snippet
22575    for ac_prog in time
22576do
22577  # Extract the first word of "$ac_prog", so it can be a program name with args.
22578set dummy $ac_prog; ac_word=$2
22579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22580$as_echo_n "checking for $ac_word... " >&6; }
22581if ${ac_cv_path_TIME+:} false; then :
22582  $as_echo_n "(cached) " >&6
22583else
22584  case $TIME in
22585  [\\/]* | ?:[\\/]*)
22586  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22587  ;;
22588  *)
22589  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22590for as_dir in $PATH
22591do
22592  IFS=$as_save_IFS
22593  test -z "$as_dir" && as_dir=.
22594    for ac_exec_ext in '' $ac_executable_extensions; do
22595  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22596    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22597    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22598    break 2
22599  fi
22600done
22601  done
22602IFS=$as_save_IFS
22603
22604  ;;
22605esac
22606fi
22607TIME=$ac_cv_path_TIME
22608if test -n "$TIME"; then
22609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22610$as_echo "$TIME" >&6; }
22611else
22612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22613$as_echo "no" >&6; }
22614fi
22615
22616
22617  test -n "$TIME" && break
22618done
22619
22620  else
22621    # The variable is set, but is it from the command line or the environment?
22622
22623    # Try to remove the string !TIME! from our list.
22624    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
22625    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22626      # If it failed, the variable was not from the command line. Ignore it,
22627      # but warn the user (except for BASH, which is always set by the calling BASH).
22628      if test "xTIME" != xBASH; then
22629        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
22630$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
22631      fi
22632      # Try to locate tool using the code snippet
22633      for ac_prog in time
22634do
22635  # Extract the first word of "$ac_prog", so it can be a program name with args.
22636set dummy $ac_prog; ac_word=$2
22637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22638$as_echo_n "checking for $ac_word... " >&6; }
22639if ${ac_cv_path_TIME+:} false; then :
22640  $as_echo_n "(cached) " >&6
22641else
22642  case $TIME in
22643  [\\/]* | ?:[\\/]*)
22644  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22645  ;;
22646  *)
22647  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22648for as_dir in $PATH
22649do
22650  IFS=$as_save_IFS
22651  test -z "$as_dir" && as_dir=.
22652    for ac_exec_ext in '' $ac_executable_extensions; do
22653  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22654    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22655    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22656    break 2
22657  fi
22658done
22659  done
22660IFS=$as_save_IFS
22661
22662  ;;
22663esac
22664fi
22665TIME=$ac_cv_path_TIME
22666if test -n "$TIME"; then
22667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22668$as_echo "$TIME" >&6; }
22669else
22670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22671$as_echo "no" >&6; }
22672fi
22673
22674
22675  test -n "$TIME" && break
22676done
22677
22678    else
22679      # If it succeeded, then it was overridden by the user. We will use it
22680      # for the tool.
22681
22682      # First remove it from the list of overridden variables, so we can test
22683      # for unknown variables in the end.
22684      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22685
22686      # Check if we try to supply an empty value
22687      if test "x$TIME" = x; then
22688        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
22689$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
22690        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22691$as_echo_n "checking for TIME... " >&6; }
22692        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22693$as_echo "disabled" >&6; }
22694      else
22695        # Check if the provided tool contains a complete path.
22696        tool_specified="$TIME"
22697        tool_basename="${tool_specified##*/}"
22698        if test "x$tool_basename" = "x$tool_specified"; then
22699          # A command without a complete path is provided, search $PATH.
22700          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
22701$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
22702          # Extract the first word of "$tool_basename", so it can be a program name with args.
22703set dummy $tool_basename; ac_word=$2
22704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22705$as_echo_n "checking for $ac_word... " >&6; }
22706if ${ac_cv_path_TIME+:} false; then :
22707  $as_echo_n "(cached) " >&6
22708else
22709  case $TIME in
22710  [\\/]* | ?:[\\/]*)
22711  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22712  ;;
22713  *)
22714  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22715for as_dir in $PATH
22716do
22717  IFS=$as_save_IFS
22718  test -z "$as_dir" && as_dir=.
22719    for ac_exec_ext in '' $ac_executable_extensions; do
22720  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22721    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22722    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22723    break 2
22724  fi
22725done
22726  done
22727IFS=$as_save_IFS
22728
22729  ;;
22730esac
22731fi
22732TIME=$ac_cv_path_TIME
22733if test -n "$TIME"; then
22734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22735$as_echo "$TIME" >&6; }
22736else
22737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22738$as_echo "no" >&6; }
22739fi
22740
22741
22742          if test "x$TIME" = x; then
22743            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22744          fi
22745        else
22746          # Otherwise we believe it is a complete path. Use it as it is.
22747          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
22748$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
22749          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22750$as_echo_n "checking for TIME... " >&6; }
22751          if test ! -x "$tool_specified"; then
22752            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22753$as_echo "not found" >&6; }
22754            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
22755          fi
22756          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22757$as_echo "$tool_specified" >&6; }
22758        fi
22759      fi
22760    fi
22761
22762  fi
22763
22764
22765  # Dtrace is usually found in /usr/sbin on Solaris, but that directory may not
22766  # be in the user path.
22767
22768
22769  # Publish this variable in the help.
22770
22771
22772  if [ -z "${DTRACE+x}" ]; then
22773    # The variable is not set by user, try to locate tool using the code snippet
22774    for ac_prog in dtrace
22775do
22776  # Extract the first word of "$ac_prog", so it can be a program name with args.
22777set dummy $ac_prog; ac_word=$2
22778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22779$as_echo_n "checking for $ac_word... " >&6; }
22780if ${ac_cv_path_DTRACE+:} false; then :
22781  $as_echo_n "(cached) " >&6
22782else
22783  case $DTRACE in
22784  [\\/]* | ?:[\\/]*)
22785  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22786  ;;
22787  *)
22788  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22789as_dummy="$PATH:/usr/sbin"
22790for as_dir in $as_dummy
22791do
22792  IFS=$as_save_IFS
22793  test -z "$as_dir" && as_dir=.
22794    for ac_exec_ext in '' $ac_executable_extensions; do
22795  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22796    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22797    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22798    break 2
22799  fi
22800done
22801  done
22802IFS=$as_save_IFS
22803
22804  ;;
22805esac
22806fi
22807DTRACE=$ac_cv_path_DTRACE
22808if test -n "$DTRACE"; then
22809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22810$as_echo "$DTRACE" >&6; }
22811else
22812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22813$as_echo "no" >&6; }
22814fi
22815
22816
22817  test -n "$DTRACE" && break
22818done
22819
22820  else
22821    # The variable is set, but is it from the command line or the environment?
22822
22823    # Try to remove the string !DTRACE! from our list.
22824    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
22825    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22826      # If it failed, the variable was not from the command line. Ignore it,
22827      # but warn the user (except for BASH, which is always set by the calling BASH).
22828      if test "xDTRACE" != xBASH; then
22829        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
22830$as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
22831      fi
22832      # Try to locate tool using the code snippet
22833      for ac_prog in dtrace
22834do
22835  # Extract the first word of "$ac_prog", so it can be a program name with args.
22836set dummy $ac_prog; ac_word=$2
22837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22838$as_echo_n "checking for $ac_word... " >&6; }
22839if ${ac_cv_path_DTRACE+:} false; then :
22840  $as_echo_n "(cached) " >&6
22841else
22842  case $DTRACE in
22843  [\\/]* | ?:[\\/]*)
22844  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22845  ;;
22846  *)
22847  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22848as_dummy="$PATH:/usr/sbin"
22849for as_dir in $as_dummy
22850do
22851  IFS=$as_save_IFS
22852  test -z "$as_dir" && as_dir=.
22853    for ac_exec_ext in '' $ac_executable_extensions; do
22854  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22855    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22856    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22857    break 2
22858  fi
22859done
22860  done
22861IFS=$as_save_IFS
22862
22863  ;;
22864esac
22865fi
22866DTRACE=$ac_cv_path_DTRACE
22867if test -n "$DTRACE"; then
22868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22869$as_echo "$DTRACE" >&6; }
22870else
22871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22872$as_echo "no" >&6; }
22873fi
22874
22875
22876  test -n "$DTRACE" && break
22877done
22878
22879    else
22880      # If it succeeded, then it was overridden by the user. We will use it
22881      # for the tool.
22882
22883      # First remove it from the list of overridden variables, so we can test
22884      # for unknown variables in the end.
22885      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22886
22887      # Check if we try to supply an empty value
22888      if test "x$DTRACE" = x; then
22889        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
22890$as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
22891        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22892$as_echo_n "checking for DTRACE... " >&6; }
22893        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22894$as_echo "disabled" >&6; }
22895      else
22896        # Check if the provided tool contains a complete path.
22897        tool_specified="$DTRACE"
22898        tool_basename="${tool_specified##*/}"
22899        if test "x$tool_basename" = "x$tool_specified"; then
22900          # A command without a complete path is provided, search $PATH.
22901          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
22902$as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
22903          # Extract the first word of "$tool_basename", so it can be a program name with args.
22904set dummy $tool_basename; ac_word=$2
22905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22906$as_echo_n "checking for $ac_word... " >&6; }
22907if ${ac_cv_path_DTRACE+:} false; then :
22908  $as_echo_n "(cached) " >&6
22909else
22910  case $DTRACE in
22911  [\\/]* | ?:[\\/]*)
22912  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22913  ;;
22914  *)
22915  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22916for as_dir in $PATH
22917do
22918  IFS=$as_save_IFS
22919  test -z "$as_dir" && as_dir=.
22920    for ac_exec_ext in '' $ac_executable_extensions; do
22921  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22922    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22923    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22924    break 2
22925  fi
22926done
22927  done
22928IFS=$as_save_IFS
22929
22930  ;;
22931esac
22932fi
22933DTRACE=$ac_cv_path_DTRACE
22934if test -n "$DTRACE"; then
22935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22936$as_echo "$DTRACE" >&6; }
22937else
22938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22939$as_echo "no" >&6; }
22940fi
22941
22942
22943          if test "x$DTRACE" = x; then
22944            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22945          fi
22946        else
22947          # Otherwise we believe it is a complete path. Use it as it is.
22948          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
22949$as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
22950          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22951$as_echo_n "checking for DTRACE... " >&6; }
22952          if test ! -x "$tool_specified"; then
22953            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22954$as_echo "not found" >&6; }
22955            as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
22956          fi
22957          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22958$as_echo "$tool_specified" >&6; }
22959        fi
22960      fi
22961    fi
22962
22963  fi
22964
22965
22966
22967
22968  # Publish this variable in the help.
22969
22970
22971  if [ -z "${PATCH+x}" ]; then
22972    # The variable is not set by user, try to locate tool using the code snippet
22973    for ac_prog in gpatch patch
22974do
22975  # Extract the first word of "$ac_prog", so it can be a program name with args.
22976set dummy $ac_prog; ac_word=$2
22977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22978$as_echo_n "checking for $ac_word... " >&6; }
22979if ${ac_cv_path_PATCH+:} false; then :
22980  $as_echo_n "(cached) " >&6
22981else
22982  case $PATCH in
22983  [\\/]* | ?:[\\/]*)
22984  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22985  ;;
22986  *)
22987  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22988for as_dir in $PATH
22989do
22990  IFS=$as_save_IFS
22991  test -z "$as_dir" && as_dir=.
22992    for ac_exec_ext in '' $ac_executable_extensions; do
22993  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22994    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22995    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22996    break 2
22997  fi
22998done
22999  done
23000IFS=$as_save_IFS
23001
23002  ;;
23003esac
23004fi
23005PATCH=$ac_cv_path_PATCH
23006if test -n "$PATCH"; then
23007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23008$as_echo "$PATCH" >&6; }
23009else
23010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23011$as_echo "no" >&6; }
23012fi
23013
23014
23015  test -n "$PATCH" && break
23016done
23017
23018  else
23019    # The variable is set, but is it from the command line or the environment?
23020
23021    # Try to remove the string !PATCH! from our list.
23022    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
23023    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23024      # If it failed, the variable was not from the command line. Ignore it,
23025      # but warn the user (except for BASH, which is always set by the calling BASH).
23026      if test "xPATCH" != xBASH; then
23027        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
23028$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
23029      fi
23030      # Try to locate tool using the code snippet
23031      for ac_prog in gpatch patch
23032do
23033  # Extract the first word of "$ac_prog", so it can be a program name with args.
23034set dummy $ac_prog; ac_word=$2
23035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23036$as_echo_n "checking for $ac_word... " >&6; }
23037if ${ac_cv_path_PATCH+:} false; then :
23038  $as_echo_n "(cached) " >&6
23039else
23040  case $PATCH in
23041  [\\/]* | ?:[\\/]*)
23042  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23043  ;;
23044  *)
23045  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23046for as_dir in $PATH
23047do
23048  IFS=$as_save_IFS
23049  test -z "$as_dir" && as_dir=.
23050    for ac_exec_ext in '' $ac_executable_extensions; do
23051  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23052    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23053    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23054    break 2
23055  fi
23056done
23057  done
23058IFS=$as_save_IFS
23059
23060  ;;
23061esac
23062fi
23063PATCH=$ac_cv_path_PATCH
23064if test -n "$PATCH"; then
23065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23066$as_echo "$PATCH" >&6; }
23067else
23068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23069$as_echo "no" >&6; }
23070fi
23071
23072
23073  test -n "$PATCH" && break
23074done
23075
23076    else
23077      # If it succeeded, then it was overridden by the user. We will use it
23078      # for the tool.
23079
23080      # First remove it from the list of overridden variables, so we can test
23081      # for unknown variables in the end.
23082      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23083
23084      # Check if we try to supply an empty value
23085      if test "x$PATCH" = x; then
23086        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
23087$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
23088        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23089$as_echo_n "checking for PATCH... " >&6; }
23090        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23091$as_echo "disabled" >&6; }
23092      else
23093        # Check if the provided tool contains a complete path.
23094        tool_specified="$PATCH"
23095        tool_basename="${tool_specified##*/}"
23096        if test "x$tool_basename" = "x$tool_specified"; then
23097          # A command without a complete path is provided, search $PATH.
23098          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
23099$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
23100          # Extract the first word of "$tool_basename", so it can be a program name with args.
23101set dummy $tool_basename; ac_word=$2
23102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23103$as_echo_n "checking for $ac_word... " >&6; }
23104if ${ac_cv_path_PATCH+:} false; then :
23105  $as_echo_n "(cached) " >&6
23106else
23107  case $PATCH in
23108  [\\/]* | ?:[\\/]*)
23109  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23110  ;;
23111  *)
23112  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23113for as_dir in $PATH
23114do
23115  IFS=$as_save_IFS
23116  test -z "$as_dir" && as_dir=.
23117    for ac_exec_ext in '' $ac_executable_extensions; do
23118  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23119    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23121    break 2
23122  fi
23123done
23124  done
23125IFS=$as_save_IFS
23126
23127  ;;
23128esac
23129fi
23130PATCH=$ac_cv_path_PATCH
23131if test -n "$PATCH"; then
23132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23133$as_echo "$PATCH" >&6; }
23134else
23135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23136$as_echo "no" >&6; }
23137fi
23138
23139
23140          if test "x$PATCH" = x; then
23141            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23142          fi
23143        else
23144          # Otherwise we believe it is a complete path. Use it as it is.
23145          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
23146$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
23147          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23148$as_echo_n "checking for PATCH... " >&6; }
23149          if test ! -x "$tool_specified"; then
23150            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23151$as_echo "not found" >&6; }
23152            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
23153          fi
23154          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23155$as_echo "$tool_specified" >&6; }
23156        fi
23157      fi
23158    fi
23159
23160  fi
23161
23162
23163  # Check if it's GNU time
23164  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
23165  if test "x$IS_GNU_TIME" != x; then
23166    IS_GNU_TIME=yes
23167  else
23168    IS_GNU_TIME=no
23169  fi
23170
23171
23172  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
23173
23174
23175
23176  # Publish this variable in the help.
23177
23178
23179  if [ -z "${DSYMUTIL+x}" ]; then
23180    # The variable is not set by user, try to locate tool using the code snippet
23181    for ac_prog in dsymutil
23182do
23183  # Extract the first word of "$ac_prog", so it can be a program name with args.
23184set dummy $ac_prog; ac_word=$2
23185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23186$as_echo_n "checking for $ac_word... " >&6; }
23187if ${ac_cv_path_DSYMUTIL+:} false; then :
23188  $as_echo_n "(cached) " >&6
23189else
23190  case $DSYMUTIL in
23191  [\\/]* | ?:[\\/]*)
23192  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23193  ;;
23194  *)
23195  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23196for as_dir in $PATH
23197do
23198  IFS=$as_save_IFS
23199  test -z "$as_dir" && as_dir=.
23200    for ac_exec_ext in '' $ac_executable_extensions; do
23201  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23202    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23204    break 2
23205  fi
23206done
23207  done
23208IFS=$as_save_IFS
23209
23210  ;;
23211esac
23212fi
23213DSYMUTIL=$ac_cv_path_DSYMUTIL
23214if test -n "$DSYMUTIL"; then
23215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23216$as_echo "$DSYMUTIL" >&6; }
23217else
23218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23219$as_echo "no" >&6; }
23220fi
23221
23222
23223  test -n "$DSYMUTIL" && break
23224done
23225
23226  else
23227    # The variable is set, but is it from the command line or the environment?
23228
23229    # Try to remove the string !DSYMUTIL! from our list.
23230    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
23231    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23232      # If it failed, the variable was not from the command line. Ignore it,
23233      # but warn the user (except for BASH, which is always set by the calling BASH).
23234      if test "xDSYMUTIL" != xBASH; then
23235        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
23236$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
23237      fi
23238      # Try to locate tool using the code snippet
23239      for ac_prog in dsymutil
23240do
23241  # Extract the first word of "$ac_prog", so it can be a program name with args.
23242set dummy $ac_prog; ac_word=$2
23243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23244$as_echo_n "checking for $ac_word... " >&6; }
23245if ${ac_cv_path_DSYMUTIL+:} false; then :
23246  $as_echo_n "(cached) " >&6
23247else
23248  case $DSYMUTIL in
23249  [\\/]* | ?:[\\/]*)
23250  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23251  ;;
23252  *)
23253  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23254for as_dir in $PATH
23255do
23256  IFS=$as_save_IFS
23257  test -z "$as_dir" && as_dir=.
23258    for ac_exec_ext in '' $ac_executable_extensions; do
23259  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23260    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23261    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23262    break 2
23263  fi
23264done
23265  done
23266IFS=$as_save_IFS
23267
23268  ;;
23269esac
23270fi
23271DSYMUTIL=$ac_cv_path_DSYMUTIL
23272if test -n "$DSYMUTIL"; then
23273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23274$as_echo "$DSYMUTIL" >&6; }
23275else
23276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23277$as_echo "no" >&6; }
23278fi
23279
23280
23281  test -n "$DSYMUTIL" && break
23282done
23283
23284    else
23285      # If it succeeded, then it was overridden by the user. We will use it
23286      # for the tool.
23287
23288      # First remove it from the list of overridden variables, so we can test
23289      # for unknown variables in the end.
23290      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23291
23292      # Check if we try to supply an empty value
23293      if test "x$DSYMUTIL" = x; then
23294        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
23295$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
23296        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23297$as_echo_n "checking for DSYMUTIL... " >&6; }
23298        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23299$as_echo "disabled" >&6; }
23300      else
23301        # Check if the provided tool contains a complete path.
23302        tool_specified="$DSYMUTIL"
23303        tool_basename="${tool_specified##*/}"
23304        if test "x$tool_basename" = "x$tool_specified"; then
23305          # A command without a complete path is provided, search $PATH.
23306          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
23307$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
23308          # Extract the first word of "$tool_basename", so it can be a program name with args.
23309set dummy $tool_basename; ac_word=$2
23310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23311$as_echo_n "checking for $ac_word... " >&6; }
23312if ${ac_cv_path_DSYMUTIL+:} false; then :
23313  $as_echo_n "(cached) " >&6
23314else
23315  case $DSYMUTIL in
23316  [\\/]* | ?:[\\/]*)
23317  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23318  ;;
23319  *)
23320  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23321for as_dir in $PATH
23322do
23323  IFS=$as_save_IFS
23324  test -z "$as_dir" && as_dir=.
23325    for ac_exec_ext in '' $ac_executable_extensions; do
23326  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23327    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23328    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23329    break 2
23330  fi
23331done
23332  done
23333IFS=$as_save_IFS
23334
23335  ;;
23336esac
23337fi
23338DSYMUTIL=$ac_cv_path_DSYMUTIL
23339if test -n "$DSYMUTIL"; then
23340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23341$as_echo "$DSYMUTIL" >&6; }
23342else
23343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23344$as_echo "no" >&6; }
23345fi
23346
23347
23348          if test "x$DSYMUTIL" = x; then
23349            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23350          fi
23351        else
23352          # Otherwise we believe it is a complete path. Use it as it is.
23353          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
23354$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
23355          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23356$as_echo_n "checking for DSYMUTIL... " >&6; }
23357          if test ! -x "$tool_specified"; then
23358            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23359$as_echo "not found" >&6; }
23360            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
23361          fi
23362          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23363$as_echo "$tool_specified" >&6; }
23364        fi
23365      fi
23366    fi
23367
23368  fi
23369
23370
23371
23372  if test "x$DSYMUTIL" = x; then
23373    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
23374  fi
23375
23376
23377
23378
23379
23380  # Publish this variable in the help.
23381
23382
23383  if [ -z "${XATTR+x}" ]; then
23384    # The variable is not set by user, try to locate tool using the code snippet
23385    for ac_prog in xattr
23386do
23387  # Extract the first word of "$ac_prog", so it can be a program name with args.
23388set dummy $ac_prog; ac_word=$2
23389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23390$as_echo_n "checking for $ac_word... " >&6; }
23391if ${ac_cv_path_XATTR+:} false; then :
23392  $as_echo_n "(cached) " >&6
23393else
23394  case $XATTR in
23395  [\\/]* | ?:[\\/]*)
23396  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23397  ;;
23398  *)
23399  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23400for as_dir in $PATH
23401do
23402  IFS=$as_save_IFS
23403  test -z "$as_dir" && as_dir=.
23404    for ac_exec_ext in '' $ac_executable_extensions; do
23405  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23406    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23407    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23408    break 2
23409  fi
23410done
23411  done
23412IFS=$as_save_IFS
23413
23414  ;;
23415esac
23416fi
23417XATTR=$ac_cv_path_XATTR
23418if test -n "$XATTR"; then
23419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23420$as_echo "$XATTR" >&6; }
23421else
23422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23423$as_echo "no" >&6; }
23424fi
23425
23426
23427  test -n "$XATTR" && break
23428done
23429
23430  else
23431    # The variable is set, but is it from the command line or the environment?
23432
23433    # Try to remove the string !XATTR! from our list.
23434    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
23435    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23436      # If it failed, the variable was not from the command line. Ignore it,
23437      # but warn the user (except for BASH, which is always set by the calling BASH).
23438      if test "xXATTR" != xBASH; then
23439        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
23440$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
23441      fi
23442      # Try to locate tool using the code snippet
23443      for ac_prog in xattr
23444do
23445  # Extract the first word of "$ac_prog", so it can be a program name with args.
23446set dummy $ac_prog; ac_word=$2
23447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23448$as_echo_n "checking for $ac_word... " >&6; }
23449if ${ac_cv_path_XATTR+:} false; then :
23450  $as_echo_n "(cached) " >&6
23451else
23452  case $XATTR in
23453  [\\/]* | ?:[\\/]*)
23454  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23455  ;;
23456  *)
23457  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23458for as_dir in $PATH
23459do
23460  IFS=$as_save_IFS
23461  test -z "$as_dir" && as_dir=.
23462    for ac_exec_ext in '' $ac_executable_extensions; do
23463  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23464    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23465    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23466    break 2
23467  fi
23468done
23469  done
23470IFS=$as_save_IFS
23471
23472  ;;
23473esac
23474fi
23475XATTR=$ac_cv_path_XATTR
23476if test -n "$XATTR"; then
23477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23478$as_echo "$XATTR" >&6; }
23479else
23480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23481$as_echo "no" >&6; }
23482fi
23483
23484
23485  test -n "$XATTR" && break
23486done
23487
23488    else
23489      # If it succeeded, then it was overridden by the user. We will use it
23490      # for the tool.
23491
23492      # First remove it from the list of overridden variables, so we can test
23493      # for unknown variables in the end.
23494      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23495
23496      # Check if we try to supply an empty value
23497      if test "x$XATTR" = x; then
23498        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
23499$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
23500        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23501$as_echo_n "checking for XATTR... " >&6; }
23502        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23503$as_echo "disabled" >&6; }
23504      else
23505        # Check if the provided tool contains a complete path.
23506        tool_specified="$XATTR"
23507        tool_basename="${tool_specified##*/}"
23508        if test "x$tool_basename" = "x$tool_specified"; then
23509          # A command without a complete path is provided, search $PATH.
23510          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
23511$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
23512          # Extract the first word of "$tool_basename", so it can be a program name with args.
23513set dummy $tool_basename; ac_word=$2
23514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23515$as_echo_n "checking for $ac_word... " >&6; }
23516if ${ac_cv_path_XATTR+:} false; then :
23517  $as_echo_n "(cached) " >&6
23518else
23519  case $XATTR in
23520  [\\/]* | ?:[\\/]*)
23521  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23522  ;;
23523  *)
23524  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23525for as_dir in $PATH
23526do
23527  IFS=$as_save_IFS
23528  test -z "$as_dir" && as_dir=.
23529    for ac_exec_ext in '' $ac_executable_extensions; do
23530  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23531    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23532    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23533    break 2
23534  fi
23535done
23536  done
23537IFS=$as_save_IFS
23538
23539  ;;
23540esac
23541fi
23542XATTR=$ac_cv_path_XATTR
23543if test -n "$XATTR"; then
23544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23545$as_echo "$XATTR" >&6; }
23546else
23547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23548$as_echo "no" >&6; }
23549fi
23550
23551
23552          if test "x$XATTR" = x; then
23553            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23554          fi
23555        else
23556          # Otherwise we believe it is a complete path. Use it as it is.
23557          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
23558$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
23559          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23560$as_echo_n "checking for XATTR... " >&6; }
23561          if test ! -x "$tool_specified"; then
23562            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23563$as_echo "not found" >&6; }
23564            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
23565          fi
23566          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23567$as_echo "$tool_specified" >&6; }
23568        fi
23569      fi
23570    fi
23571
23572  fi
23573
23574
23575
23576  if test "x$XATTR" = x; then
23577    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
23578  fi
23579
23580
23581
23582
23583  # Publish this variable in the help.
23584
23585
23586  if [ -z "${CODESIGN+x}" ]; then
23587    # The variable is not set by user, try to locate tool using the code snippet
23588    for ac_prog in codesign
23589do
23590  # Extract the first word of "$ac_prog", so it can be a program name with args.
23591set dummy $ac_prog; ac_word=$2
23592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23593$as_echo_n "checking for $ac_word... " >&6; }
23594if ${ac_cv_path_CODESIGN+:} false; then :
23595  $as_echo_n "(cached) " >&6
23596else
23597  case $CODESIGN in
23598  [\\/]* | ?:[\\/]*)
23599  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23600  ;;
23601  *)
23602  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23603for as_dir in $PATH
23604do
23605  IFS=$as_save_IFS
23606  test -z "$as_dir" && as_dir=.
23607    for ac_exec_ext in '' $ac_executable_extensions; do
23608  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23609    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23610    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23611    break 2
23612  fi
23613done
23614  done
23615IFS=$as_save_IFS
23616
23617  ;;
23618esac
23619fi
23620CODESIGN=$ac_cv_path_CODESIGN
23621if test -n "$CODESIGN"; then
23622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23623$as_echo "$CODESIGN" >&6; }
23624else
23625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23626$as_echo "no" >&6; }
23627fi
23628
23629
23630  test -n "$CODESIGN" && break
23631done
23632
23633  else
23634    # The variable is set, but is it from the command line or the environment?
23635
23636    # Try to remove the string !CODESIGN! from our list.
23637    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
23638    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23639      # If it failed, the variable was not from the command line. Ignore it,
23640      # but warn the user (except for BASH, which is always set by the calling BASH).
23641      if test "xCODESIGN" != xBASH; then
23642        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
23643$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
23644      fi
23645      # Try to locate tool using the code snippet
23646      for ac_prog in codesign
23647do
23648  # Extract the first word of "$ac_prog", so it can be a program name with args.
23649set dummy $ac_prog; ac_word=$2
23650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23651$as_echo_n "checking for $ac_word... " >&6; }
23652if ${ac_cv_path_CODESIGN+:} false; then :
23653  $as_echo_n "(cached) " >&6
23654else
23655  case $CODESIGN in
23656  [\\/]* | ?:[\\/]*)
23657  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23658  ;;
23659  *)
23660  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23661for as_dir in $PATH
23662do
23663  IFS=$as_save_IFS
23664  test -z "$as_dir" && as_dir=.
23665    for ac_exec_ext in '' $ac_executable_extensions; do
23666  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23667    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23668    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23669    break 2
23670  fi
23671done
23672  done
23673IFS=$as_save_IFS
23674
23675  ;;
23676esac
23677fi
23678CODESIGN=$ac_cv_path_CODESIGN
23679if test -n "$CODESIGN"; then
23680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23681$as_echo "$CODESIGN" >&6; }
23682else
23683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23684$as_echo "no" >&6; }
23685fi
23686
23687
23688  test -n "$CODESIGN" && break
23689done
23690
23691    else
23692      # If it succeeded, then it was overridden by the user. We will use it
23693      # for the tool.
23694
23695      # First remove it from the list of overridden variables, so we can test
23696      # for unknown variables in the end.
23697      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23698
23699      # Check if we try to supply an empty value
23700      if test "x$CODESIGN" = x; then
23701        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
23702$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
23703        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23704$as_echo_n "checking for CODESIGN... " >&6; }
23705        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23706$as_echo "disabled" >&6; }
23707      else
23708        # Check if the provided tool contains a complete path.
23709        tool_specified="$CODESIGN"
23710        tool_basename="${tool_specified##*/}"
23711        if test "x$tool_basename" = "x$tool_specified"; then
23712          # A command without a complete path is provided, search $PATH.
23713          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
23714$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
23715          # Extract the first word of "$tool_basename", so it can be a program name with args.
23716set dummy $tool_basename; ac_word=$2
23717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23718$as_echo_n "checking for $ac_word... " >&6; }
23719if ${ac_cv_path_CODESIGN+:} false; then :
23720  $as_echo_n "(cached) " >&6
23721else
23722  case $CODESIGN in
23723  [\\/]* | ?:[\\/]*)
23724  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23725  ;;
23726  *)
23727  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23728for as_dir in $PATH
23729do
23730  IFS=$as_save_IFS
23731  test -z "$as_dir" && as_dir=.
23732    for ac_exec_ext in '' $ac_executable_extensions; do
23733  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23734    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23735    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23736    break 2
23737  fi
23738done
23739  done
23740IFS=$as_save_IFS
23741
23742  ;;
23743esac
23744fi
23745CODESIGN=$ac_cv_path_CODESIGN
23746if test -n "$CODESIGN"; then
23747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23748$as_echo "$CODESIGN" >&6; }
23749else
23750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23751$as_echo "no" >&6; }
23752fi
23753
23754
23755          if test "x$CODESIGN" = x; then
23756            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23757          fi
23758        else
23759          # Otherwise we believe it is a complete path. Use it as it is.
23760          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
23761$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
23762          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23763$as_echo_n "checking for CODESIGN... " >&6; }
23764          if test ! -x "$tool_specified"; then
23765            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23766$as_echo "not found" >&6; }
23767            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
23768          fi
23769          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23770$as_echo "$tool_specified" >&6; }
23771        fi
23772      fi
23773    fi
23774
23775  fi
23776
23777
23778    if test "x$CODESIGN" != "x"; then
23779      # Verify that the openjdk_codesign certificate is present
23780      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
23781$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
23782      $RM codesign-testfile
23783      $TOUCH codesign-testfile
23784      $CODESIGN -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
23785      $RM codesign-testfile
23786      if test "x$CODESIGN" = x; then
23787        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23788$as_echo "no" >&6; }
23789      else
23790        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23791$as_echo "yes" >&6; }
23792      fi
23793    fi
23794
23795
23796
23797  # Publish this variable in the help.
23798
23799
23800  if [ -z "${SETFILE+x}" ]; then
23801    # The variable is not set by user, try to locate tool using the code snippet
23802    for ac_prog in SetFile
23803do
23804  # Extract the first word of "$ac_prog", so it can be a program name with args.
23805set dummy $ac_prog; ac_word=$2
23806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23807$as_echo_n "checking for $ac_word... " >&6; }
23808if ${ac_cv_path_SETFILE+:} false; then :
23809  $as_echo_n "(cached) " >&6
23810else
23811  case $SETFILE in
23812  [\\/]* | ?:[\\/]*)
23813  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23814  ;;
23815  *)
23816  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23817for as_dir in $PATH
23818do
23819  IFS=$as_save_IFS
23820  test -z "$as_dir" && as_dir=.
23821    for ac_exec_ext in '' $ac_executable_extensions; do
23822  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23823    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23824    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23825    break 2
23826  fi
23827done
23828  done
23829IFS=$as_save_IFS
23830
23831  ;;
23832esac
23833fi
23834SETFILE=$ac_cv_path_SETFILE
23835if test -n "$SETFILE"; then
23836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23837$as_echo "$SETFILE" >&6; }
23838else
23839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23840$as_echo "no" >&6; }
23841fi
23842
23843
23844  test -n "$SETFILE" && break
23845done
23846
23847  else
23848    # The variable is set, but is it from the command line or the environment?
23849
23850    # Try to remove the string !SETFILE! from our list.
23851    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
23852    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23853      # If it failed, the variable was not from the command line. Ignore it,
23854      # but warn the user (except for BASH, which is always set by the calling BASH).
23855      if test "xSETFILE" != xBASH; then
23856        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
23857$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
23858      fi
23859      # Try to locate tool using the code snippet
23860      for ac_prog in SetFile
23861do
23862  # Extract the first word of "$ac_prog", so it can be a program name with args.
23863set dummy $ac_prog; ac_word=$2
23864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23865$as_echo_n "checking for $ac_word... " >&6; }
23866if ${ac_cv_path_SETFILE+:} false; then :
23867  $as_echo_n "(cached) " >&6
23868else
23869  case $SETFILE in
23870  [\\/]* | ?:[\\/]*)
23871  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23872  ;;
23873  *)
23874  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23875for as_dir in $PATH
23876do
23877  IFS=$as_save_IFS
23878  test -z "$as_dir" && as_dir=.
23879    for ac_exec_ext in '' $ac_executable_extensions; do
23880  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23881    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23882    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23883    break 2
23884  fi
23885done
23886  done
23887IFS=$as_save_IFS
23888
23889  ;;
23890esac
23891fi
23892SETFILE=$ac_cv_path_SETFILE
23893if test -n "$SETFILE"; then
23894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23895$as_echo "$SETFILE" >&6; }
23896else
23897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23898$as_echo "no" >&6; }
23899fi
23900
23901
23902  test -n "$SETFILE" && break
23903done
23904
23905    else
23906      # If it succeeded, then it was overridden by the user. We will use it
23907      # for the tool.
23908
23909      # First remove it from the list of overridden variables, so we can test
23910      # for unknown variables in the end.
23911      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23912
23913      # Check if we try to supply an empty value
23914      if test "x$SETFILE" = x; then
23915        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
23916$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
23917        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23918$as_echo_n "checking for SETFILE... " >&6; }
23919        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23920$as_echo "disabled" >&6; }
23921      else
23922        # Check if the provided tool contains a complete path.
23923        tool_specified="$SETFILE"
23924        tool_basename="${tool_specified##*/}"
23925        if test "x$tool_basename" = "x$tool_specified"; then
23926          # A command without a complete path is provided, search $PATH.
23927          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
23928$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
23929          # Extract the first word of "$tool_basename", so it can be a program name with args.
23930set dummy $tool_basename; ac_word=$2
23931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23932$as_echo_n "checking for $ac_word... " >&6; }
23933if ${ac_cv_path_SETFILE+:} false; then :
23934  $as_echo_n "(cached) " >&6
23935else
23936  case $SETFILE in
23937  [\\/]* | ?:[\\/]*)
23938  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23939  ;;
23940  *)
23941  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23942for as_dir in $PATH
23943do
23944  IFS=$as_save_IFS
23945  test -z "$as_dir" && as_dir=.
23946    for ac_exec_ext in '' $ac_executable_extensions; do
23947  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23948    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23949    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23950    break 2
23951  fi
23952done
23953  done
23954IFS=$as_save_IFS
23955
23956  ;;
23957esac
23958fi
23959SETFILE=$ac_cv_path_SETFILE
23960if test -n "$SETFILE"; then
23961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23962$as_echo "$SETFILE" >&6; }
23963else
23964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23965$as_echo "no" >&6; }
23966fi
23967
23968
23969          if test "x$SETFILE" = x; then
23970            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23971          fi
23972        else
23973          # Otherwise we believe it is a complete path. Use it as it is.
23974          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
23975$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
23976          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23977$as_echo_n "checking for SETFILE... " >&6; }
23978          if test ! -x "$tool_specified"; then
23979            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23980$as_echo "not found" >&6; }
23981            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
23982          fi
23983          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23984$as_echo "$tool_specified" >&6; }
23985        fi
23986      fi
23987    fi
23988
23989  fi
23990
23991
23992
23993  if test "x$SETFILE" = x; then
23994    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
23995  fi
23996
23997
23998  fi
23999
24000
24001  # Test if bash supports pipefail.
24002  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
24003$as_echo_n "checking if bash supports pipefail... " >&6; }
24004  if ${BASH} -c 'set -o pipefail'; then
24005    BASH_ARGS="$BASH_ARGS -o pipefail"
24006    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24007$as_echo "yes" >&6; }
24008  else
24009    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24010$as_echo "no" >&6; }
24011  fi
24012
24013  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
24014$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
24015  if ${BASH} -e -c 'true'; then
24016    BASH_ARGS="$BASH_ARGS -e"
24017    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24018$as_echo "yes" >&6; }
24019  else
24020    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24021$as_echo "no" >&6; }
24022  fi
24023
24024
24025
24026
24027# Check if pkg-config is available.
24028
24029
24030if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
24031	if test -n "$ac_tool_prefix"; then
24032  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24033set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24035$as_echo_n "checking for $ac_word... " >&6; }
24036if ${ac_cv_path_PKG_CONFIG+:} false; then :
24037  $as_echo_n "(cached) " >&6
24038else
24039  case $PKG_CONFIG in
24040  [\\/]* | ?:[\\/]*)
24041  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
24042  ;;
24043  *)
24044  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24045for as_dir in $PATH
24046do
24047  IFS=$as_save_IFS
24048  test -z "$as_dir" && as_dir=.
24049    for ac_exec_ext in '' $ac_executable_extensions; do
24050  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24051    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24052    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24053    break 2
24054  fi
24055done
24056  done
24057IFS=$as_save_IFS
24058
24059  ;;
24060esac
24061fi
24062PKG_CONFIG=$ac_cv_path_PKG_CONFIG
24063if test -n "$PKG_CONFIG"; then
24064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
24065$as_echo "$PKG_CONFIG" >&6; }
24066else
24067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24068$as_echo "no" >&6; }
24069fi
24070
24071
24072fi
24073if test -z "$ac_cv_path_PKG_CONFIG"; then
24074  ac_pt_PKG_CONFIG=$PKG_CONFIG
24075  # Extract the first word of "pkg-config", so it can be a program name with args.
24076set dummy pkg-config; ac_word=$2
24077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24078$as_echo_n "checking for $ac_word... " >&6; }
24079if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
24080  $as_echo_n "(cached) " >&6
24081else
24082  case $ac_pt_PKG_CONFIG in
24083  [\\/]* | ?:[\\/]*)
24084  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
24085  ;;
24086  *)
24087  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24088for as_dir in $PATH
24089do
24090  IFS=$as_save_IFS
24091  test -z "$as_dir" && as_dir=.
24092    for ac_exec_ext in '' $ac_executable_extensions; do
24093  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24094    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24095    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24096    break 2
24097  fi
24098done
24099  done
24100IFS=$as_save_IFS
24101
24102  ;;
24103esac
24104fi
24105ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
24106if test -n "$ac_pt_PKG_CONFIG"; then
24107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
24108$as_echo "$ac_pt_PKG_CONFIG" >&6; }
24109else
24110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24111$as_echo "no" >&6; }
24112fi
24113
24114  if test "x$ac_pt_PKG_CONFIG" = x; then
24115    PKG_CONFIG=""
24116  else
24117    case $cross_compiling:$ac_tool_warned in
24118yes:)
24119{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24120$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24121ac_tool_warned=yes ;;
24122esac
24123    PKG_CONFIG=$ac_pt_PKG_CONFIG
24124  fi
24125else
24126  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
24127fi
24128
24129fi
24130if test -n "$PKG_CONFIG"; then
24131	_pkg_min_version=0.9.0
24132	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
24133$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
24134	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
24135		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24136$as_echo "yes" >&6; }
24137	else
24138		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24139$as_echo "no" >&6; }
24140		PKG_CONFIG=""
24141	fi
24142
24143fi
24144
24145# After basic tools have been setup, we can check build os specific details.
24146
24147  ###############################################################################
24148
24149  # Note that this is the build platform OS version!
24150
24151  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
24152  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
24153  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
24154  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
24155
24156
24157
24158
24159
24160# Misc basic settings
24161
24162
24163# Check whether --with-default-make-target was given.
24164if test "${with_default_make_target+set}" = set; then :
24165  withval=$with_default_make_target;
24166fi
24167
24168  if test "x$with_default_make_target" = "x" \
24169      || test "x$with_default_make_target" = "xyes"; then
24170    DEFAULT_MAKE_TARGET="exploded-image"
24171  elif test "x$with_default_make_target" = "xno"; then
24172    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
24173  else
24174    DEFAULT_MAKE_TARGET="$with_default_make_target"
24175  fi
24176
24177
24178
24179
24180###############################################################################
24181#
24182# Determine OpenJDK variants, options and version numbers.
24183#
24184###############################################################################
24185
24186# We need build & target for this.
24187
24188  # Should we build a JDK without a graphical UI?
24189  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headless only" >&5
24190$as_echo_n "checking headless only... " >&6; }
24191  # Check whether --enable-headless-only was given.
24192if test "${enable_headless_only+set}" = set; then :
24193  enableval=$enable_headless_only;
24194fi
24195
24196
24197  if test "x$enable_headless_only" = "xyes"; then
24198    ENABLE_HEADLESS_ONLY="true"
24199    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24200$as_echo "yes" >&6; }
24201  elif test "x$enable_headless_only" = "xno"; then
24202    ENABLE_HEADLESS_ONLY="false"
24203    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24204$as_echo "no" >&6; }
24205  elif test "x$enable_headless_only" = "x"; then
24206    ENABLE_HEADLESS_ONLY="false"
24207    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24208$as_echo "no" >&6; }
24209  else
24210    as_fn_error $? "--enable-headless-only can only take yes or no" "$LINENO" 5
24211  fi
24212
24213
24214
24215  # Choose cacerts source file
24216
24217# Check whether --with-cacerts-file was given.
24218if test "${with_cacerts_file+set}" = set; then :
24219  withval=$with_cacerts_file;
24220fi
24221
24222  if test "x$with_cacerts_file" != x; then
24223    CACERTS_FILE=$with_cacerts_file
24224  fi
24225
24226
24227  # Enable or disable unlimited crypto
24228  # Check whether --enable-unlimited-crypto was given.
24229if test "${enable_unlimited_crypto+set}" = set; then :
24230  enableval=$enable_unlimited_crypto;
24231else
24232  enable_unlimited_crypto=yes
24233fi
24234
24235  if test "x$enable_unlimited_crypto" = "xyes"; then
24236    UNLIMITED_CRYPTO=true
24237  else
24238    UNLIMITED_CRYPTO=false
24239  fi
24240
24241
24242  # Should we build the serviceability agent (SA)?
24243  INCLUDE_SA=true
24244  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
24245    INCLUDE_SA=false
24246  fi
24247  if test "x$OPENJDK_TARGET_OS" = xaix ; then
24248    INCLUDE_SA=false
24249  fi
24250
24251
24252  # Compress jars
24253  COMPRESS_JARS=false
24254
24255
24256
24257  # Setup default copyright year. Mostly overridden when building close to a new year.
24258
24259# Check whether --with-copyright-year was given.
24260if test "${with_copyright_year+set}" = set; then :
24261  withval=$with_copyright_year;
24262fi
24263
24264  if test "x$with_copyright_year" = xyes; then
24265    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
24266  elif test "x$with_copyright_year" != x; then
24267    COPYRIGHT_YEAR="$with_copyright_year"
24268  else
24269    COPYRIGHT_YEAR=`$DATE +'%Y'`
24270  fi
24271
24272
24273
24274  # Check whether --enable-keep-packaged-modules was given.
24275if test "${enable_keep_packaged_modules+set}" = set; then :
24276  enableval=$enable_keep_packaged_modules;
24277fi
24278
24279
24280  if test "x$enable_keep_packaged_modules" = "xyes"; then
24281    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24282$as_echo_n "checking if packaged modules are kept... " >&6; }
24283    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24284$as_echo "yes" >&6; }
24285    JLINK_KEEP_PACKAGED_MODULES=true
24286  elif test "x$enable_keep_packaged_modules" = "xno"; then
24287    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24288$as_echo_n "checking if packaged modules are kept... " >&6; }
24289    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24290$as_echo "no" >&6; }
24291    JLINK_KEEP_PACKAGED_MODULES=false
24292  elif test "x$enable_keep_packaged_modules" = "x"; then
24293    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
24294$as_echo "yes (default)" >&6; }
24295    JLINK_KEEP_PACKAGED_MODULES=true
24296  else
24297    as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
24298  fi
24299
24300
24301
24302
24303  # Warn user that old version arguments are deprecated.
24304
24305
24306# Check whether --with-milestone was given.
24307if test "${with_milestone+set}" = set; then :
24308  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
24309$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
24310fi
24311
24312
24313
24314
24315# Check whether --with-update-version was given.
24316if test "${with_update_version+set}" = set; then :
24317  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
24318$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
24319fi
24320
24321
24322
24323
24324# Check whether --with-user-release-suffix was given.
24325if test "${with_user_release_suffix+set}" = set; then :
24326  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
24327$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
24328fi
24329
24330
24331
24332
24333# Check whether --with-build-number was given.
24334if test "${with_build_number+set}" = set; then :
24335  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
24336$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
24337fi
24338
24339
24340
24341  # Source the version numbers file
24342  . $AUTOCONF_DIR/version-numbers
24343
24344  # Some non-version number information is set in that file
24345
24346
24347
24348
24349
24350
24351
24352
24353
24354  # Override version from arguments
24355
24356  # If --with-version-string is set, process it first. It is possible to
24357  # override parts with more specific flags, since these are processed later.
24358
24359# Check whether --with-version-string was given.
24360if test "${with_version_string+set}" = set; then :
24361  withval=$with_version_string;
24362fi
24363
24364  if test "x$with_version_string" = xyes; then
24365    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
24366  elif test "x$with_version_string" != x; then
24367    # Additional [] needed to keep m4 from mangling shell constructs.
24368    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
24369      VERSION_MAJOR=${BASH_REMATCH[1]}
24370      VERSION_MINOR=${BASH_REMATCH[3]}
24371      VERSION_SECURITY=${BASH_REMATCH[5]}
24372      VERSION_PATCH=${BASH_REMATCH[7]}
24373      VERSION_PRE=${BASH_REMATCH[9]}
24374      version_plus_separator=${BASH_REMATCH[11]}
24375      VERSION_BUILD=${BASH_REMATCH[12]}
24376      VERSION_OPT=${BASH_REMATCH[14]}
24377      # Unspecified numerical fields are interpreted as 0.
24378      if test "x$VERSION_MINOR" = x; then
24379        VERSION_MINOR=0
24380      fi
24381      if test "x$VERSION_SECURITY" = x; then
24382        VERSION_SECURITY=0
24383      fi
24384      if test "x$VERSION_PATCH" = x; then
24385        VERSION_PATCH=0
24386      fi
24387      if test "x$version_plus_separator" != x \
24388          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
24389        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
24390      fi
24391      # Stop the version part process from setting default values.
24392      # We still allow them to explicitly override though.
24393      NO_DEFAULT_VERSION_PARTS=true
24394    else
24395      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
24396    fi
24397  fi
24398
24399
24400# Check whether --with-version-pre was given.
24401if test "${with_version_pre+set}" = set; then :
24402  withval=$with_version_pre; with_version_pre_present=true
24403else
24404  with_version_pre_present=false
24405fi
24406
24407
24408  if test "x$with_version_pre_present" = xtrue; then
24409    if test "x$with_version_pre" = xyes; then
24410      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
24411    elif test "x$with_version_pre" = xno; then
24412      # Interpret --without-* as empty string instead of the literal "no"
24413      VERSION_PRE=
24414    else
24415      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
24416       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
24417      if test "x$VERSION_PRE" != "x$with_version_pre"; then
24418        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
24419$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
24420      fi
24421    fi
24422  else
24423    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24424      # Default is to use "internal" as pre
24425      VERSION_PRE="internal"
24426    fi
24427  fi
24428
24429
24430# Check whether --with-version-opt was given.
24431if test "${with_version_opt+set}" = set; then :
24432  withval=$with_version_opt; with_version_opt_present=true
24433else
24434  with_version_opt_present=false
24435fi
24436
24437
24438  if test "x$with_version_opt_present" = xtrue; then
24439    if test "x$with_version_opt" = xyes; then
24440      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
24441    elif test "x$with_version_opt" = xno; then
24442      # Interpret --without-* as empty string instead of the literal "no"
24443      VERSION_OPT=
24444    else
24445      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
24446       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
24447      if test "x$VERSION_OPT" != "x$with_version_opt"; then
24448        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
24449$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
24450      fi
24451    fi
24452  else
24453    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24454      # Default is to calculate a string like this 'adhoc.<username>.<base dir name>'
24455      # Outer [ ] to quote m4.
24456       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
24457      VERSION_OPT="adhoc.$USERNAME.$basedirname"
24458    fi
24459  fi
24460
24461
24462# Check whether --with-version-build was given.
24463if test "${with_version_build+set}" = set; then :
24464  withval=$with_version_build; with_version_build_present=true
24465else
24466  with_version_build_present=false
24467fi
24468
24469
24470  if test "x$with_version_build_present" = xtrue; then
24471    if test "x$with_version_build" = xyes; then
24472      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
24473    elif test "x$with_version_build" = xno; then
24474      # Interpret --without-* as empty string instead of the literal "no"
24475      VERSION_BUILD=
24476    elif test "x$with_version_build" = x; then
24477      VERSION_BUILD=
24478    else
24479
24480  # Additional [] needed to keep m4 from mangling shell constructs.
24481  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24482    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
24483  fi
24484  # Extract the version number without leading zeros.
24485  cleaned_value=${BASH_REMATCH[1]}
24486  if test "x$cleaned_value" = x; then
24487    # Special case for zero
24488    cleaned_value=${BASH_REMATCH[2]}
24489  fi
24490
24491  if test $cleaned_value -gt 255; then
24492    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
24493  fi
24494  if test "x$cleaned_value" != "x$with_version_build"; then
24495    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
24496$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
24497  fi
24498  VERSION_BUILD=$cleaned_value
24499
24500    fi
24501  else
24502    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24503      # Default is to not have a build number.
24504      VERSION_BUILD=""
24505      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
24506      VERSION_BUILD=0
24507    fi
24508  fi
24509
24510
24511# Check whether --with-version-major was given.
24512if test "${with_version_major+set}" = set; then :
24513  withval=$with_version_major; with_version_major_present=true
24514else
24515  with_version_major_present=false
24516fi
24517
24518
24519  if test "x$with_version_major_present" = xtrue; then
24520    if test "x$with_version_major" = xyes; then
24521      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
24522    else
24523
24524  # Additional [] needed to keep m4 from mangling shell constructs.
24525  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24526    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
24527  fi
24528  # Extract the version number without leading zeros.
24529  cleaned_value=${BASH_REMATCH[1]}
24530  if test "x$cleaned_value" = x; then
24531    # Special case for zero
24532    cleaned_value=${BASH_REMATCH[2]}
24533  fi
24534
24535  if test $cleaned_value -gt 255; then
24536    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
24537  fi
24538  if test "x$cleaned_value" != "x$with_version_major"; then
24539    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
24540$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
24541  fi
24542  VERSION_MAJOR=$cleaned_value
24543
24544    fi
24545  else
24546    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24547      # Default is to get value from version-numbers
24548      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
24549    fi
24550  fi
24551
24552
24553# Check whether --with-version-minor was given.
24554if test "${with_version_minor+set}" = set; then :
24555  withval=$with_version_minor; with_version_minor_present=true
24556else
24557  with_version_minor_present=false
24558fi
24559
24560
24561  if test "x$with_version_minor_present" = xtrue; then
24562    if test "x$with_version_minor" = xyes; then
24563      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
24564    elif test "x$with_version_minor" = xno; then
24565      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24566      VERSION_MINOR=0
24567    elif test "x$with_version_minor" = x; then
24568      VERSION_MINOR=0
24569    else
24570
24571  # Additional [] needed to keep m4 from mangling shell constructs.
24572  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24573    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
24574  fi
24575  # Extract the version number without leading zeros.
24576  cleaned_value=${BASH_REMATCH[1]}
24577  if test "x$cleaned_value" = x; then
24578    # Special case for zero
24579    cleaned_value=${BASH_REMATCH[2]}
24580  fi
24581
24582  if test $cleaned_value -gt 255; then
24583    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
24584  fi
24585  if test "x$cleaned_value" != "x$with_version_minor"; then
24586    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
24587$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
24588  fi
24589  VERSION_MINOR=$cleaned_value
24590
24591    fi
24592  else
24593    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24594      # Default is 0, if unspecified
24595      VERSION_MINOR=0
24596    fi
24597  fi
24598
24599
24600# Check whether --with-version-security was given.
24601if test "${with_version_security+set}" = set; then :
24602  withval=$with_version_security; with_version_security_present=true
24603else
24604  with_version_security_present=false
24605fi
24606
24607
24608  if test "x$with_version_security_present" = xtrue; then
24609    if test "x$with_version_security" = xyes; then
24610      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
24611    elif test "x$with_version_security" = xno; then
24612      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24613      VERSION_SECURITY=0
24614    elif test "x$with_version_security" = x; then
24615      VERSION_SECURITY=0
24616    else
24617
24618  # Additional [] needed to keep m4 from mangling shell constructs.
24619  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24620    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
24621  fi
24622  # Extract the version number without leading zeros.
24623  cleaned_value=${BASH_REMATCH[1]}
24624  if test "x$cleaned_value" = x; then
24625    # Special case for zero
24626    cleaned_value=${BASH_REMATCH[2]}
24627  fi
24628
24629  if test $cleaned_value -gt 255; then
24630    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
24631  fi
24632  if test "x$cleaned_value" != "x$with_version_security"; then
24633    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
24634$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
24635  fi
24636  VERSION_SECURITY=$cleaned_value
24637
24638    fi
24639  else
24640    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24641      # Default is 0, if unspecified
24642      VERSION_SECURITY=0
24643    fi
24644  fi
24645
24646
24647# Check whether --with-version-patch was given.
24648if test "${with_version_patch+set}" = set; then :
24649  withval=$with_version_patch; with_version_patch_present=true
24650else
24651  with_version_patch_present=false
24652fi
24653
24654
24655  if test "x$with_version_patch_present" = xtrue; then
24656    if test "x$with_version_patch" = xyes; then
24657      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
24658    elif test "x$with_version_patch" = xno; then
24659      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24660      VERSION_PATCH=0
24661    elif test "x$with_version_patch" = x; then
24662      VERSION_PATCH=0
24663    else
24664
24665  # Additional [] needed to keep m4 from mangling shell constructs.
24666  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24667    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
24668  fi
24669  # Extract the version number without leading zeros.
24670  cleaned_value=${BASH_REMATCH[1]}
24671  if test "x$cleaned_value" = x; then
24672    # Special case for zero
24673    cleaned_value=${BASH_REMATCH[2]}
24674  fi
24675
24676  if test $cleaned_value -gt 255; then
24677    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
24678  fi
24679  if test "x$cleaned_value" != "x$with_version_patch"; then
24680    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
24681$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
24682  fi
24683  VERSION_PATCH=$cleaned_value
24684
24685    fi
24686  else
24687    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24688      # Default is 0, if unspecified
24689      VERSION_PATCH=0
24690    fi
24691  fi
24692
24693  # Calculate derived version properties
24694
24695  # Set VERSION_IS_GA based on if VERSION_PRE has a value
24696  if test "x$VERSION_PRE" = x; then
24697    VERSION_IS_GA=true
24698  else
24699    VERSION_IS_GA=false
24700  fi
24701
24702  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
24703  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
24704
24705  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
24706  # Strip trailing zeroes from stripped_version_number
24707  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
24708  VERSION_NUMBER=$stripped_version_number
24709
24710  # The complete version string, with additional build information
24711  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
24712    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24713  else
24714    # If either build or opt is set, we need a + separator
24715    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
24716  fi
24717
24718  # The short version string, just VERSION_NUMBER and PRE, if present.
24719  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24720
24721  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
24722$as_echo_n "checking for version string... " >&6; }
24723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
24724$as_echo "$VERSION_STRING" >&6; }
24725
24726
24727
24728
24729
24730
24731
24732
24733
24734
24735
24736
24737
24738
24739
24740###############################################################################
24741#
24742# Setup BootJDK, used to bootstrap the build.
24743#
24744###############################################################################
24745
24746
24747  BOOT_JDK_FOUND=no
24748
24749# Check whether --with-boot-jdk was given.
24750if test "${with_boot_jdk+set}" = set; then :
24751  withval=$with_boot_jdk;
24752fi
24753
24754
24755  # We look for the Boot JDK through various means, going from more certain to
24756  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
24757  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
24758  # must check if this is indeed valid; otherwise we'll continue looking.
24759
24760  # Test: Is bootjdk explicitly set by command line arguments?
24761
24762  if test "x$BOOT_JDK_FOUND" = xno; then
24763    # Now execute the test
24764
24765  if test "x$with_boot_jdk" != x; then
24766    BOOT_JDK=$with_boot_jdk
24767    BOOT_JDK_FOUND=maybe
24768    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
24769$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
24770  fi
24771
24772
24773    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24774    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24775      # Do we have a bin/java?
24776      if test ! -x "$BOOT_JDK/bin/java"; then
24777        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24778$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24779        BOOT_JDK_FOUND=no
24780      else
24781        # Do we have a bin/javac?
24782        if test ! -x "$BOOT_JDK/bin/javac"; then
24783          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24784$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24785          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24786$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24787          BOOT_JDK_FOUND=no
24788        else
24789          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24790          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
24791
24792          # Extra M4 quote needed to protect [] in grep expression.
24793          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24794          if test "x$FOUND_CORRECT_VERSION" = x; then
24795            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24796$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24797            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24798$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24799            BOOT_JDK_FOUND=no
24800          else
24801            # We're done! :-)
24802            BOOT_JDK_FOUND=yes
24803
24804  # Only process if variable expands to non-empty
24805
24806  if test "x$BOOT_JDK" != x; then
24807    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24808
24809  # Input might be given as Windows format, start by converting to
24810  # unix format.
24811  path="$BOOT_JDK"
24812  new_path=`$CYGPATH -u "$path"`
24813
24814  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24815  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24816  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24817  # "foo.exe" is OK but "foo" is an error.
24818  #
24819  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24820  # It is also a way to make sure we got the proper file name for the real test later on.
24821  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24822  if test "x$test_shortpath" = x; then
24823    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24824$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24825    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24826  fi
24827
24828  # Call helper function which possibly converts this using DOS-style short mode.
24829  # If so, the updated path is stored in $new_path.
24830
24831  input_path="$new_path"
24832  # Check if we need to convert this using DOS-style short mode. If the path
24833  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24834  # take no chances and rewrite it.
24835  # Note: m4 eats our [], so we need to use [ and ] instead.
24836  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24837  if test "x$has_forbidden_chars" != x; then
24838    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24839    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24840    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24841    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24842      # Going to short mode and back again did indeed matter. Since short mode is
24843      # case insensitive, let's make it lowercase to improve readability.
24844      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24845      # Now convert it back to Unix-style (cygpath)
24846      input_path=`$CYGPATH -u "$shortmode_path"`
24847      new_path="$input_path"
24848    fi
24849  fi
24850
24851  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24852  if test "x$test_cygdrive_prefix" = x; then
24853    # As a simple fix, exclude /usr/bin since it's not a real path.
24854    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24855      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24856      # a path prefixed by /cygdrive for fixpath to work.
24857      new_path="$CYGWIN_ROOT_PATH$input_path"
24858    fi
24859  fi
24860
24861
24862  if test "x$path" != "x$new_path"; then
24863    BOOT_JDK="$new_path"
24864    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24865$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24866  fi
24867
24868    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24869
24870  path="$BOOT_JDK"
24871  has_colon=`$ECHO $path | $GREP ^.:`
24872  new_path="$path"
24873  if test "x$has_colon" = x; then
24874    # Not in mixed or Windows style, start by that.
24875    new_path=`cmd //c echo $path`
24876  fi
24877
24878
24879  input_path="$new_path"
24880  # Check if we need to convert this using DOS-style short mode. If the path
24881  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24882  # take no chances and rewrite it.
24883  # Note: m4 eats our [], so we need to use [ and ] instead.
24884  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24885  if test "x$has_forbidden_chars" != x; then
24886    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24887    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24888  fi
24889
24890
24891  windows_path="$new_path"
24892  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24893    unix_path=`$CYGPATH -u "$windows_path"`
24894    new_path="$unix_path"
24895  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24896    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24897    new_path="$unix_path"
24898  fi
24899
24900  if test "x$path" != "x$new_path"; then
24901    BOOT_JDK="$new_path"
24902    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24903$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24904  fi
24905
24906  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24907  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24908
24909    else
24910      # We're on a unix platform. Hooray! :)
24911      path="$BOOT_JDK"
24912      has_space=`$ECHO "$path" | $GREP " "`
24913      if test "x$has_space" != x; then
24914        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24915$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24916        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24917      fi
24918
24919      # Use eval to expand a potential ~
24920      eval path="$path"
24921      if test ! -f "$path" && test ! -d "$path"; then
24922        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24923      fi
24924
24925      if test -d "$path"; then
24926        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24927      else
24928        dir="`$DIRNAME "$path"`"
24929        base="`$BASENAME "$path"`"
24930        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24931      fi
24932    fi
24933  fi
24934
24935            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24936$as_echo_n "checking for Boot JDK... " >&6; }
24937            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24938$as_echo "$BOOT_JDK" >&6; }
24939            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24940$as_echo_n "checking Boot JDK version... " >&6; }
24941            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24942            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24943$as_echo "$BOOT_JDK_VERSION" >&6; }
24944          fi # end check jdk version
24945        fi # end check javac
24946      fi # end check java
24947    fi # end check boot jdk found
24948  fi
24949
24950  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
24951    # Having specified an argument which is incorrect will produce an instant failure;
24952    # we should not go on looking
24953    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
24954  fi
24955
24956  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
24957
24958  if test "x$BOOT_JDK_FOUND" = xno; then
24959    # Now execute the test
24960
24961  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
24962    # First check at user selected default
24963
24964  if test "x$BOOT_JDK_FOUND" = xno; then
24965    # Now execute the test
24966
24967  if test -x /usr/libexec/java_home; then
24968    BOOT_JDK=`/usr/libexec/java_home `
24969    BOOT_JDK_FOUND=maybe
24970    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
24971$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
24972  fi
24973
24974
24975    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24976    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24977      # Do we have a bin/java?
24978      if test ! -x "$BOOT_JDK/bin/java"; then
24979        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24980$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24981        BOOT_JDK_FOUND=no
24982      else
24983        # Do we have a bin/javac?
24984        if test ! -x "$BOOT_JDK/bin/javac"; then
24985          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24986$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24987          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24988$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24989          BOOT_JDK_FOUND=no
24990        else
24991          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24992          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
24993
24994          # Extra M4 quote needed to protect [] in grep expression.
24995          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24996          if test "x$FOUND_CORRECT_VERSION" = x; then
24997            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24998$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24999            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25000$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25001            BOOT_JDK_FOUND=no
25002          else
25003            # We're done! :-)
25004            BOOT_JDK_FOUND=yes
25005
25006  # Only process if variable expands to non-empty
25007
25008  if test "x$BOOT_JDK" != x; then
25009    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25010
25011  # Input might be given as Windows format, start by converting to
25012  # unix format.
25013  path="$BOOT_JDK"
25014  new_path=`$CYGPATH -u "$path"`
25015
25016  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25017  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25018  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25019  # "foo.exe" is OK but "foo" is an error.
25020  #
25021  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25022  # It is also a way to make sure we got the proper file name for the real test later on.
25023  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25024  if test "x$test_shortpath" = x; then
25025    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25026$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25027    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25028  fi
25029
25030  # Call helper function which possibly converts this using DOS-style short mode.
25031  # If so, the updated path is stored in $new_path.
25032
25033  input_path="$new_path"
25034  # Check if we need to convert this using DOS-style short mode. If the path
25035  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25036  # take no chances and rewrite it.
25037  # Note: m4 eats our [], so we need to use [ and ] instead.
25038  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25039  if test "x$has_forbidden_chars" != x; then
25040    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25041    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25042    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25043    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25044      # Going to short mode and back again did indeed matter. Since short mode is
25045      # case insensitive, let's make it lowercase to improve readability.
25046      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25047      # Now convert it back to Unix-style (cygpath)
25048      input_path=`$CYGPATH -u "$shortmode_path"`
25049      new_path="$input_path"
25050    fi
25051  fi
25052
25053  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25054  if test "x$test_cygdrive_prefix" = x; then
25055    # As a simple fix, exclude /usr/bin since it's not a real path.
25056    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25057      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25058      # a path prefixed by /cygdrive for fixpath to work.
25059      new_path="$CYGWIN_ROOT_PATH$input_path"
25060    fi
25061  fi
25062
25063
25064  if test "x$path" != "x$new_path"; then
25065    BOOT_JDK="$new_path"
25066    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25067$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25068  fi
25069
25070    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25071
25072  path="$BOOT_JDK"
25073  has_colon=`$ECHO $path | $GREP ^.:`
25074  new_path="$path"
25075  if test "x$has_colon" = x; then
25076    # Not in mixed or Windows style, start by that.
25077    new_path=`cmd //c echo $path`
25078  fi
25079
25080
25081  input_path="$new_path"
25082  # Check if we need to convert this using DOS-style short mode. If the path
25083  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25084  # take no chances and rewrite it.
25085  # Note: m4 eats our [], so we need to use [ and ] instead.
25086  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25087  if test "x$has_forbidden_chars" != x; then
25088    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25089    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25090  fi
25091
25092
25093  windows_path="$new_path"
25094  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25095    unix_path=`$CYGPATH -u "$windows_path"`
25096    new_path="$unix_path"
25097  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25098    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25099    new_path="$unix_path"
25100  fi
25101
25102  if test "x$path" != "x$new_path"; then
25103    BOOT_JDK="$new_path"
25104    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25105$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25106  fi
25107
25108  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25109  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25110
25111    else
25112      # We're on a unix platform. Hooray! :)
25113      path="$BOOT_JDK"
25114      has_space=`$ECHO "$path" | $GREP " "`
25115      if test "x$has_space" != x; then
25116        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25117$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25118        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25119      fi
25120
25121      # Use eval to expand a potential ~
25122      eval path="$path"
25123      if test ! -f "$path" && test ! -d "$path"; then
25124        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25125      fi
25126
25127      if test -d "$path"; then
25128        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25129      else
25130        dir="`$DIRNAME "$path"`"
25131        base="`$BASENAME "$path"`"
25132        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25133      fi
25134    fi
25135  fi
25136
25137            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25138$as_echo_n "checking for Boot JDK... " >&6; }
25139            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25140$as_echo "$BOOT_JDK" >&6; }
25141            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25142$as_echo_n "checking Boot JDK version... " >&6; }
25143            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25144            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25145$as_echo "$BOOT_JDK_VERSION" >&6; }
25146          fi # end check jdk version
25147        fi # end check javac
25148      fi # end check java
25149    fi # end check boot jdk found
25150  fi
25151
25152    # If that did not work out (e.g. too old), try explicit versions instead
25153
25154  if test "x$BOOT_JDK_FOUND" = xno; then
25155    # Now execute the test
25156
25157  if test -x /usr/libexec/java_home; then
25158    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
25159    BOOT_JDK_FOUND=maybe
25160    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
25161$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
25162  fi
25163
25164
25165    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25166    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25167      # Do we have a bin/java?
25168      if test ! -x "$BOOT_JDK/bin/java"; then
25169        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25170$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25171        BOOT_JDK_FOUND=no
25172      else
25173        # Do we have a bin/javac?
25174        if test ! -x "$BOOT_JDK/bin/javac"; then
25175          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25176$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25177          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25178$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25179          BOOT_JDK_FOUND=no
25180        else
25181          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25182          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25183
25184          # Extra M4 quote needed to protect [] in grep expression.
25185          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25186          if test "x$FOUND_CORRECT_VERSION" = x; then
25187            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25188$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25189            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25190$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25191            BOOT_JDK_FOUND=no
25192          else
25193            # We're done! :-)
25194            BOOT_JDK_FOUND=yes
25195
25196  # Only process if variable expands to non-empty
25197
25198  if test "x$BOOT_JDK" != x; then
25199    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25200
25201  # Input might be given as Windows format, start by converting to
25202  # unix format.
25203  path="$BOOT_JDK"
25204  new_path=`$CYGPATH -u "$path"`
25205
25206  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25207  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25208  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25209  # "foo.exe" is OK but "foo" is an error.
25210  #
25211  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25212  # It is also a way to make sure we got the proper file name for the real test later on.
25213  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25214  if test "x$test_shortpath" = x; then
25215    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25216$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25217    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25218  fi
25219
25220  # Call helper function which possibly converts this using DOS-style short mode.
25221  # If so, the updated path is stored in $new_path.
25222
25223  input_path="$new_path"
25224  # Check if we need to convert this using DOS-style short mode. If the path
25225  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25226  # take no chances and rewrite it.
25227  # Note: m4 eats our [], so we need to use [ and ] instead.
25228  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25229  if test "x$has_forbidden_chars" != x; then
25230    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25231    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25232    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25233    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25234      # Going to short mode and back again did indeed matter. Since short mode is
25235      # case insensitive, let's make it lowercase to improve readability.
25236      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25237      # Now convert it back to Unix-style (cygpath)
25238      input_path=`$CYGPATH -u "$shortmode_path"`
25239      new_path="$input_path"
25240    fi
25241  fi
25242
25243  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25244  if test "x$test_cygdrive_prefix" = x; then
25245    # As a simple fix, exclude /usr/bin since it's not a real path.
25246    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25247      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25248      # a path prefixed by /cygdrive for fixpath to work.
25249      new_path="$CYGWIN_ROOT_PATH$input_path"
25250    fi
25251  fi
25252
25253
25254  if test "x$path" != "x$new_path"; then
25255    BOOT_JDK="$new_path"
25256    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25257$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25258  fi
25259
25260    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25261
25262  path="$BOOT_JDK"
25263  has_colon=`$ECHO $path | $GREP ^.:`
25264  new_path="$path"
25265  if test "x$has_colon" = x; then
25266    # Not in mixed or Windows style, start by that.
25267    new_path=`cmd //c echo $path`
25268  fi
25269
25270
25271  input_path="$new_path"
25272  # Check if we need to convert this using DOS-style short mode. If the path
25273  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25274  # take no chances and rewrite it.
25275  # Note: m4 eats our [], so we need to use [ and ] instead.
25276  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25277  if test "x$has_forbidden_chars" != x; then
25278    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25279    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25280  fi
25281
25282
25283  windows_path="$new_path"
25284  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25285    unix_path=`$CYGPATH -u "$windows_path"`
25286    new_path="$unix_path"
25287  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25288    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25289    new_path="$unix_path"
25290  fi
25291
25292  if test "x$path" != "x$new_path"; then
25293    BOOT_JDK="$new_path"
25294    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25295$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25296  fi
25297
25298  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25299  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25300
25301    else
25302      # We're on a unix platform. Hooray! :)
25303      path="$BOOT_JDK"
25304      has_space=`$ECHO "$path" | $GREP " "`
25305      if test "x$has_space" != x; then
25306        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25307$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25308        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25309      fi
25310
25311      # Use eval to expand a potential ~
25312      eval path="$path"
25313      if test ! -f "$path" && test ! -d "$path"; then
25314        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25315      fi
25316
25317      if test -d "$path"; then
25318        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25319      else
25320        dir="`$DIRNAME "$path"`"
25321        base="`$BASENAME "$path"`"
25322        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25323      fi
25324    fi
25325  fi
25326
25327            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25328$as_echo_n "checking for Boot JDK... " >&6; }
25329            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25330$as_echo "$BOOT_JDK" >&6; }
25331            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25332$as_echo_n "checking Boot JDK version... " >&6; }
25333            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25334            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25335$as_echo "$BOOT_JDK_VERSION" >&6; }
25336          fi # end check jdk version
25337        fi # end check javac
25338      fi # end check java
25339    fi # end check boot jdk found
25340  fi
25341
25342
25343  if test "x$BOOT_JDK_FOUND" = xno; then
25344    # Now execute the test
25345
25346  if test -x /usr/libexec/java_home; then
25347    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
25348    BOOT_JDK_FOUND=maybe
25349    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
25350$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
25351  fi
25352
25353
25354    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25355    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25356      # Do we have a bin/java?
25357      if test ! -x "$BOOT_JDK/bin/java"; then
25358        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25359$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25360        BOOT_JDK_FOUND=no
25361      else
25362        # Do we have a bin/javac?
25363        if test ! -x "$BOOT_JDK/bin/javac"; then
25364          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25365$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25366          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25367$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25368          BOOT_JDK_FOUND=no
25369        else
25370          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25371          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25372
25373          # Extra M4 quote needed to protect [] in grep expression.
25374          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25375          if test "x$FOUND_CORRECT_VERSION" = x; then
25376            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25377$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25378            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25379$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25380            BOOT_JDK_FOUND=no
25381          else
25382            # We're done! :-)
25383            BOOT_JDK_FOUND=yes
25384
25385  # Only process if variable expands to non-empty
25386
25387  if test "x$BOOT_JDK" != x; then
25388    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25389
25390  # Input might be given as Windows format, start by converting to
25391  # unix format.
25392  path="$BOOT_JDK"
25393  new_path=`$CYGPATH -u "$path"`
25394
25395  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25396  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25397  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25398  # "foo.exe" is OK but "foo" is an error.
25399  #
25400  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25401  # It is also a way to make sure we got the proper file name for the real test later on.
25402  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25403  if test "x$test_shortpath" = x; then
25404    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25405$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25406    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25407  fi
25408
25409  # Call helper function which possibly converts this using DOS-style short mode.
25410  # If so, the updated path is stored in $new_path.
25411
25412  input_path="$new_path"
25413  # Check if we need to convert this using DOS-style short mode. If the path
25414  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25415  # take no chances and rewrite it.
25416  # Note: m4 eats our [], so we need to use [ and ] instead.
25417  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25418  if test "x$has_forbidden_chars" != x; then
25419    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25420    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25421    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25422    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25423      # Going to short mode and back again did indeed matter. Since short mode is
25424      # case insensitive, let's make it lowercase to improve readability.
25425      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25426      # Now convert it back to Unix-style (cygpath)
25427      input_path=`$CYGPATH -u "$shortmode_path"`
25428      new_path="$input_path"
25429    fi
25430  fi
25431
25432  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25433  if test "x$test_cygdrive_prefix" = x; then
25434    # As a simple fix, exclude /usr/bin since it's not a real path.
25435    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25436      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25437      # a path prefixed by /cygdrive for fixpath to work.
25438      new_path="$CYGWIN_ROOT_PATH$input_path"
25439    fi
25440  fi
25441
25442
25443  if test "x$path" != "x$new_path"; then
25444    BOOT_JDK="$new_path"
25445    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25446$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25447  fi
25448
25449    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25450
25451  path="$BOOT_JDK"
25452  has_colon=`$ECHO $path | $GREP ^.:`
25453  new_path="$path"
25454  if test "x$has_colon" = x; then
25455    # Not in mixed or Windows style, start by that.
25456    new_path=`cmd //c echo $path`
25457  fi
25458
25459
25460  input_path="$new_path"
25461  # Check if we need to convert this using DOS-style short mode. If the path
25462  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25463  # take no chances and rewrite it.
25464  # Note: m4 eats our [], so we need to use [ and ] instead.
25465  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25466  if test "x$has_forbidden_chars" != x; then
25467    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25468    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25469  fi
25470
25471
25472  windows_path="$new_path"
25473  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25474    unix_path=`$CYGPATH -u "$windows_path"`
25475    new_path="$unix_path"
25476  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25477    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25478    new_path="$unix_path"
25479  fi
25480
25481  if test "x$path" != "x$new_path"; then
25482    BOOT_JDK="$new_path"
25483    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25484$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25485  fi
25486
25487  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25488  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25489
25490    else
25491      # We're on a unix platform. Hooray! :)
25492      path="$BOOT_JDK"
25493      has_space=`$ECHO "$path" | $GREP " "`
25494      if test "x$has_space" != x; then
25495        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25496$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25497        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25498      fi
25499
25500      # Use eval to expand a potential ~
25501      eval path="$path"
25502      if test ! -f "$path" && test ! -d "$path"; then
25503        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25504      fi
25505
25506      if test -d "$path"; then
25507        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25508      else
25509        dir="`$DIRNAME "$path"`"
25510        base="`$BASENAME "$path"`"
25511        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25512      fi
25513    fi
25514  fi
25515
25516            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25517$as_echo_n "checking for Boot JDK... " >&6; }
25518            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25519$as_echo "$BOOT_JDK" >&6; }
25520            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25521$as_echo_n "checking Boot JDK version... " >&6; }
25522            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25523            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25524$as_echo "$BOOT_JDK_VERSION" >&6; }
25525          fi # end check jdk version
25526        fi # end check javac
25527      fi # end check java
25528    fi # end check boot jdk found
25529  fi
25530
25531
25532  if test "x$BOOT_JDK_FOUND" = xno; then
25533    # Now execute the test
25534
25535  if test -x /usr/libexec/java_home; then
25536    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
25537    BOOT_JDK_FOUND=maybe
25538    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
25539$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
25540  fi
25541
25542
25543    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25544    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25545      # Do we have a bin/java?
25546      if test ! -x "$BOOT_JDK/bin/java"; then
25547        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25548$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25549        BOOT_JDK_FOUND=no
25550      else
25551        # Do we have a bin/javac?
25552        if test ! -x "$BOOT_JDK/bin/javac"; then
25553          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25554$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25555          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25556$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25557          BOOT_JDK_FOUND=no
25558        else
25559          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25560          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25561
25562          # Extra M4 quote needed to protect [] in grep expression.
25563          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25564          if test "x$FOUND_CORRECT_VERSION" = x; then
25565            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25566$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25567            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25568$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25569            BOOT_JDK_FOUND=no
25570          else
25571            # We're done! :-)
25572            BOOT_JDK_FOUND=yes
25573
25574  # Only process if variable expands to non-empty
25575
25576  if test "x$BOOT_JDK" != x; then
25577    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25578
25579  # Input might be given as Windows format, start by converting to
25580  # unix format.
25581  path="$BOOT_JDK"
25582  new_path=`$CYGPATH -u "$path"`
25583
25584  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25585  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25586  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25587  # "foo.exe" is OK but "foo" is an error.
25588  #
25589  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25590  # It is also a way to make sure we got the proper file name for the real test later on.
25591  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25592  if test "x$test_shortpath" = x; then
25593    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25594$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25595    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25596  fi
25597
25598  # Call helper function which possibly converts this using DOS-style short mode.
25599  # If so, the updated path is stored in $new_path.
25600
25601  input_path="$new_path"
25602  # Check if we need to convert this using DOS-style short mode. If the path
25603  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25604  # take no chances and rewrite it.
25605  # Note: m4 eats our [], so we need to use [ and ] instead.
25606  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25607  if test "x$has_forbidden_chars" != x; then
25608    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25609    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25610    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25611    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25612      # Going to short mode and back again did indeed matter. Since short mode is
25613      # case insensitive, let's make it lowercase to improve readability.
25614      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25615      # Now convert it back to Unix-style (cygpath)
25616      input_path=`$CYGPATH -u "$shortmode_path"`
25617      new_path="$input_path"
25618    fi
25619  fi
25620
25621  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25622  if test "x$test_cygdrive_prefix" = x; then
25623    # As a simple fix, exclude /usr/bin since it's not a real path.
25624    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25625      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25626      # a path prefixed by /cygdrive for fixpath to work.
25627      new_path="$CYGWIN_ROOT_PATH$input_path"
25628    fi
25629  fi
25630
25631
25632  if test "x$path" != "x$new_path"; then
25633    BOOT_JDK="$new_path"
25634    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25635$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25636  fi
25637
25638    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25639
25640  path="$BOOT_JDK"
25641  has_colon=`$ECHO $path | $GREP ^.:`
25642  new_path="$path"
25643  if test "x$has_colon" = x; then
25644    # Not in mixed or Windows style, start by that.
25645    new_path=`cmd //c echo $path`
25646  fi
25647
25648
25649  input_path="$new_path"
25650  # Check if we need to convert this using DOS-style short mode. If the path
25651  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25652  # take no chances and rewrite it.
25653  # Note: m4 eats our [], so we need to use [ and ] instead.
25654  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25655  if test "x$has_forbidden_chars" != x; then
25656    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25657    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25658  fi
25659
25660
25661  windows_path="$new_path"
25662  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25663    unix_path=`$CYGPATH -u "$windows_path"`
25664    new_path="$unix_path"
25665  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25666    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25667    new_path="$unix_path"
25668  fi
25669
25670  if test "x$path" != "x$new_path"; then
25671    BOOT_JDK="$new_path"
25672    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25673$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25674  fi
25675
25676  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25677  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25678
25679    else
25680      # We're on a unix platform. Hooray! :)
25681      path="$BOOT_JDK"
25682      has_space=`$ECHO "$path" | $GREP " "`
25683      if test "x$has_space" != x; then
25684        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25685$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25686        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25687      fi
25688
25689      # Use eval to expand a potential ~
25690      eval path="$path"
25691      if test ! -f "$path" && test ! -d "$path"; then
25692        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25693      fi
25694
25695      if test -d "$path"; then
25696        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25697      else
25698        dir="`$DIRNAME "$path"`"
25699        base="`$BASENAME "$path"`"
25700        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25701      fi
25702    fi
25703  fi
25704
25705            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25706$as_echo_n "checking for Boot JDK... " >&6; }
25707            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25708$as_echo "$BOOT_JDK" >&6; }
25709            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25710$as_echo_n "checking Boot JDK version... " >&6; }
25711            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25712            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25713$as_echo "$BOOT_JDK_VERSION" >&6; }
25714          fi # end check jdk version
25715        fi # end check javac
25716      fi # end check java
25717    fi # end check boot jdk found
25718  fi
25719
25720  fi
25721
25722
25723    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25724    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25725      # Do we have a bin/java?
25726      if test ! -x "$BOOT_JDK/bin/java"; then
25727        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25728$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25729        BOOT_JDK_FOUND=no
25730      else
25731        # Do we have a bin/javac?
25732        if test ! -x "$BOOT_JDK/bin/javac"; then
25733          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25734$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25735          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25736$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25737          BOOT_JDK_FOUND=no
25738        else
25739          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25740          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25741
25742          # Extra M4 quote needed to protect [] in grep expression.
25743          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25744          if test "x$FOUND_CORRECT_VERSION" = x; then
25745            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25746$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25747            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25748$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25749            BOOT_JDK_FOUND=no
25750          else
25751            # We're done! :-)
25752            BOOT_JDK_FOUND=yes
25753
25754  # Only process if variable expands to non-empty
25755
25756  if test "x$BOOT_JDK" != x; then
25757    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25758
25759  # Input might be given as Windows format, start by converting to
25760  # unix format.
25761  path="$BOOT_JDK"
25762  new_path=`$CYGPATH -u "$path"`
25763
25764  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25765  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25766  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25767  # "foo.exe" is OK but "foo" is an error.
25768  #
25769  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25770  # It is also a way to make sure we got the proper file name for the real test later on.
25771  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25772  if test "x$test_shortpath" = x; then
25773    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25774$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25775    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25776  fi
25777
25778  # Call helper function which possibly converts this using DOS-style short mode.
25779  # If so, the updated path is stored in $new_path.
25780
25781  input_path="$new_path"
25782  # Check if we need to convert this using DOS-style short mode. If the path
25783  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25784  # take no chances and rewrite it.
25785  # Note: m4 eats our [], so we need to use [ and ] instead.
25786  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25787  if test "x$has_forbidden_chars" != x; then
25788    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25789    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25790    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25791    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25792      # Going to short mode and back again did indeed matter. Since short mode is
25793      # case insensitive, let's make it lowercase to improve readability.
25794      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25795      # Now convert it back to Unix-style (cygpath)
25796      input_path=`$CYGPATH -u "$shortmode_path"`
25797      new_path="$input_path"
25798    fi
25799  fi
25800
25801  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25802  if test "x$test_cygdrive_prefix" = x; then
25803    # As a simple fix, exclude /usr/bin since it's not a real path.
25804    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25805      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25806      # a path prefixed by /cygdrive for fixpath to work.
25807      new_path="$CYGWIN_ROOT_PATH$input_path"
25808    fi
25809  fi
25810
25811
25812  if test "x$path" != "x$new_path"; then
25813    BOOT_JDK="$new_path"
25814    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25815$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25816  fi
25817
25818    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25819
25820  path="$BOOT_JDK"
25821  has_colon=`$ECHO $path | $GREP ^.:`
25822  new_path="$path"
25823  if test "x$has_colon" = x; then
25824    # Not in mixed or Windows style, start by that.
25825    new_path=`cmd //c echo $path`
25826  fi
25827
25828
25829  input_path="$new_path"
25830  # Check if we need to convert this using DOS-style short mode. If the path
25831  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25832  # take no chances and rewrite it.
25833  # Note: m4 eats our [], so we need to use [ and ] instead.
25834  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25835  if test "x$has_forbidden_chars" != x; then
25836    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25837    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25838  fi
25839
25840
25841  windows_path="$new_path"
25842  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25843    unix_path=`$CYGPATH -u "$windows_path"`
25844    new_path="$unix_path"
25845  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25846    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25847    new_path="$unix_path"
25848  fi
25849
25850  if test "x$path" != "x$new_path"; then
25851    BOOT_JDK="$new_path"
25852    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25853$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25854  fi
25855
25856  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25857  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25858
25859    else
25860      # We're on a unix platform. Hooray! :)
25861      path="$BOOT_JDK"
25862      has_space=`$ECHO "$path" | $GREP " "`
25863      if test "x$has_space" != x; then
25864        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25865$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25866        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25867      fi
25868
25869      # Use eval to expand a potential ~
25870      eval path="$path"
25871      if test ! -f "$path" && test ! -d "$path"; then
25872        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25873      fi
25874
25875      if test -d "$path"; then
25876        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25877      else
25878        dir="`$DIRNAME "$path"`"
25879        base="`$BASENAME "$path"`"
25880        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25881      fi
25882    fi
25883  fi
25884
25885            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25886$as_echo_n "checking for Boot JDK... " >&6; }
25887            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25888$as_echo "$BOOT_JDK" >&6; }
25889            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25890$as_echo_n "checking Boot JDK version... " >&6; }
25891            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25892            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25893$as_echo "$BOOT_JDK_VERSION" >&6; }
25894          fi # end check jdk version
25895        fi # end check javac
25896      fi # end check java
25897    fi # end check boot jdk found
25898  fi
25899
25900
25901  # Test: Is $JAVA_HOME set?
25902
25903  if test "x$BOOT_JDK_FOUND" = xno; then
25904    # Now execute the test
25905
25906  if test "x$JAVA_HOME" != x; then
25907    JAVA_HOME_PROCESSED="$JAVA_HOME"
25908
25909  # Only process if variable expands to non-empty
25910
25911  if test "x$JAVA_HOME_PROCESSED" != x; then
25912    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25913
25914  # Input might be given as Windows format, start by converting to
25915  # unix format.
25916  path="$JAVA_HOME_PROCESSED"
25917  new_path=`$CYGPATH -u "$path"`
25918
25919  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25920  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25921  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25922  # "foo.exe" is OK but "foo" is an error.
25923  #
25924  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25925  # It is also a way to make sure we got the proper file name for the real test later on.
25926  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25927  if test "x$test_shortpath" = x; then
25928    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
25929$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
25930    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
25931  fi
25932
25933  # Call helper function which possibly converts this using DOS-style short mode.
25934  # If so, the updated path is stored in $new_path.
25935
25936  input_path="$new_path"
25937  # Check if we need to convert this using DOS-style short mode. If the path
25938  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25939  # take no chances and rewrite it.
25940  # Note: m4 eats our [], so we need to use [ and ] instead.
25941  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25942  if test "x$has_forbidden_chars" != x; then
25943    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25944    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25945    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25946    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25947      # Going to short mode and back again did indeed matter. Since short mode is
25948      # case insensitive, let's make it lowercase to improve readability.
25949      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25950      # Now convert it back to Unix-style (cygpath)
25951      input_path=`$CYGPATH -u "$shortmode_path"`
25952      new_path="$input_path"
25953    fi
25954  fi
25955
25956  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25957  if test "x$test_cygdrive_prefix" = x; then
25958    # As a simple fix, exclude /usr/bin since it's not a real path.
25959    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25960      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25961      # a path prefixed by /cygdrive for fixpath to work.
25962      new_path="$CYGWIN_ROOT_PATH$input_path"
25963    fi
25964  fi
25965
25966
25967  if test "x$path" != "x$new_path"; then
25968    JAVA_HOME_PROCESSED="$new_path"
25969    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
25970$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
25971  fi
25972
25973    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25974
25975  path="$JAVA_HOME_PROCESSED"
25976  has_colon=`$ECHO $path | $GREP ^.:`
25977  new_path="$path"
25978  if test "x$has_colon" = x; then
25979    # Not in mixed or Windows style, start by that.
25980    new_path=`cmd //c echo $path`
25981  fi
25982
25983
25984  input_path="$new_path"
25985  # Check if we need to convert this using DOS-style short mode. If the path
25986  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25987  # take no chances and rewrite it.
25988  # Note: m4 eats our [], so we need to use [ and ] instead.
25989  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25990  if test "x$has_forbidden_chars" != x; then
25991    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25992    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25993  fi
25994
25995
25996  windows_path="$new_path"
25997  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25998    unix_path=`$CYGPATH -u "$windows_path"`
25999    new_path="$unix_path"
26000  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26001    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26002    new_path="$unix_path"
26003  fi
26004
26005  if test "x$path" != "x$new_path"; then
26006    JAVA_HOME_PROCESSED="$new_path"
26007    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26008$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26009  fi
26010
26011  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26012  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26013
26014    else
26015      # We're on a unix platform. Hooray! :)
26016      path="$JAVA_HOME_PROCESSED"
26017      has_space=`$ECHO "$path" | $GREP " "`
26018      if test "x$has_space" != x; then
26019        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26020$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26021        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26022      fi
26023
26024      # Use eval to expand a potential ~
26025      eval path="$path"
26026      if test ! -f "$path" && test ! -d "$path"; then
26027        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
26028      fi
26029
26030      if test -d "$path"; then
26031        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
26032      else
26033        dir="`$DIRNAME "$path"`"
26034        base="`$BASENAME "$path"`"
26035        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
26036      fi
26037    fi
26038  fi
26039
26040    if test ! -d "$JAVA_HOME_PROCESSED"; then
26041      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
26042$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
26043    else
26044      # Aha, the user has set a JAVA_HOME
26045      # let us use that as the Boot JDK.
26046      BOOT_JDK="$JAVA_HOME_PROCESSED"
26047      BOOT_JDK_FOUND=maybe
26048      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
26049$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
26050    fi
26051  fi
26052
26053
26054    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26055    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26056      # Do we have a bin/java?
26057      if test ! -x "$BOOT_JDK/bin/java"; then
26058        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26059$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26060        BOOT_JDK_FOUND=no
26061      else
26062        # Do we have a bin/javac?
26063        if test ! -x "$BOOT_JDK/bin/javac"; then
26064          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26065$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26066          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26067$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26068          BOOT_JDK_FOUND=no
26069        else
26070          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26071          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26072
26073          # Extra M4 quote needed to protect [] in grep expression.
26074          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26075          if test "x$FOUND_CORRECT_VERSION" = x; then
26076            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26077$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26078            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26079$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26080            BOOT_JDK_FOUND=no
26081          else
26082            # We're done! :-)
26083            BOOT_JDK_FOUND=yes
26084
26085  # Only process if variable expands to non-empty
26086
26087  if test "x$BOOT_JDK" != x; then
26088    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26089
26090  # Input might be given as Windows format, start by converting to
26091  # unix format.
26092  path="$BOOT_JDK"
26093  new_path=`$CYGPATH -u "$path"`
26094
26095  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26096  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26097  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26098  # "foo.exe" is OK but "foo" is an error.
26099  #
26100  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26101  # It is also a way to make sure we got the proper file name for the real test later on.
26102  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26103  if test "x$test_shortpath" = x; then
26104    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26105$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26106    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26107  fi
26108
26109  # Call helper function which possibly converts this using DOS-style short mode.
26110  # If so, the updated path is stored in $new_path.
26111
26112  input_path="$new_path"
26113  # Check if we need to convert this using DOS-style short mode. If the path
26114  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26115  # take no chances and rewrite it.
26116  # Note: m4 eats our [], so we need to use [ and ] instead.
26117  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26118  if test "x$has_forbidden_chars" != x; then
26119    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26120    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26121    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26122    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26123      # Going to short mode and back again did indeed matter. Since short mode is
26124      # case insensitive, let's make it lowercase to improve readability.
26125      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26126      # Now convert it back to Unix-style (cygpath)
26127      input_path=`$CYGPATH -u "$shortmode_path"`
26128      new_path="$input_path"
26129    fi
26130  fi
26131
26132  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26133  if test "x$test_cygdrive_prefix" = x; then
26134    # As a simple fix, exclude /usr/bin since it's not a real path.
26135    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26136      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26137      # a path prefixed by /cygdrive for fixpath to work.
26138      new_path="$CYGWIN_ROOT_PATH$input_path"
26139    fi
26140  fi
26141
26142
26143  if test "x$path" != "x$new_path"; then
26144    BOOT_JDK="$new_path"
26145    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26146$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26147  fi
26148
26149    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26150
26151  path="$BOOT_JDK"
26152  has_colon=`$ECHO $path | $GREP ^.:`
26153  new_path="$path"
26154  if test "x$has_colon" = x; then
26155    # Not in mixed or Windows style, start by that.
26156    new_path=`cmd //c echo $path`
26157  fi
26158
26159
26160  input_path="$new_path"
26161  # Check if we need to convert this using DOS-style short mode. If the path
26162  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26163  # take no chances and rewrite it.
26164  # Note: m4 eats our [], so we need to use [ and ] instead.
26165  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26166  if test "x$has_forbidden_chars" != x; then
26167    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26168    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26169  fi
26170
26171
26172  windows_path="$new_path"
26173  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26174    unix_path=`$CYGPATH -u "$windows_path"`
26175    new_path="$unix_path"
26176  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26177    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26178    new_path="$unix_path"
26179  fi
26180
26181  if test "x$path" != "x$new_path"; then
26182    BOOT_JDK="$new_path"
26183    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26184$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26185  fi
26186
26187  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26188  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26189
26190    else
26191      # We're on a unix platform. Hooray! :)
26192      path="$BOOT_JDK"
26193      has_space=`$ECHO "$path" | $GREP " "`
26194      if test "x$has_space" != x; then
26195        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26196$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26197        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26198      fi
26199
26200      # Use eval to expand a potential ~
26201      eval path="$path"
26202      if test ! -f "$path" && test ! -d "$path"; then
26203        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26204      fi
26205
26206      if test -d "$path"; then
26207        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26208      else
26209        dir="`$DIRNAME "$path"`"
26210        base="`$BASENAME "$path"`"
26211        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26212      fi
26213    fi
26214  fi
26215
26216            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26217$as_echo_n "checking for Boot JDK... " >&6; }
26218            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26219$as_echo "$BOOT_JDK" >&6; }
26220            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26221$as_echo_n "checking Boot JDK version... " >&6; }
26222            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26223            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26224$as_echo "$BOOT_JDK_VERSION" >&6; }
26225          fi # end check jdk version
26226        fi # end check javac
26227      fi # end check java
26228    fi # end check boot jdk found
26229  fi
26230
26231
26232  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
26233
26234  if test "x$BOOT_JDK_FOUND" = xno; then
26235    # Now execute the test
26236
26237  # Extract the first word of "javac", so it can be a program name with args.
26238set dummy javac; ac_word=$2
26239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26240$as_echo_n "checking for $ac_word... " >&6; }
26241if ${ac_cv_path_JAVAC_CHECK+:} false; then :
26242  $as_echo_n "(cached) " >&6
26243else
26244  case $JAVAC_CHECK in
26245  [\\/]* | ?:[\\/]*)
26246  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
26247  ;;
26248  *)
26249  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26250for as_dir in $PATH
26251do
26252  IFS=$as_save_IFS
26253  test -z "$as_dir" && as_dir=.
26254    for ac_exec_ext in '' $ac_executable_extensions; do
26255  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26256    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
26257    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26258    break 2
26259  fi
26260done
26261  done
26262IFS=$as_save_IFS
26263
26264  ;;
26265esac
26266fi
26267JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
26268if test -n "$JAVAC_CHECK"; then
26269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
26270$as_echo "$JAVAC_CHECK" >&6; }
26271else
26272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26273$as_echo "no" >&6; }
26274fi
26275
26276
26277  # Extract the first word of "java", so it can be a program name with args.
26278set dummy java; ac_word=$2
26279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26280$as_echo_n "checking for $ac_word... " >&6; }
26281if ${ac_cv_path_JAVA_CHECK+:} false; then :
26282  $as_echo_n "(cached) " >&6
26283else
26284  case $JAVA_CHECK in
26285  [\\/]* | ?:[\\/]*)
26286  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
26287  ;;
26288  *)
26289  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26290for as_dir in $PATH
26291do
26292  IFS=$as_save_IFS
26293  test -z "$as_dir" && as_dir=.
26294    for ac_exec_ext in '' $ac_executable_extensions; do
26295  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26296    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
26297    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26298    break 2
26299  fi
26300done
26301  done
26302IFS=$as_save_IFS
26303
26304  ;;
26305esac
26306fi
26307JAVA_CHECK=$ac_cv_path_JAVA_CHECK
26308if test -n "$JAVA_CHECK"; then
26309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
26310$as_echo "$JAVA_CHECK" >&6; }
26311else
26312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26313$as_echo "no" >&6; }
26314fi
26315
26316
26317  BINARY="$JAVAC_CHECK"
26318  if test "x$JAVAC_CHECK" = x; then
26319    BINARY="$JAVA_CHECK"
26320  fi
26321  if test "x$BINARY" != x; then
26322    # So there is a java(c) binary, it might be part of a JDK.
26323    # Lets find the JDK/JRE directory by following symbolic links.
26324    # Linux/GNU systems often have links from /usr/bin/java to
26325    # /etc/alternatives/java to the real JDK binary.
26326
26327  if test "x$OPENJDK_BUILD_OS" != xwindows; then
26328    # Follow a chain of symbolic links. Use readlink
26329    # where it exists, else fall back to horribly
26330    # complicated shell code.
26331    if test "x$READLINK_TESTED" != yes; then
26332      # On MacOSX there is a readlink tool with a different
26333      # purpose than the GNU readlink tool. Check the found readlink.
26334      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
26335      if test "x$ISGNU" = x; then
26336        # A readlink that we do not know how to use.
26337        # Are there other non-GNU readlinks out there?
26338        READLINK_TESTED=yes
26339        READLINK=
26340      fi
26341    fi
26342
26343    if test "x$READLINK" != x; then
26344      BINARY=`$READLINK -f $BINARY`
26345    else
26346      # Save the current directory for restoring afterwards
26347      STARTDIR=$PWD
26348      COUNTER=0
26349      sym_link_dir=`$DIRNAME $BINARY`
26350      sym_link_file=`$BASENAME $BINARY`
26351      cd $sym_link_dir
26352      # Use -P flag to resolve symlinks in directories.
26353      cd `$THEPWDCMD -P`
26354      sym_link_dir=`$THEPWDCMD -P`
26355      # Resolve file symlinks
26356      while test $COUNTER -lt 20; do
26357        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
26358        if test "x$ISLINK" == x; then
26359          # This is not a symbolic link! We are done!
26360          break
26361        fi
26362        # Again resolve directory symlinks since the target of the just found
26363        # link could be in a different directory
26364        cd `$DIRNAME $ISLINK`
26365        sym_link_dir=`$THEPWDCMD -P`
26366        sym_link_file=`$BASENAME $ISLINK`
26367        let COUNTER=COUNTER+1
26368      done
26369      cd $STARTDIR
26370      BINARY=$sym_link_dir/$sym_link_file
26371    fi
26372  fi
26373
26374    BOOT_JDK=`dirname "$BINARY"`
26375    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
26376    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
26377      # Looks like we found ourselves an JDK
26378      BOOT_JDK_FOUND=maybe
26379      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
26380$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
26381    fi
26382  fi
26383
26384
26385    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26386    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26387      # Do we have a bin/java?
26388      if test ! -x "$BOOT_JDK/bin/java"; then
26389        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26390$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26391        BOOT_JDK_FOUND=no
26392      else
26393        # Do we have a bin/javac?
26394        if test ! -x "$BOOT_JDK/bin/javac"; then
26395          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26396$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26397          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26398$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26399          BOOT_JDK_FOUND=no
26400        else
26401          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26402          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26403
26404          # Extra M4 quote needed to protect [] in grep expression.
26405          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26406          if test "x$FOUND_CORRECT_VERSION" = x; then
26407            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26408$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26409            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26410$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26411            BOOT_JDK_FOUND=no
26412          else
26413            # We're done! :-)
26414            BOOT_JDK_FOUND=yes
26415
26416  # Only process if variable expands to non-empty
26417
26418  if test "x$BOOT_JDK" != x; then
26419    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26420
26421  # Input might be given as Windows format, start by converting to
26422  # unix format.
26423  path="$BOOT_JDK"
26424  new_path=`$CYGPATH -u "$path"`
26425
26426  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26427  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26428  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26429  # "foo.exe" is OK but "foo" is an error.
26430  #
26431  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26432  # It is also a way to make sure we got the proper file name for the real test later on.
26433  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26434  if test "x$test_shortpath" = x; then
26435    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26436$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26437    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26438  fi
26439
26440  # Call helper function which possibly converts this using DOS-style short mode.
26441  # If so, the updated path is stored in $new_path.
26442
26443  input_path="$new_path"
26444  # Check if we need to convert this using DOS-style short mode. If the path
26445  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26446  # take no chances and rewrite it.
26447  # Note: m4 eats our [], so we need to use [ and ] instead.
26448  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26449  if test "x$has_forbidden_chars" != x; then
26450    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26451    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26452    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26453    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26454      # Going to short mode and back again did indeed matter. Since short mode is
26455      # case insensitive, let's make it lowercase to improve readability.
26456      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26457      # Now convert it back to Unix-style (cygpath)
26458      input_path=`$CYGPATH -u "$shortmode_path"`
26459      new_path="$input_path"
26460    fi
26461  fi
26462
26463  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26464  if test "x$test_cygdrive_prefix" = x; then
26465    # As a simple fix, exclude /usr/bin since it's not a real path.
26466    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26467      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26468      # a path prefixed by /cygdrive for fixpath to work.
26469      new_path="$CYGWIN_ROOT_PATH$input_path"
26470    fi
26471  fi
26472
26473
26474  if test "x$path" != "x$new_path"; then
26475    BOOT_JDK="$new_path"
26476    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26477$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26478  fi
26479
26480    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26481
26482  path="$BOOT_JDK"
26483  has_colon=`$ECHO $path | $GREP ^.:`
26484  new_path="$path"
26485  if test "x$has_colon" = x; then
26486    # Not in mixed or Windows style, start by that.
26487    new_path=`cmd //c echo $path`
26488  fi
26489
26490
26491  input_path="$new_path"
26492  # Check if we need to convert this using DOS-style short mode. If the path
26493  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26494  # take no chances and rewrite it.
26495  # Note: m4 eats our [], so we need to use [ and ] instead.
26496  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26497  if test "x$has_forbidden_chars" != x; then
26498    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26499    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26500  fi
26501
26502
26503  windows_path="$new_path"
26504  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26505    unix_path=`$CYGPATH -u "$windows_path"`
26506    new_path="$unix_path"
26507  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26508    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26509    new_path="$unix_path"
26510  fi
26511
26512  if test "x$path" != "x$new_path"; then
26513    BOOT_JDK="$new_path"
26514    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26515$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26516  fi
26517
26518  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26519  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26520
26521    else
26522      # We're on a unix platform. Hooray! :)
26523      path="$BOOT_JDK"
26524      has_space=`$ECHO "$path" | $GREP " "`
26525      if test "x$has_space" != x; then
26526        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26527$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26528        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26529      fi
26530
26531      # Use eval to expand a potential ~
26532      eval path="$path"
26533      if test ! -f "$path" && test ! -d "$path"; then
26534        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26535      fi
26536
26537      if test -d "$path"; then
26538        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26539      else
26540        dir="`$DIRNAME "$path"`"
26541        base="`$BASENAME "$path"`"
26542        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26543      fi
26544    fi
26545  fi
26546
26547            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26548$as_echo_n "checking for Boot JDK... " >&6; }
26549            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26550$as_echo "$BOOT_JDK" >&6; }
26551            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26552$as_echo_n "checking Boot JDK version... " >&6; }
26553            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26554            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26555$as_echo "$BOOT_JDK_VERSION" >&6; }
26556          fi # end check jdk version
26557        fi # end check javac
26558      fi # end check java
26559    fi # end check boot jdk found
26560  fi
26561
26562
26563  # Test: Is there a JDK installed in default, well-known locations?
26564
26565  if test "x$BOOT_JDK_FOUND" = xno; then
26566    # Now execute the test
26567
26568  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26569
26570  if test "x$BOOT_JDK_FOUND" = xno; then
26571    # Now execute the test
26572
26573  if test "x$ProgramW6432" != x; then
26574    VIRTUAL_DIR="$ProgramW6432/Java"
26575
26576  windows_path="$VIRTUAL_DIR"
26577  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26578    unix_path=`$CYGPATH -u "$windows_path"`
26579    VIRTUAL_DIR="$unix_path"
26580  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26581    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26582    VIRTUAL_DIR="$unix_path"
26583  fi
26584
26585
26586  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26587  BOOT_JDK_SUFFIX=""
26588  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26589  if test "x$ALL_JDKS_FOUND" != x; then
26590    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26591
26592  if test "x$BOOT_JDK_FOUND" = xno; then
26593    # Now execute the test
26594
26595        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26596        if test -d "$BOOT_JDK"; then
26597          BOOT_JDK_FOUND=maybe
26598          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26599$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26600        fi
26601
26602
26603    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26604    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26605      # Do we have a bin/java?
26606      if test ! -x "$BOOT_JDK/bin/java"; then
26607        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26608$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26609        BOOT_JDK_FOUND=no
26610      else
26611        # Do we have a bin/javac?
26612        if test ! -x "$BOOT_JDK/bin/javac"; then
26613          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26614$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26615          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26616$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26617          BOOT_JDK_FOUND=no
26618        else
26619          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26620          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26621
26622          # Extra M4 quote needed to protect [] in grep expression.
26623          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26624          if test "x$FOUND_CORRECT_VERSION" = x; then
26625            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26626$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26627            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26628$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26629            BOOT_JDK_FOUND=no
26630          else
26631            # We're done! :-)
26632            BOOT_JDK_FOUND=yes
26633
26634  # Only process if variable expands to non-empty
26635
26636  if test "x$BOOT_JDK" != x; then
26637    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26638
26639  # Input might be given as Windows format, start by converting to
26640  # unix format.
26641  path="$BOOT_JDK"
26642  new_path=`$CYGPATH -u "$path"`
26643
26644  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26645  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26646  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26647  # "foo.exe" is OK but "foo" is an error.
26648  #
26649  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26650  # It is also a way to make sure we got the proper file name for the real test later on.
26651  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26652  if test "x$test_shortpath" = x; then
26653    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26654$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26655    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26656  fi
26657
26658  # Call helper function which possibly converts this using DOS-style short mode.
26659  # If so, the updated path is stored in $new_path.
26660
26661  input_path="$new_path"
26662  # Check if we need to convert this using DOS-style short mode. If the path
26663  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26664  # take no chances and rewrite it.
26665  # Note: m4 eats our [], so we need to use [ and ] instead.
26666  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26667  if test "x$has_forbidden_chars" != x; then
26668    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26669    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26670    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26671    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26672      # Going to short mode and back again did indeed matter. Since short mode is
26673      # case insensitive, let's make it lowercase to improve readability.
26674      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26675      # Now convert it back to Unix-style (cygpath)
26676      input_path=`$CYGPATH -u "$shortmode_path"`
26677      new_path="$input_path"
26678    fi
26679  fi
26680
26681  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26682  if test "x$test_cygdrive_prefix" = x; then
26683    # As a simple fix, exclude /usr/bin since it's not a real path.
26684    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26685      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26686      # a path prefixed by /cygdrive for fixpath to work.
26687      new_path="$CYGWIN_ROOT_PATH$input_path"
26688    fi
26689  fi
26690
26691
26692  if test "x$path" != "x$new_path"; then
26693    BOOT_JDK="$new_path"
26694    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26695$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26696  fi
26697
26698    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26699
26700  path="$BOOT_JDK"
26701  has_colon=`$ECHO $path | $GREP ^.:`
26702  new_path="$path"
26703  if test "x$has_colon" = x; then
26704    # Not in mixed or Windows style, start by that.
26705    new_path=`cmd //c echo $path`
26706  fi
26707
26708
26709  input_path="$new_path"
26710  # Check if we need to convert this using DOS-style short mode. If the path
26711  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26712  # take no chances and rewrite it.
26713  # Note: m4 eats our [], so we need to use [ and ] instead.
26714  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26715  if test "x$has_forbidden_chars" != x; then
26716    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26717    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26718  fi
26719
26720
26721  windows_path="$new_path"
26722  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26723    unix_path=`$CYGPATH -u "$windows_path"`
26724    new_path="$unix_path"
26725  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26726    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26727    new_path="$unix_path"
26728  fi
26729
26730  if test "x$path" != "x$new_path"; then
26731    BOOT_JDK="$new_path"
26732    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26733$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26734  fi
26735
26736  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26737  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26738
26739    else
26740      # We're on a unix platform. Hooray! :)
26741      path="$BOOT_JDK"
26742      has_space=`$ECHO "$path" | $GREP " "`
26743      if test "x$has_space" != x; then
26744        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26745$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26746        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26747      fi
26748
26749      # Use eval to expand a potential ~
26750      eval path="$path"
26751      if test ! -f "$path" && test ! -d "$path"; then
26752        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26753      fi
26754
26755      if test -d "$path"; then
26756        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26757      else
26758        dir="`$DIRNAME "$path"`"
26759        base="`$BASENAME "$path"`"
26760        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26761      fi
26762    fi
26763  fi
26764
26765            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26766$as_echo_n "checking for Boot JDK... " >&6; }
26767            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26768$as_echo "$BOOT_JDK" >&6; }
26769            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26770$as_echo_n "checking Boot JDK version... " >&6; }
26771            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26772            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26773$as_echo "$BOOT_JDK_VERSION" >&6; }
26774          fi # end check jdk version
26775        fi # end check javac
26776      fi # end check java
26777    fi # end check boot jdk found
26778  fi
26779
26780    done
26781  fi
26782
26783  fi
26784
26785
26786    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26787    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26788      # Do we have a bin/java?
26789      if test ! -x "$BOOT_JDK/bin/java"; then
26790        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26791$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26792        BOOT_JDK_FOUND=no
26793      else
26794        # Do we have a bin/javac?
26795        if test ! -x "$BOOT_JDK/bin/javac"; then
26796          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26797$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26798          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26799$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26800          BOOT_JDK_FOUND=no
26801        else
26802          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26803          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26804
26805          # Extra M4 quote needed to protect [] in grep expression.
26806          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26807          if test "x$FOUND_CORRECT_VERSION" = x; then
26808            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26809$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26810            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26811$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26812            BOOT_JDK_FOUND=no
26813          else
26814            # We're done! :-)
26815            BOOT_JDK_FOUND=yes
26816
26817  # Only process if variable expands to non-empty
26818
26819  if test "x$BOOT_JDK" != x; then
26820    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26821
26822  # Input might be given as Windows format, start by converting to
26823  # unix format.
26824  path="$BOOT_JDK"
26825  new_path=`$CYGPATH -u "$path"`
26826
26827  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26828  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26829  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26830  # "foo.exe" is OK but "foo" is an error.
26831  #
26832  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26833  # It is also a way to make sure we got the proper file name for the real test later on.
26834  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26835  if test "x$test_shortpath" = x; then
26836    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26837$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26838    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26839  fi
26840
26841  # Call helper function which possibly converts this using DOS-style short mode.
26842  # If so, the updated path is stored in $new_path.
26843
26844  input_path="$new_path"
26845  # Check if we need to convert this using DOS-style short mode. If the path
26846  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26847  # take no chances and rewrite it.
26848  # Note: m4 eats our [], so we need to use [ and ] instead.
26849  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26850  if test "x$has_forbidden_chars" != x; then
26851    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26852    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26853    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26854    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26855      # Going to short mode and back again did indeed matter. Since short mode is
26856      # case insensitive, let's make it lowercase to improve readability.
26857      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26858      # Now convert it back to Unix-style (cygpath)
26859      input_path=`$CYGPATH -u "$shortmode_path"`
26860      new_path="$input_path"
26861    fi
26862  fi
26863
26864  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26865  if test "x$test_cygdrive_prefix" = x; then
26866    # As a simple fix, exclude /usr/bin since it's not a real path.
26867    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26868      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26869      # a path prefixed by /cygdrive for fixpath to work.
26870      new_path="$CYGWIN_ROOT_PATH$input_path"
26871    fi
26872  fi
26873
26874
26875  if test "x$path" != "x$new_path"; then
26876    BOOT_JDK="$new_path"
26877    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26878$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26879  fi
26880
26881    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26882
26883  path="$BOOT_JDK"
26884  has_colon=`$ECHO $path | $GREP ^.:`
26885  new_path="$path"
26886  if test "x$has_colon" = x; then
26887    # Not in mixed or Windows style, start by that.
26888    new_path=`cmd //c echo $path`
26889  fi
26890
26891
26892  input_path="$new_path"
26893  # Check if we need to convert this using DOS-style short mode. If the path
26894  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26895  # take no chances and rewrite it.
26896  # Note: m4 eats our [], so we need to use [ and ] instead.
26897  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26898  if test "x$has_forbidden_chars" != x; then
26899    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26900    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26901  fi
26902
26903
26904  windows_path="$new_path"
26905  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26906    unix_path=`$CYGPATH -u "$windows_path"`
26907    new_path="$unix_path"
26908  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26909    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26910    new_path="$unix_path"
26911  fi
26912
26913  if test "x$path" != "x$new_path"; then
26914    BOOT_JDK="$new_path"
26915    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26916$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26917  fi
26918
26919  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26920  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26921
26922    else
26923      # We're on a unix platform. Hooray! :)
26924      path="$BOOT_JDK"
26925      has_space=`$ECHO "$path" | $GREP " "`
26926      if test "x$has_space" != x; then
26927        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26928$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26929        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26930      fi
26931
26932      # Use eval to expand a potential ~
26933      eval path="$path"
26934      if test ! -f "$path" && test ! -d "$path"; then
26935        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26936      fi
26937
26938      if test -d "$path"; then
26939        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26940      else
26941        dir="`$DIRNAME "$path"`"
26942        base="`$BASENAME "$path"`"
26943        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26944      fi
26945    fi
26946  fi
26947
26948            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26949$as_echo_n "checking for Boot JDK... " >&6; }
26950            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26951$as_echo "$BOOT_JDK" >&6; }
26952            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26953$as_echo_n "checking Boot JDK version... " >&6; }
26954            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26955            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26956$as_echo "$BOOT_JDK_VERSION" >&6; }
26957          fi # end check jdk version
26958        fi # end check javac
26959      fi # end check java
26960    fi # end check boot jdk found
26961  fi
26962
26963
26964  if test "x$BOOT_JDK_FOUND" = xno; then
26965    # Now execute the test
26966
26967  if test "x$PROGRAMW6432" != x; then
26968    VIRTUAL_DIR="$PROGRAMW6432/Java"
26969
26970  windows_path="$VIRTUAL_DIR"
26971  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26972    unix_path=`$CYGPATH -u "$windows_path"`
26973    VIRTUAL_DIR="$unix_path"
26974  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26975    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26976    VIRTUAL_DIR="$unix_path"
26977  fi
26978
26979
26980  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26981  BOOT_JDK_SUFFIX=""
26982  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26983  if test "x$ALL_JDKS_FOUND" != x; then
26984    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26985
26986  if test "x$BOOT_JDK_FOUND" = xno; then
26987    # Now execute the test
26988
26989        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26990        if test -d "$BOOT_JDK"; then
26991          BOOT_JDK_FOUND=maybe
26992          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26993$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26994        fi
26995
26996
26997    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26998    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26999      # Do we have a bin/java?
27000      if test ! -x "$BOOT_JDK/bin/java"; then
27001        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27002$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27003        BOOT_JDK_FOUND=no
27004      else
27005        # Do we have a bin/javac?
27006        if test ! -x "$BOOT_JDK/bin/javac"; then
27007          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27008$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27009          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27010$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27011          BOOT_JDK_FOUND=no
27012        else
27013          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27014          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27015
27016          # Extra M4 quote needed to protect [] in grep expression.
27017          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27018          if test "x$FOUND_CORRECT_VERSION" = x; then
27019            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27020$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27021            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27022$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27023            BOOT_JDK_FOUND=no
27024          else
27025            # We're done! :-)
27026            BOOT_JDK_FOUND=yes
27027
27028  # Only process if variable expands to non-empty
27029
27030  if test "x$BOOT_JDK" != x; then
27031    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27032
27033  # Input might be given as Windows format, start by converting to
27034  # unix format.
27035  path="$BOOT_JDK"
27036  new_path=`$CYGPATH -u "$path"`
27037
27038  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27039  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27040  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27041  # "foo.exe" is OK but "foo" is an error.
27042  #
27043  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27044  # It is also a way to make sure we got the proper file name for the real test later on.
27045  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27046  if test "x$test_shortpath" = x; then
27047    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27048$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27049    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27050  fi
27051
27052  # Call helper function which possibly converts this using DOS-style short mode.
27053  # If so, the updated path is stored in $new_path.
27054
27055  input_path="$new_path"
27056  # Check if we need to convert this using DOS-style short mode. If the path
27057  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27058  # take no chances and rewrite it.
27059  # Note: m4 eats our [], so we need to use [ and ] instead.
27060  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27061  if test "x$has_forbidden_chars" != x; then
27062    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27063    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27064    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27065    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27066      # Going to short mode and back again did indeed matter. Since short mode is
27067      # case insensitive, let's make it lowercase to improve readability.
27068      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27069      # Now convert it back to Unix-style (cygpath)
27070      input_path=`$CYGPATH -u "$shortmode_path"`
27071      new_path="$input_path"
27072    fi
27073  fi
27074
27075  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27076  if test "x$test_cygdrive_prefix" = x; then
27077    # As a simple fix, exclude /usr/bin since it's not a real path.
27078    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27079      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27080      # a path prefixed by /cygdrive for fixpath to work.
27081      new_path="$CYGWIN_ROOT_PATH$input_path"
27082    fi
27083  fi
27084
27085
27086  if test "x$path" != "x$new_path"; then
27087    BOOT_JDK="$new_path"
27088    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27089$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27090  fi
27091
27092    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27093
27094  path="$BOOT_JDK"
27095  has_colon=`$ECHO $path | $GREP ^.:`
27096  new_path="$path"
27097  if test "x$has_colon" = x; then
27098    # Not in mixed or Windows style, start by that.
27099    new_path=`cmd //c echo $path`
27100  fi
27101
27102
27103  input_path="$new_path"
27104  # Check if we need to convert this using DOS-style short mode. If the path
27105  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27106  # take no chances and rewrite it.
27107  # Note: m4 eats our [], so we need to use [ and ] instead.
27108  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27109  if test "x$has_forbidden_chars" != x; then
27110    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27111    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27112  fi
27113
27114
27115  windows_path="$new_path"
27116  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27117    unix_path=`$CYGPATH -u "$windows_path"`
27118    new_path="$unix_path"
27119  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27120    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27121    new_path="$unix_path"
27122  fi
27123
27124  if test "x$path" != "x$new_path"; then
27125    BOOT_JDK="$new_path"
27126    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27127$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27128  fi
27129
27130  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27131  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27132
27133    else
27134      # We're on a unix platform. Hooray! :)
27135      path="$BOOT_JDK"
27136      has_space=`$ECHO "$path" | $GREP " "`
27137      if test "x$has_space" != x; then
27138        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27139$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27140        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27141      fi
27142
27143      # Use eval to expand a potential ~
27144      eval path="$path"
27145      if test ! -f "$path" && test ! -d "$path"; then
27146        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27147      fi
27148
27149      if test -d "$path"; then
27150        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27151      else
27152        dir="`$DIRNAME "$path"`"
27153        base="`$BASENAME "$path"`"
27154        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27155      fi
27156    fi
27157  fi
27158
27159            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27160$as_echo_n "checking for Boot JDK... " >&6; }
27161            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27162$as_echo "$BOOT_JDK" >&6; }
27163            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27164$as_echo_n "checking Boot JDK version... " >&6; }
27165            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27166            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27167$as_echo "$BOOT_JDK_VERSION" >&6; }
27168          fi # end check jdk version
27169        fi # end check javac
27170      fi # end check java
27171    fi # end check boot jdk found
27172  fi
27173
27174    done
27175  fi
27176
27177  fi
27178
27179
27180    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27181    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27182      # Do we have a bin/java?
27183      if test ! -x "$BOOT_JDK/bin/java"; then
27184        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27185$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27186        BOOT_JDK_FOUND=no
27187      else
27188        # Do we have a bin/javac?
27189        if test ! -x "$BOOT_JDK/bin/javac"; then
27190          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27191$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27192          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27193$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27194          BOOT_JDK_FOUND=no
27195        else
27196          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27197          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27198
27199          # Extra M4 quote needed to protect [] in grep expression.
27200          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27201          if test "x$FOUND_CORRECT_VERSION" = x; then
27202            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27203$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27204            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27205$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27206            BOOT_JDK_FOUND=no
27207          else
27208            # We're done! :-)
27209            BOOT_JDK_FOUND=yes
27210
27211  # Only process if variable expands to non-empty
27212
27213  if test "x$BOOT_JDK" != x; then
27214    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27215
27216  # Input might be given as Windows format, start by converting to
27217  # unix format.
27218  path="$BOOT_JDK"
27219  new_path=`$CYGPATH -u "$path"`
27220
27221  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27222  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27223  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27224  # "foo.exe" is OK but "foo" is an error.
27225  #
27226  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27227  # It is also a way to make sure we got the proper file name for the real test later on.
27228  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27229  if test "x$test_shortpath" = x; then
27230    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27231$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27232    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27233  fi
27234
27235  # Call helper function which possibly converts this using DOS-style short mode.
27236  # If so, the updated path is stored in $new_path.
27237
27238  input_path="$new_path"
27239  # Check if we need to convert this using DOS-style short mode. If the path
27240  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27241  # take no chances and rewrite it.
27242  # Note: m4 eats our [], so we need to use [ and ] instead.
27243  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27244  if test "x$has_forbidden_chars" != x; then
27245    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27246    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27247    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27248    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27249      # Going to short mode and back again did indeed matter. Since short mode is
27250      # case insensitive, let's make it lowercase to improve readability.
27251      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27252      # Now convert it back to Unix-style (cygpath)
27253      input_path=`$CYGPATH -u "$shortmode_path"`
27254      new_path="$input_path"
27255    fi
27256  fi
27257
27258  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27259  if test "x$test_cygdrive_prefix" = x; then
27260    # As a simple fix, exclude /usr/bin since it's not a real path.
27261    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27262      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27263      # a path prefixed by /cygdrive for fixpath to work.
27264      new_path="$CYGWIN_ROOT_PATH$input_path"
27265    fi
27266  fi
27267
27268
27269  if test "x$path" != "x$new_path"; then
27270    BOOT_JDK="$new_path"
27271    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27272$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27273  fi
27274
27275    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27276
27277  path="$BOOT_JDK"
27278  has_colon=`$ECHO $path | $GREP ^.:`
27279  new_path="$path"
27280  if test "x$has_colon" = x; then
27281    # Not in mixed or Windows style, start by that.
27282    new_path=`cmd //c echo $path`
27283  fi
27284
27285
27286  input_path="$new_path"
27287  # Check if we need to convert this using DOS-style short mode. If the path
27288  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27289  # take no chances and rewrite it.
27290  # Note: m4 eats our [], so we need to use [ and ] instead.
27291  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27292  if test "x$has_forbidden_chars" != x; then
27293    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27294    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27295  fi
27296
27297
27298  windows_path="$new_path"
27299  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27300    unix_path=`$CYGPATH -u "$windows_path"`
27301    new_path="$unix_path"
27302  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27303    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27304    new_path="$unix_path"
27305  fi
27306
27307  if test "x$path" != "x$new_path"; then
27308    BOOT_JDK="$new_path"
27309    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27310$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27311  fi
27312
27313  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27314  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27315
27316    else
27317      # We're on a unix platform. Hooray! :)
27318      path="$BOOT_JDK"
27319      has_space=`$ECHO "$path" | $GREP " "`
27320      if test "x$has_space" != x; then
27321        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27322$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27323        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27324      fi
27325
27326      # Use eval to expand a potential ~
27327      eval path="$path"
27328      if test ! -f "$path" && test ! -d "$path"; then
27329        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27330      fi
27331
27332      if test -d "$path"; then
27333        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27334      else
27335        dir="`$DIRNAME "$path"`"
27336        base="`$BASENAME "$path"`"
27337        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27338      fi
27339    fi
27340  fi
27341
27342            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27343$as_echo_n "checking for Boot JDK... " >&6; }
27344            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27345$as_echo "$BOOT_JDK" >&6; }
27346            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27347$as_echo_n "checking Boot JDK version... " >&6; }
27348            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27349            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27350$as_echo "$BOOT_JDK_VERSION" >&6; }
27351          fi # end check jdk version
27352        fi # end check javac
27353      fi # end check java
27354    fi # end check boot jdk found
27355  fi
27356
27357
27358  if test "x$BOOT_JDK_FOUND" = xno; then
27359    # Now execute the test
27360
27361  if test "x$PROGRAMFILES" != x; then
27362    VIRTUAL_DIR="$PROGRAMFILES/Java"
27363
27364  windows_path="$VIRTUAL_DIR"
27365  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27366    unix_path=`$CYGPATH -u "$windows_path"`
27367    VIRTUAL_DIR="$unix_path"
27368  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27369    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27370    VIRTUAL_DIR="$unix_path"
27371  fi
27372
27373
27374  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27375  BOOT_JDK_SUFFIX=""
27376  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27377  if test "x$ALL_JDKS_FOUND" != x; then
27378    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27379
27380  if test "x$BOOT_JDK_FOUND" = xno; then
27381    # Now execute the test
27382
27383        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27384        if test -d "$BOOT_JDK"; then
27385          BOOT_JDK_FOUND=maybe
27386          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27387$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27388        fi
27389
27390
27391    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27392    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27393      # Do we have a bin/java?
27394      if test ! -x "$BOOT_JDK/bin/java"; then
27395        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27396$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27397        BOOT_JDK_FOUND=no
27398      else
27399        # Do we have a bin/javac?
27400        if test ! -x "$BOOT_JDK/bin/javac"; then
27401          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27402$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27403          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27404$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27405          BOOT_JDK_FOUND=no
27406        else
27407          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27408          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27409
27410          # Extra M4 quote needed to protect [] in grep expression.
27411          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27412          if test "x$FOUND_CORRECT_VERSION" = x; then
27413            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27414$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27415            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27416$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27417            BOOT_JDK_FOUND=no
27418          else
27419            # We're done! :-)
27420            BOOT_JDK_FOUND=yes
27421
27422  # Only process if variable expands to non-empty
27423
27424  if test "x$BOOT_JDK" != x; then
27425    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27426
27427  # Input might be given as Windows format, start by converting to
27428  # unix format.
27429  path="$BOOT_JDK"
27430  new_path=`$CYGPATH -u "$path"`
27431
27432  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27433  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27434  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27435  # "foo.exe" is OK but "foo" is an error.
27436  #
27437  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27438  # It is also a way to make sure we got the proper file name for the real test later on.
27439  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27440  if test "x$test_shortpath" = x; then
27441    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27442$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27443    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27444  fi
27445
27446  # Call helper function which possibly converts this using DOS-style short mode.
27447  # If so, the updated path is stored in $new_path.
27448
27449  input_path="$new_path"
27450  # Check if we need to convert this using DOS-style short mode. If the path
27451  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27452  # take no chances and rewrite it.
27453  # Note: m4 eats our [], so we need to use [ and ] instead.
27454  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27455  if test "x$has_forbidden_chars" != x; then
27456    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27457    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27458    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27459    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27460      # Going to short mode and back again did indeed matter. Since short mode is
27461      # case insensitive, let's make it lowercase to improve readability.
27462      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27463      # Now convert it back to Unix-style (cygpath)
27464      input_path=`$CYGPATH -u "$shortmode_path"`
27465      new_path="$input_path"
27466    fi
27467  fi
27468
27469  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27470  if test "x$test_cygdrive_prefix" = x; then
27471    # As a simple fix, exclude /usr/bin since it's not a real path.
27472    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27473      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27474      # a path prefixed by /cygdrive for fixpath to work.
27475      new_path="$CYGWIN_ROOT_PATH$input_path"
27476    fi
27477  fi
27478
27479
27480  if test "x$path" != "x$new_path"; then
27481    BOOT_JDK="$new_path"
27482    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27483$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27484  fi
27485
27486    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27487
27488  path="$BOOT_JDK"
27489  has_colon=`$ECHO $path | $GREP ^.:`
27490  new_path="$path"
27491  if test "x$has_colon" = x; then
27492    # Not in mixed or Windows style, start by that.
27493    new_path=`cmd //c echo $path`
27494  fi
27495
27496
27497  input_path="$new_path"
27498  # Check if we need to convert this using DOS-style short mode. If the path
27499  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27500  # take no chances and rewrite it.
27501  # Note: m4 eats our [], so we need to use [ and ] instead.
27502  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27503  if test "x$has_forbidden_chars" != x; then
27504    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27505    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27506  fi
27507
27508
27509  windows_path="$new_path"
27510  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27511    unix_path=`$CYGPATH -u "$windows_path"`
27512    new_path="$unix_path"
27513  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27514    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27515    new_path="$unix_path"
27516  fi
27517
27518  if test "x$path" != "x$new_path"; then
27519    BOOT_JDK="$new_path"
27520    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27521$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27522  fi
27523
27524  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27525  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27526
27527    else
27528      # We're on a unix platform. Hooray! :)
27529      path="$BOOT_JDK"
27530      has_space=`$ECHO "$path" | $GREP " "`
27531      if test "x$has_space" != x; then
27532        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27533$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27534        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27535      fi
27536
27537      # Use eval to expand a potential ~
27538      eval path="$path"
27539      if test ! -f "$path" && test ! -d "$path"; then
27540        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27541      fi
27542
27543      if test -d "$path"; then
27544        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27545      else
27546        dir="`$DIRNAME "$path"`"
27547        base="`$BASENAME "$path"`"
27548        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27549      fi
27550    fi
27551  fi
27552
27553            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27554$as_echo_n "checking for Boot JDK... " >&6; }
27555            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27556$as_echo "$BOOT_JDK" >&6; }
27557            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27558$as_echo_n "checking Boot JDK version... " >&6; }
27559            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27560            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27561$as_echo "$BOOT_JDK_VERSION" >&6; }
27562          fi # end check jdk version
27563        fi # end check javac
27564      fi # end check java
27565    fi # end check boot jdk found
27566  fi
27567
27568    done
27569  fi
27570
27571  fi
27572
27573
27574    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27575    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27576      # Do we have a bin/java?
27577      if test ! -x "$BOOT_JDK/bin/java"; then
27578        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27579$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27580        BOOT_JDK_FOUND=no
27581      else
27582        # Do we have a bin/javac?
27583        if test ! -x "$BOOT_JDK/bin/javac"; then
27584          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27585$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27586          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27587$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27588          BOOT_JDK_FOUND=no
27589        else
27590          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27591          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27592
27593          # Extra M4 quote needed to protect [] in grep expression.
27594          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27595          if test "x$FOUND_CORRECT_VERSION" = x; then
27596            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27597$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27598            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27599$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27600            BOOT_JDK_FOUND=no
27601          else
27602            # We're done! :-)
27603            BOOT_JDK_FOUND=yes
27604
27605  # Only process if variable expands to non-empty
27606
27607  if test "x$BOOT_JDK" != x; then
27608    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27609
27610  # Input might be given as Windows format, start by converting to
27611  # unix format.
27612  path="$BOOT_JDK"
27613  new_path=`$CYGPATH -u "$path"`
27614
27615  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27616  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27617  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27618  # "foo.exe" is OK but "foo" is an error.
27619  #
27620  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27621  # It is also a way to make sure we got the proper file name for the real test later on.
27622  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27623  if test "x$test_shortpath" = x; then
27624    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27625$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27626    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27627  fi
27628
27629  # Call helper function which possibly converts this using DOS-style short mode.
27630  # If so, the updated path is stored in $new_path.
27631
27632  input_path="$new_path"
27633  # Check if we need to convert this using DOS-style short mode. If the path
27634  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27635  # take no chances and rewrite it.
27636  # Note: m4 eats our [], so we need to use [ and ] instead.
27637  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27638  if test "x$has_forbidden_chars" != x; then
27639    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27640    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27641    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27642    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27643      # Going to short mode and back again did indeed matter. Since short mode is
27644      # case insensitive, let's make it lowercase to improve readability.
27645      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27646      # Now convert it back to Unix-style (cygpath)
27647      input_path=`$CYGPATH -u "$shortmode_path"`
27648      new_path="$input_path"
27649    fi
27650  fi
27651
27652  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27653  if test "x$test_cygdrive_prefix" = x; then
27654    # As a simple fix, exclude /usr/bin since it's not a real path.
27655    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27656      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27657      # a path prefixed by /cygdrive for fixpath to work.
27658      new_path="$CYGWIN_ROOT_PATH$input_path"
27659    fi
27660  fi
27661
27662
27663  if test "x$path" != "x$new_path"; then
27664    BOOT_JDK="$new_path"
27665    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27666$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27667  fi
27668
27669    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27670
27671  path="$BOOT_JDK"
27672  has_colon=`$ECHO $path | $GREP ^.:`
27673  new_path="$path"
27674  if test "x$has_colon" = x; then
27675    # Not in mixed or Windows style, start by that.
27676    new_path=`cmd //c echo $path`
27677  fi
27678
27679
27680  input_path="$new_path"
27681  # Check if we need to convert this using DOS-style short mode. If the path
27682  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27683  # take no chances and rewrite it.
27684  # Note: m4 eats our [], so we need to use [ and ] instead.
27685  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27686  if test "x$has_forbidden_chars" != x; then
27687    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27688    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27689  fi
27690
27691
27692  windows_path="$new_path"
27693  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27694    unix_path=`$CYGPATH -u "$windows_path"`
27695    new_path="$unix_path"
27696  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27697    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27698    new_path="$unix_path"
27699  fi
27700
27701  if test "x$path" != "x$new_path"; then
27702    BOOT_JDK="$new_path"
27703    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27704$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27705  fi
27706
27707  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27708  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27709
27710    else
27711      # We're on a unix platform. Hooray! :)
27712      path="$BOOT_JDK"
27713      has_space=`$ECHO "$path" | $GREP " "`
27714      if test "x$has_space" != x; then
27715        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27716$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27717        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27718      fi
27719
27720      # Use eval to expand a potential ~
27721      eval path="$path"
27722      if test ! -f "$path" && test ! -d "$path"; then
27723        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27724      fi
27725
27726      if test -d "$path"; then
27727        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27728      else
27729        dir="`$DIRNAME "$path"`"
27730        base="`$BASENAME "$path"`"
27731        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27732      fi
27733    fi
27734  fi
27735
27736            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27737$as_echo_n "checking for Boot JDK... " >&6; }
27738            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27739$as_echo "$BOOT_JDK" >&6; }
27740            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27741$as_echo_n "checking Boot JDK version... " >&6; }
27742            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27743            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27744$as_echo "$BOOT_JDK_VERSION" >&6; }
27745          fi # end check jdk version
27746        fi # end check javac
27747      fi # end check java
27748    fi # end check boot jdk found
27749  fi
27750
27751
27752  if test "x$BOOT_JDK_FOUND" = xno; then
27753    # Now execute the test
27754
27755  if test "x$ProgramFiles" != x; then
27756    VIRTUAL_DIR="$ProgramFiles/Java"
27757
27758  windows_path="$VIRTUAL_DIR"
27759  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27760    unix_path=`$CYGPATH -u "$windows_path"`
27761    VIRTUAL_DIR="$unix_path"
27762  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27763    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27764    VIRTUAL_DIR="$unix_path"
27765  fi
27766
27767
27768  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27769  BOOT_JDK_SUFFIX=""
27770  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27771  if test "x$ALL_JDKS_FOUND" != x; then
27772    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27773
27774  if test "x$BOOT_JDK_FOUND" = xno; then
27775    # Now execute the test
27776
27777        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27778        if test -d "$BOOT_JDK"; then
27779          BOOT_JDK_FOUND=maybe
27780          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27781$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27782        fi
27783
27784
27785    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27786    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27787      # Do we have a bin/java?
27788      if test ! -x "$BOOT_JDK/bin/java"; then
27789        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27790$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27791        BOOT_JDK_FOUND=no
27792      else
27793        # Do we have a bin/javac?
27794        if test ! -x "$BOOT_JDK/bin/javac"; then
27795          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27796$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27797          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27798$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27799          BOOT_JDK_FOUND=no
27800        else
27801          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27802          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27803
27804          # Extra M4 quote needed to protect [] in grep expression.
27805          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27806          if test "x$FOUND_CORRECT_VERSION" = x; then
27807            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27808$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27809            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27810$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27811            BOOT_JDK_FOUND=no
27812          else
27813            # We're done! :-)
27814            BOOT_JDK_FOUND=yes
27815
27816  # Only process if variable expands to non-empty
27817
27818  if test "x$BOOT_JDK" != x; then
27819    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27820
27821  # Input might be given as Windows format, start by converting to
27822  # unix format.
27823  path="$BOOT_JDK"
27824  new_path=`$CYGPATH -u "$path"`
27825
27826  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27827  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27828  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27829  # "foo.exe" is OK but "foo" is an error.
27830  #
27831  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27832  # It is also a way to make sure we got the proper file name for the real test later on.
27833  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27834  if test "x$test_shortpath" = x; then
27835    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27836$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27837    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27838  fi
27839
27840  # Call helper function which possibly converts this using DOS-style short mode.
27841  # If so, the updated path is stored in $new_path.
27842
27843  input_path="$new_path"
27844  # Check if we need to convert this using DOS-style short mode. If the path
27845  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27846  # take no chances and rewrite it.
27847  # Note: m4 eats our [], so we need to use [ and ] instead.
27848  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27849  if test "x$has_forbidden_chars" != x; then
27850    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27851    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27852    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27853    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27854      # Going to short mode and back again did indeed matter. Since short mode is
27855      # case insensitive, let's make it lowercase to improve readability.
27856      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27857      # Now convert it back to Unix-style (cygpath)
27858      input_path=`$CYGPATH -u "$shortmode_path"`
27859      new_path="$input_path"
27860    fi
27861  fi
27862
27863  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27864  if test "x$test_cygdrive_prefix" = x; then
27865    # As a simple fix, exclude /usr/bin since it's not a real path.
27866    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27867      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27868      # a path prefixed by /cygdrive for fixpath to work.
27869      new_path="$CYGWIN_ROOT_PATH$input_path"
27870    fi
27871  fi
27872
27873
27874  if test "x$path" != "x$new_path"; then
27875    BOOT_JDK="$new_path"
27876    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27877$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27878  fi
27879
27880    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27881
27882  path="$BOOT_JDK"
27883  has_colon=`$ECHO $path | $GREP ^.:`
27884  new_path="$path"
27885  if test "x$has_colon" = x; then
27886    # Not in mixed or Windows style, start by that.
27887    new_path=`cmd //c echo $path`
27888  fi
27889
27890
27891  input_path="$new_path"
27892  # Check if we need to convert this using DOS-style short mode. If the path
27893  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27894  # take no chances and rewrite it.
27895  # Note: m4 eats our [], so we need to use [ and ] instead.
27896  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27897  if test "x$has_forbidden_chars" != x; then
27898    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27899    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27900  fi
27901
27902
27903  windows_path="$new_path"
27904  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27905    unix_path=`$CYGPATH -u "$windows_path"`
27906    new_path="$unix_path"
27907  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27908    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27909    new_path="$unix_path"
27910  fi
27911
27912  if test "x$path" != "x$new_path"; then
27913    BOOT_JDK="$new_path"
27914    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27915$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27916  fi
27917
27918  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27919  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27920
27921    else
27922      # We're on a unix platform. Hooray! :)
27923      path="$BOOT_JDK"
27924      has_space=`$ECHO "$path" | $GREP " "`
27925      if test "x$has_space" != x; then
27926        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27927$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27928        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27929      fi
27930
27931      # Use eval to expand a potential ~
27932      eval path="$path"
27933      if test ! -f "$path" && test ! -d "$path"; then
27934        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27935      fi
27936
27937      if test -d "$path"; then
27938        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27939      else
27940        dir="`$DIRNAME "$path"`"
27941        base="`$BASENAME "$path"`"
27942        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27943      fi
27944    fi
27945  fi
27946
27947            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27948$as_echo_n "checking for Boot JDK... " >&6; }
27949            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27950$as_echo "$BOOT_JDK" >&6; }
27951            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27952$as_echo_n "checking Boot JDK version... " >&6; }
27953            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27954            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27955$as_echo "$BOOT_JDK_VERSION" >&6; }
27956          fi # end check jdk version
27957        fi # end check javac
27958      fi # end check java
27959    fi # end check boot jdk found
27960  fi
27961
27962    done
27963  fi
27964
27965  fi
27966
27967
27968    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27969    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27970      # Do we have a bin/java?
27971      if test ! -x "$BOOT_JDK/bin/java"; then
27972        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27973$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27974        BOOT_JDK_FOUND=no
27975      else
27976        # Do we have a bin/javac?
27977        if test ! -x "$BOOT_JDK/bin/javac"; then
27978          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27979$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27980          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27981$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27982          BOOT_JDK_FOUND=no
27983        else
27984          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27985          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27986
27987          # Extra M4 quote needed to protect [] in grep expression.
27988          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27989          if test "x$FOUND_CORRECT_VERSION" = x; then
27990            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27991$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27992            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27993$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27994            BOOT_JDK_FOUND=no
27995          else
27996            # We're done! :-)
27997            BOOT_JDK_FOUND=yes
27998
27999  # Only process if variable expands to non-empty
28000
28001  if test "x$BOOT_JDK" != x; then
28002    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28003
28004  # Input might be given as Windows format, start by converting to
28005  # unix format.
28006  path="$BOOT_JDK"
28007  new_path=`$CYGPATH -u "$path"`
28008
28009  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28010  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28011  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28012  # "foo.exe" is OK but "foo" is an error.
28013  #
28014  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28015  # It is also a way to make sure we got the proper file name for the real test later on.
28016  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28017  if test "x$test_shortpath" = x; then
28018    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28019$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28020    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28021  fi
28022
28023  # Call helper function which possibly converts this using DOS-style short mode.
28024  # If so, the updated path is stored in $new_path.
28025
28026  input_path="$new_path"
28027  # Check if we need to convert this using DOS-style short mode. If the path
28028  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28029  # take no chances and rewrite it.
28030  # Note: m4 eats our [], so we need to use [ and ] instead.
28031  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28032  if test "x$has_forbidden_chars" != x; then
28033    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28034    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28035    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28036    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28037      # Going to short mode and back again did indeed matter. Since short mode is
28038      # case insensitive, let's make it lowercase to improve readability.
28039      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28040      # Now convert it back to Unix-style (cygpath)
28041      input_path=`$CYGPATH -u "$shortmode_path"`
28042      new_path="$input_path"
28043    fi
28044  fi
28045
28046  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28047  if test "x$test_cygdrive_prefix" = x; then
28048    # As a simple fix, exclude /usr/bin since it's not a real path.
28049    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28050      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28051      # a path prefixed by /cygdrive for fixpath to work.
28052      new_path="$CYGWIN_ROOT_PATH$input_path"
28053    fi
28054  fi
28055
28056
28057  if test "x$path" != "x$new_path"; then
28058    BOOT_JDK="$new_path"
28059    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28060$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28061  fi
28062
28063    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28064
28065  path="$BOOT_JDK"
28066  has_colon=`$ECHO $path | $GREP ^.:`
28067  new_path="$path"
28068  if test "x$has_colon" = x; then
28069    # Not in mixed or Windows style, start by that.
28070    new_path=`cmd //c echo $path`
28071  fi
28072
28073
28074  input_path="$new_path"
28075  # Check if we need to convert this using DOS-style short mode. If the path
28076  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28077  # take no chances and rewrite it.
28078  # Note: m4 eats our [], so we need to use [ and ] instead.
28079  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28080  if test "x$has_forbidden_chars" != x; then
28081    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28082    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28083  fi
28084
28085
28086  windows_path="$new_path"
28087  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28088    unix_path=`$CYGPATH -u "$windows_path"`
28089    new_path="$unix_path"
28090  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28091    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28092    new_path="$unix_path"
28093  fi
28094
28095  if test "x$path" != "x$new_path"; then
28096    BOOT_JDK="$new_path"
28097    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28098$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28099  fi
28100
28101  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28102  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28103
28104    else
28105      # We're on a unix platform. Hooray! :)
28106      path="$BOOT_JDK"
28107      has_space=`$ECHO "$path" | $GREP " "`
28108      if test "x$has_space" != x; then
28109        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28110$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28111        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28112      fi
28113
28114      # Use eval to expand a potential ~
28115      eval path="$path"
28116      if test ! -f "$path" && test ! -d "$path"; then
28117        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28118      fi
28119
28120      if test -d "$path"; then
28121        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28122      else
28123        dir="`$DIRNAME "$path"`"
28124        base="`$BASENAME "$path"`"
28125        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28126      fi
28127    fi
28128  fi
28129
28130            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28131$as_echo_n "checking for Boot JDK... " >&6; }
28132            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28133$as_echo "$BOOT_JDK" >&6; }
28134            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28135$as_echo_n "checking Boot JDK version... " >&6; }
28136            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28137            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28138$as_echo "$BOOT_JDK_VERSION" >&6; }
28139          fi # end check jdk version
28140        fi # end check javac
28141      fi # end check java
28142    fi # end check boot jdk found
28143  fi
28144
28145
28146  if test "x$BOOT_JDK_FOUND" = xno; then
28147    # Now execute the test
28148
28149  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
28150  BOOT_JDK_SUFFIX=""
28151  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28152  if test "x$ALL_JDKS_FOUND" != x; then
28153    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28154
28155  if test "x$BOOT_JDK_FOUND" = xno; then
28156    # Now execute the test
28157
28158        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28159        if test -d "$BOOT_JDK"; then
28160          BOOT_JDK_FOUND=maybe
28161          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28162$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28163        fi
28164
28165
28166    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28167    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28168      # Do we have a bin/java?
28169      if test ! -x "$BOOT_JDK/bin/java"; then
28170        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28171$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28172        BOOT_JDK_FOUND=no
28173      else
28174        # Do we have a bin/javac?
28175        if test ! -x "$BOOT_JDK/bin/javac"; then
28176          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28177$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28178          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28179$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28180          BOOT_JDK_FOUND=no
28181        else
28182          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28183          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28184
28185          # Extra M4 quote needed to protect [] in grep expression.
28186          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28187          if test "x$FOUND_CORRECT_VERSION" = x; then
28188            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28189$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28190            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28191$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28192            BOOT_JDK_FOUND=no
28193          else
28194            # We're done! :-)
28195            BOOT_JDK_FOUND=yes
28196
28197  # Only process if variable expands to non-empty
28198
28199  if test "x$BOOT_JDK" != x; then
28200    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28201
28202  # Input might be given as Windows format, start by converting to
28203  # unix format.
28204  path="$BOOT_JDK"
28205  new_path=`$CYGPATH -u "$path"`
28206
28207  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28208  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28209  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28210  # "foo.exe" is OK but "foo" is an error.
28211  #
28212  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28213  # It is also a way to make sure we got the proper file name for the real test later on.
28214  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28215  if test "x$test_shortpath" = x; then
28216    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28217$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28218    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28219  fi
28220
28221  # Call helper function which possibly converts this using DOS-style short mode.
28222  # If so, the updated path is stored in $new_path.
28223
28224  input_path="$new_path"
28225  # Check if we need to convert this using DOS-style short mode. If the path
28226  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28227  # take no chances and rewrite it.
28228  # Note: m4 eats our [], so we need to use [ and ] instead.
28229  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28230  if test "x$has_forbidden_chars" != x; then
28231    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28232    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28233    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28234    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28235      # Going to short mode and back again did indeed matter. Since short mode is
28236      # case insensitive, let's make it lowercase to improve readability.
28237      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28238      # Now convert it back to Unix-style (cygpath)
28239      input_path=`$CYGPATH -u "$shortmode_path"`
28240      new_path="$input_path"
28241    fi
28242  fi
28243
28244  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28245  if test "x$test_cygdrive_prefix" = x; then
28246    # As a simple fix, exclude /usr/bin since it's not a real path.
28247    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28248      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28249      # a path prefixed by /cygdrive for fixpath to work.
28250      new_path="$CYGWIN_ROOT_PATH$input_path"
28251    fi
28252  fi
28253
28254
28255  if test "x$path" != "x$new_path"; then
28256    BOOT_JDK="$new_path"
28257    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28258$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28259  fi
28260
28261    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28262
28263  path="$BOOT_JDK"
28264  has_colon=`$ECHO $path | $GREP ^.:`
28265  new_path="$path"
28266  if test "x$has_colon" = x; then
28267    # Not in mixed or Windows style, start by that.
28268    new_path=`cmd //c echo $path`
28269  fi
28270
28271
28272  input_path="$new_path"
28273  # Check if we need to convert this using DOS-style short mode. If the path
28274  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28275  # take no chances and rewrite it.
28276  # Note: m4 eats our [], so we need to use [ and ] instead.
28277  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28278  if test "x$has_forbidden_chars" != x; then
28279    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28280    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28281  fi
28282
28283
28284  windows_path="$new_path"
28285  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28286    unix_path=`$CYGPATH -u "$windows_path"`
28287    new_path="$unix_path"
28288  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28289    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28290    new_path="$unix_path"
28291  fi
28292
28293  if test "x$path" != "x$new_path"; then
28294    BOOT_JDK="$new_path"
28295    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28296$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28297  fi
28298
28299  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28300  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28301
28302    else
28303      # We're on a unix platform. Hooray! :)
28304      path="$BOOT_JDK"
28305      has_space=`$ECHO "$path" | $GREP " "`
28306      if test "x$has_space" != x; then
28307        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28308$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28309        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28310      fi
28311
28312      # Use eval to expand a potential ~
28313      eval path="$path"
28314      if test ! -f "$path" && test ! -d "$path"; then
28315        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28316      fi
28317
28318      if test -d "$path"; then
28319        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28320      else
28321        dir="`$DIRNAME "$path"`"
28322        base="`$BASENAME "$path"`"
28323        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28324      fi
28325    fi
28326  fi
28327
28328            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28329$as_echo_n "checking for Boot JDK... " >&6; }
28330            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28331$as_echo "$BOOT_JDK" >&6; }
28332            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28333$as_echo_n "checking Boot JDK version... " >&6; }
28334            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28335            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28336$as_echo "$BOOT_JDK_VERSION" >&6; }
28337          fi # end check jdk version
28338        fi # end check javac
28339      fi # end check java
28340    fi # end check boot jdk found
28341  fi
28342
28343    done
28344  fi
28345
28346
28347    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28348    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28349      # Do we have a bin/java?
28350      if test ! -x "$BOOT_JDK/bin/java"; then
28351        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28352$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28353        BOOT_JDK_FOUND=no
28354      else
28355        # Do we have a bin/javac?
28356        if test ! -x "$BOOT_JDK/bin/javac"; then
28357          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28358$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28359          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28360$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28361          BOOT_JDK_FOUND=no
28362        else
28363          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28364          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28365
28366          # Extra M4 quote needed to protect [] in grep expression.
28367          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28368          if test "x$FOUND_CORRECT_VERSION" = x; then
28369            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28370$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28371            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28372$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28373            BOOT_JDK_FOUND=no
28374          else
28375            # We're done! :-)
28376            BOOT_JDK_FOUND=yes
28377
28378  # Only process if variable expands to non-empty
28379
28380  if test "x$BOOT_JDK" != x; then
28381    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28382
28383  # Input might be given as Windows format, start by converting to
28384  # unix format.
28385  path="$BOOT_JDK"
28386  new_path=`$CYGPATH -u "$path"`
28387
28388  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28389  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28390  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28391  # "foo.exe" is OK but "foo" is an error.
28392  #
28393  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28394  # It is also a way to make sure we got the proper file name for the real test later on.
28395  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28396  if test "x$test_shortpath" = x; then
28397    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28398$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28399    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28400  fi
28401
28402  # Call helper function which possibly converts this using DOS-style short mode.
28403  # If so, the updated path is stored in $new_path.
28404
28405  input_path="$new_path"
28406  # Check if we need to convert this using DOS-style short mode. If the path
28407  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28408  # take no chances and rewrite it.
28409  # Note: m4 eats our [], so we need to use [ and ] instead.
28410  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28411  if test "x$has_forbidden_chars" != x; then
28412    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28413    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28414    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28415    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28416      # Going to short mode and back again did indeed matter. Since short mode is
28417      # case insensitive, let's make it lowercase to improve readability.
28418      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28419      # Now convert it back to Unix-style (cygpath)
28420      input_path=`$CYGPATH -u "$shortmode_path"`
28421      new_path="$input_path"
28422    fi
28423  fi
28424
28425  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28426  if test "x$test_cygdrive_prefix" = x; then
28427    # As a simple fix, exclude /usr/bin since it's not a real path.
28428    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28429      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28430      # a path prefixed by /cygdrive for fixpath to work.
28431      new_path="$CYGWIN_ROOT_PATH$input_path"
28432    fi
28433  fi
28434
28435
28436  if test "x$path" != "x$new_path"; then
28437    BOOT_JDK="$new_path"
28438    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28439$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28440  fi
28441
28442    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28443
28444  path="$BOOT_JDK"
28445  has_colon=`$ECHO $path | $GREP ^.:`
28446  new_path="$path"
28447  if test "x$has_colon" = x; then
28448    # Not in mixed or Windows style, start by that.
28449    new_path=`cmd //c echo $path`
28450  fi
28451
28452
28453  input_path="$new_path"
28454  # Check if we need to convert this using DOS-style short mode. If the path
28455  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28456  # take no chances and rewrite it.
28457  # Note: m4 eats our [], so we need to use [ and ] instead.
28458  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28459  if test "x$has_forbidden_chars" != x; then
28460    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28461    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28462  fi
28463
28464
28465  windows_path="$new_path"
28466  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28467    unix_path=`$CYGPATH -u "$windows_path"`
28468    new_path="$unix_path"
28469  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28470    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28471    new_path="$unix_path"
28472  fi
28473
28474  if test "x$path" != "x$new_path"; then
28475    BOOT_JDK="$new_path"
28476    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28477$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28478  fi
28479
28480  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28481  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28482
28483    else
28484      # We're on a unix platform. Hooray! :)
28485      path="$BOOT_JDK"
28486      has_space=`$ECHO "$path" | $GREP " "`
28487      if test "x$has_space" != x; then
28488        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28489$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28490        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28491      fi
28492
28493      # Use eval to expand a potential ~
28494      eval path="$path"
28495      if test ! -f "$path" && test ! -d "$path"; then
28496        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28497      fi
28498
28499      if test -d "$path"; then
28500        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28501      else
28502        dir="`$DIRNAME "$path"`"
28503        base="`$BASENAME "$path"`"
28504        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28505      fi
28506    fi
28507  fi
28508
28509            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28510$as_echo_n "checking for Boot JDK... " >&6; }
28511            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28512$as_echo "$BOOT_JDK" >&6; }
28513            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28514$as_echo_n "checking Boot JDK version... " >&6; }
28515            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28516            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28517$as_echo "$BOOT_JDK_VERSION" >&6; }
28518          fi # end check jdk version
28519        fi # end check javac
28520      fi # end check java
28521    fi # end check boot jdk found
28522  fi
28523
28524  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
28525
28526  if test "x$BOOT_JDK_FOUND" = xno; then
28527    # Now execute the test
28528
28529  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
28530  BOOT_JDK_SUFFIX="/Contents/Home"
28531  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28532  if test "x$ALL_JDKS_FOUND" != x; then
28533    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28534
28535  if test "x$BOOT_JDK_FOUND" = xno; then
28536    # Now execute the test
28537
28538        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28539        if test -d "$BOOT_JDK"; then
28540          BOOT_JDK_FOUND=maybe
28541          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28542$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28543        fi
28544
28545
28546    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28547    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28548      # Do we have a bin/java?
28549      if test ! -x "$BOOT_JDK/bin/java"; then
28550        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28551$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28552        BOOT_JDK_FOUND=no
28553      else
28554        # Do we have a bin/javac?
28555        if test ! -x "$BOOT_JDK/bin/javac"; then
28556          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28557$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28558          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28559$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28560          BOOT_JDK_FOUND=no
28561        else
28562          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28563          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28564
28565          # Extra M4 quote needed to protect [] in grep expression.
28566          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28567          if test "x$FOUND_CORRECT_VERSION" = x; then
28568            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28569$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28570            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28571$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28572            BOOT_JDK_FOUND=no
28573          else
28574            # We're done! :-)
28575            BOOT_JDK_FOUND=yes
28576
28577  # Only process if variable expands to non-empty
28578
28579  if test "x$BOOT_JDK" != x; then
28580    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28581
28582  # Input might be given as Windows format, start by converting to
28583  # unix format.
28584  path="$BOOT_JDK"
28585  new_path=`$CYGPATH -u "$path"`
28586
28587  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28588  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28589  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28590  # "foo.exe" is OK but "foo" is an error.
28591  #
28592  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28593  # It is also a way to make sure we got the proper file name for the real test later on.
28594  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28595  if test "x$test_shortpath" = x; then
28596    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28597$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28598    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28599  fi
28600
28601  # Call helper function which possibly converts this using DOS-style short mode.
28602  # If so, the updated path is stored in $new_path.
28603
28604  input_path="$new_path"
28605  # Check if we need to convert this using DOS-style short mode. If the path
28606  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28607  # take no chances and rewrite it.
28608  # Note: m4 eats our [], so we need to use [ and ] instead.
28609  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28610  if test "x$has_forbidden_chars" != x; then
28611    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28612    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28613    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28614    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28615      # Going to short mode and back again did indeed matter. Since short mode is
28616      # case insensitive, let's make it lowercase to improve readability.
28617      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28618      # Now convert it back to Unix-style (cygpath)
28619      input_path=`$CYGPATH -u "$shortmode_path"`
28620      new_path="$input_path"
28621    fi
28622  fi
28623
28624  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28625  if test "x$test_cygdrive_prefix" = x; then
28626    # As a simple fix, exclude /usr/bin since it's not a real path.
28627    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28628      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28629      # a path prefixed by /cygdrive for fixpath to work.
28630      new_path="$CYGWIN_ROOT_PATH$input_path"
28631    fi
28632  fi
28633
28634
28635  if test "x$path" != "x$new_path"; then
28636    BOOT_JDK="$new_path"
28637    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28638$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28639  fi
28640
28641    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28642
28643  path="$BOOT_JDK"
28644  has_colon=`$ECHO $path | $GREP ^.:`
28645  new_path="$path"
28646  if test "x$has_colon" = x; then
28647    # Not in mixed or Windows style, start by that.
28648    new_path=`cmd //c echo $path`
28649  fi
28650
28651
28652  input_path="$new_path"
28653  # Check if we need to convert this using DOS-style short mode. If the path
28654  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28655  # take no chances and rewrite it.
28656  # Note: m4 eats our [], so we need to use [ and ] instead.
28657  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28658  if test "x$has_forbidden_chars" != x; then
28659    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28660    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28661  fi
28662
28663
28664  windows_path="$new_path"
28665  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28666    unix_path=`$CYGPATH -u "$windows_path"`
28667    new_path="$unix_path"
28668  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28669    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28670    new_path="$unix_path"
28671  fi
28672
28673  if test "x$path" != "x$new_path"; then
28674    BOOT_JDK="$new_path"
28675    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28676$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28677  fi
28678
28679  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28680  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28681
28682    else
28683      # We're on a unix platform. Hooray! :)
28684      path="$BOOT_JDK"
28685      has_space=`$ECHO "$path" | $GREP " "`
28686      if test "x$has_space" != x; then
28687        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28688$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28689        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28690      fi
28691
28692      # Use eval to expand a potential ~
28693      eval path="$path"
28694      if test ! -f "$path" && test ! -d "$path"; then
28695        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28696      fi
28697
28698      if test -d "$path"; then
28699        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28700      else
28701        dir="`$DIRNAME "$path"`"
28702        base="`$BASENAME "$path"`"
28703        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28704      fi
28705    fi
28706  fi
28707
28708            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28709$as_echo_n "checking for Boot JDK... " >&6; }
28710            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28711$as_echo "$BOOT_JDK" >&6; }
28712            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28713$as_echo_n "checking Boot JDK version... " >&6; }
28714            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28715            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28716$as_echo "$BOOT_JDK_VERSION" >&6; }
28717          fi # end check jdk version
28718        fi # end check javac
28719      fi # end check java
28720    fi # end check boot jdk found
28721  fi
28722
28723    done
28724  fi
28725
28726
28727    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28728    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28729      # Do we have a bin/java?
28730      if test ! -x "$BOOT_JDK/bin/java"; then
28731        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28732$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28733        BOOT_JDK_FOUND=no
28734      else
28735        # Do we have a bin/javac?
28736        if test ! -x "$BOOT_JDK/bin/javac"; then
28737          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28738$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28739          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28740$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28741          BOOT_JDK_FOUND=no
28742        else
28743          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28744          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28745
28746          # Extra M4 quote needed to protect [] in grep expression.
28747          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28748          if test "x$FOUND_CORRECT_VERSION" = x; then
28749            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28750$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28751            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28752$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28753            BOOT_JDK_FOUND=no
28754          else
28755            # We're done! :-)
28756            BOOT_JDK_FOUND=yes
28757
28758  # Only process if variable expands to non-empty
28759
28760  if test "x$BOOT_JDK" != x; then
28761    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28762
28763  # Input might be given as Windows format, start by converting to
28764  # unix format.
28765  path="$BOOT_JDK"
28766  new_path=`$CYGPATH -u "$path"`
28767
28768  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28769  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28770  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28771  # "foo.exe" is OK but "foo" is an error.
28772  #
28773  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28774  # It is also a way to make sure we got the proper file name for the real test later on.
28775  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28776  if test "x$test_shortpath" = x; then
28777    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28778$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28779    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28780  fi
28781
28782  # Call helper function which possibly converts this using DOS-style short mode.
28783  # If so, the updated path is stored in $new_path.
28784
28785  input_path="$new_path"
28786  # Check if we need to convert this using DOS-style short mode. If the path
28787  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28788  # take no chances and rewrite it.
28789  # Note: m4 eats our [], so we need to use [ and ] instead.
28790  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28791  if test "x$has_forbidden_chars" != x; then
28792    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28793    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28794    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28795    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28796      # Going to short mode and back again did indeed matter. Since short mode is
28797      # case insensitive, let's make it lowercase to improve readability.
28798      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28799      # Now convert it back to Unix-style (cygpath)
28800      input_path=`$CYGPATH -u "$shortmode_path"`
28801      new_path="$input_path"
28802    fi
28803  fi
28804
28805  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28806  if test "x$test_cygdrive_prefix" = x; then
28807    # As a simple fix, exclude /usr/bin since it's not a real path.
28808    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28809      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28810      # a path prefixed by /cygdrive for fixpath to work.
28811      new_path="$CYGWIN_ROOT_PATH$input_path"
28812    fi
28813  fi
28814
28815
28816  if test "x$path" != "x$new_path"; then
28817    BOOT_JDK="$new_path"
28818    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28819$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28820  fi
28821
28822    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28823
28824  path="$BOOT_JDK"
28825  has_colon=`$ECHO $path | $GREP ^.:`
28826  new_path="$path"
28827  if test "x$has_colon" = x; then
28828    # Not in mixed or Windows style, start by that.
28829    new_path=`cmd //c echo $path`
28830  fi
28831
28832
28833  input_path="$new_path"
28834  # Check if we need to convert this using DOS-style short mode. If the path
28835  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28836  # take no chances and rewrite it.
28837  # Note: m4 eats our [], so we need to use [ and ] instead.
28838  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28839  if test "x$has_forbidden_chars" != x; then
28840    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28841    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28842  fi
28843
28844
28845  windows_path="$new_path"
28846  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28847    unix_path=`$CYGPATH -u "$windows_path"`
28848    new_path="$unix_path"
28849  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28850    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28851    new_path="$unix_path"
28852  fi
28853
28854  if test "x$path" != "x$new_path"; then
28855    BOOT_JDK="$new_path"
28856    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28857$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28858  fi
28859
28860  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28861  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28862
28863    else
28864      # We're on a unix platform. Hooray! :)
28865      path="$BOOT_JDK"
28866      has_space=`$ECHO "$path" | $GREP " "`
28867      if test "x$has_space" != x; then
28868        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28869$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28870        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28871      fi
28872
28873      # Use eval to expand a potential ~
28874      eval path="$path"
28875      if test ! -f "$path" && test ! -d "$path"; then
28876        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28877      fi
28878
28879      if test -d "$path"; then
28880        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28881      else
28882        dir="`$DIRNAME "$path"`"
28883        base="`$BASENAME "$path"`"
28884        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28885      fi
28886    fi
28887  fi
28888
28889            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28890$as_echo_n "checking for Boot JDK... " >&6; }
28891            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28892$as_echo "$BOOT_JDK" >&6; }
28893            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28894$as_echo_n "checking Boot JDK version... " >&6; }
28895            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28896            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28897$as_echo "$BOOT_JDK_VERSION" >&6; }
28898          fi # end check jdk version
28899        fi # end check javac
28900      fi # end check java
28901    fi # end check boot jdk found
28902  fi
28903
28904
28905  if test "x$BOOT_JDK_FOUND" = xno; then
28906    # Now execute the test
28907
28908  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
28909  BOOT_JDK_SUFFIX="/Contents/Home"
28910  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28911  if test "x$ALL_JDKS_FOUND" != x; then
28912    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28913
28914  if test "x$BOOT_JDK_FOUND" = xno; then
28915    # Now execute the test
28916
28917        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28918        if test -d "$BOOT_JDK"; then
28919          BOOT_JDK_FOUND=maybe
28920          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28921$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28922        fi
28923
28924
28925    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28926    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28927      # Do we have a bin/java?
28928      if test ! -x "$BOOT_JDK/bin/java"; then
28929        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28930$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28931        BOOT_JDK_FOUND=no
28932      else
28933        # Do we have a bin/javac?
28934        if test ! -x "$BOOT_JDK/bin/javac"; then
28935          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28936$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28937          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28938$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28939          BOOT_JDK_FOUND=no
28940        else
28941          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28942          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28943
28944          # Extra M4 quote needed to protect [] in grep expression.
28945          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28946          if test "x$FOUND_CORRECT_VERSION" = x; then
28947            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28948$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28949            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28950$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28951            BOOT_JDK_FOUND=no
28952          else
28953            # We're done! :-)
28954            BOOT_JDK_FOUND=yes
28955
28956  # Only process if variable expands to non-empty
28957
28958  if test "x$BOOT_JDK" != x; then
28959    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28960
28961  # Input might be given as Windows format, start by converting to
28962  # unix format.
28963  path="$BOOT_JDK"
28964  new_path=`$CYGPATH -u "$path"`
28965
28966  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28967  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28968  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28969  # "foo.exe" is OK but "foo" is an error.
28970  #
28971  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28972  # It is also a way to make sure we got the proper file name for the real test later on.
28973  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28974  if test "x$test_shortpath" = x; then
28975    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28976$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28977    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28978  fi
28979
28980  # Call helper function which possibly converts this using DOS-style short mode.
28981  # If so, the updated path is stored in $new_path.
28982
28983  input_path="$new_path"
28984  # Check if we need to convert this using DOS-style short mode. If the path
28985  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28986  # take no chances and rewrite it.
28987  # Note: m4 eats our [], so we need to use [ and ] instead.
28988  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28989  if test "x$has_forbidden_chars" != x; then
28990    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28991    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28992    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28993    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28994      # Going to short mode and back again did indeed matter. Since short mode is
28995      # case insensitive, let's make it lowercase to improve readability.
28996      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28997      # Now convert it back to Unix-style (cygpath)
28998      input_path=`$CYGPATH -u "$shortmode_path"`
28999      new_path="$input_path"
29000    fi
29001  fi
29002
29003  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29004  if test "x$test_cygdrive_prefix" = x; then
29005    # As a simple fix, exclude /usr/bin since it's not a real path.
29006    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29007      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29008      # a path prefixed by /cygdrive for fixpath to work.
29009      new_path="$CYGWIN_ROOT_PATH$input_path"
29010    fi
29011  fi
29012
29013
29014  if test "x$path" != "x$new_path"; then
29015    BOOT_JDK="$new_path"
29016    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29017$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29018  fi
29019
29020    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29021
29022  path="$BOOT_JDK"
29023  has_colon=`$ECHO $path | $GREP ^.:`
29024  new_path="$path"
29025  if test "x$has_colon" = x; then
29026    # Not in mixed or Windows style, start by that.
29027    new_path=`cmd //c echo $path`
29028  fi
29029
29030
29031  input_path="$new_path"
29032  # Check if we need to convert this using DOS-style short mode. If the path
29033  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29034  # take no chances and rewrite it.
29035  # Note: m4 eats our [], so we need to use [ and ] instead.
29036  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29037  if test "x$has_forbidden_chars" != x; then
29038    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29039    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29040  fi
29041
29042
29043  windows_path="$new_path"
29044  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29045    unix_path=`$CYGPATH -u "$windows_path"`
29046    new_path="$unix_path"
29047  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29048    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29049    new_path="$unix_path"
29050  fi
29051
29052  if test "x$path" != "x$new_path"; then
29053    BOOT_JDK="$new_path"
29054    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29055$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29056  fi
29057
29058  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29059  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29060
29061    else
29062      # We're on a unix platform. Hooray! :)
29063      path="$BOOT_JDK"
29064      has_space=`$ECHO "$path" | $GREP " "`
29065      if test "x$has_space" != x; then
29066        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29067$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29068        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29069      fi
29070
29071      # Use eval to expand a potential ~
29072      eval path="$path"
29073      if test ! -f "$path" && test ! -d "$path"; then
29074        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29075      fi
29076
29077      if test -d "$path"; then
29078        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29079      else
29080        dir="`$DIRNAME "$path"`"
29081        base="`$BASENAME "$path"`"
29082        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29083      fi
29084    fi
29085  fi
29086
29087            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29088$as_echo_n "checking for Boot JDK... " >&6; }
29089            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29090$as_echo "$BOOT_JDK" >&6; }
29091            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29092$as_echo_n "checking Boot JDK version... " >&6; }
29093            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29094            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29095$as_echo "$BOOT_JDK_VERSION" >&6; }
29096          fi # end check jdk version
29097        fi # end check javac
29098      fi # end check java
29099    fi # end check boot jdk found
29100  fi
29101
29102    done
29103  fi
29104
29105
29106    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29107    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29108      # Do we have a bin/java?
29109      if test ! -x "$BOOT_JDK/bin/java"; then
29110        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29111$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29112        BOOT_JDK_FOUND=no
29113      else
29114        # Do we have a bin/javac?
29115        if test ! -x "$BOOT_JDK/bin/javac"; then
29116          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29117$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29118          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29119$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29120          BOOT_JDK_FOUND=no
29121        else
29122          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29123          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29124
29125          # Extra M4 quote needed to protect [] in grep expression.
29126          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29127          if test "x$FOUND_CORRECT_VERSION" = x; then
29128            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29129$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29130            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29131$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29132            BOOT_JDK_FOUND=no
29133          else
29134            # We're done! :-)
29135            BOOT_JDK_FOUND=yes
29136
29137  # Only process if variable expands to non-empty
29138
29139  if test "x$BOOT_JDK" != x; then
29140    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29141
29142  # Input might be given as Windows format, start by converting to
29143  # unix format.
29144  path="$BOOT_JDK"
29145  new_path=`$CYGPATH -u "$path"`
29146
29147  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29148  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29149  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29150  # "foo.exe" is OK but "foo" is an error.
29151  #
29152  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29153  # It is also a way to make sure we got the proper file name for the real test later on.
29154  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29155  if test "x$test_shortpath" = x; then
29156    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29157$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29158    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29159  fi
29160
29161  # Call helper function which possibly converts this using DOS-style short mode.
29162  # If so, the updated path is stored in $new_path.
29163
29164  input_path="$new_path"
29165  # Check if we need to convert this using DOS-style short mode. If the path
29166  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29167  # take no chances and rewrite it.
29168  # Note: m4 eats our [], so we need to use [ and ] instead.
29169  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29170  if test "x$has_forbidden_chars" != x; then
29171    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29172    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29173    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29174    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29175      # Going to short mode and back again did indeed matter. Since short mode is
29176      # case insensitive, let's make it lowercase to improve readability.
29177      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29178      # Now convert it back to Unix-style (cygpath)
29179      input_path=`$CYGPATH -u "$shortmode_path"`
29180      new_path="$input_path"
29181    fi
29182  fi
29183
29184  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29185  if test "x$test_cygdrive_prefix" = x; then
29186    # As a simple fix, exclude /usr/bin since it's not a real path.
29187    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29188      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29189      # a path prefixed by /cygdrive for fixpath to work.
29190      new_path="$CYGWIN_ROOT_PATH$input_path"
29191    fi
29192  fi
29193
29194
29195  if test "x$path" != "x$new_path"; then
29196    BOOT_JDK="$new_path"
29197    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29198$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29199  fi
29200
29201    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29202
29203  path="$BOOT_JDK"
29204  has_colon=`$ECHO $path | $GREP ^.:`
29205  new_path="$path"
29206  if test "x$has_colon" = x; then
29207    # Not in mixed or Windows style, start by that.
29208    new_path=`cmd //c echo $path`
29209  fi
29210
29211
29212  input_path="$new_path"
29213  # Check if we need to convert this using DOS-style short mode. If the path
29214  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29215  # take no chances and rewrite it.
29216  # Note: m4 eats our [], so we need to use [ and ] instead.
29217  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29218  if test "x$has_forbidden_chars" != x; then
29219    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29220    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29221  fi
29222
29223
29224  windows_path="$new_path"
29225  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29226    unix_path=`$CYGPATH -u "$windows_path"`
29227    new_path="$unix_path"
29228  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29229    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29230    new_path="$unix_path"
29231  fi
29232
29233  if test "x$path" != "x$new_path"; then
29234    BOOT_JDK="$new_path"
29235    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29236$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29237  fi
29238
29239  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29240  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29241
29242    else
29243      # We're on a unix platform. Hooray! :)
29244      path="$BOOT_JDK"
29245      has_space=`$ECHO "$path" | $GREP " "`
29246      if test "x$has_space" != x; then
29247        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29248$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29249        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29250      fi
29251
29252      # Use eval to expand a potential ~
29253      eval path="$path"
29254      if test ! -f "$path" && test ! -d "$path"; then
29255        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29256      fi
29257
29258      if test -d "$path"; then
29259        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29260      else
29261        dir="`$DIRNAME "$path"`"
29262        base="`$BASENAME "$path"`"
29263        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29264      fi
29265    fi
29266  fi
29267
29268            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29269$as_echo_n "checking for Boot JDK... " >&6; }
29270            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29271$as_echo "$BOOT_JDK" >&6; }
29272            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29273$as_echo_n "checking Boot JDK version... " >&6; }
29274            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29275            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29276$as_echo "$BOOT_JDK_VERSION" >&6; }
29277          fi # end check jdk version
29278        fi # end check javac
29279      fi # end check java
29280    fi # end check boot jdk found
29281  fi
29282
29283  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
29284
29285  if test "x$BOOT_JDK_FOUND" = xno; then
29286    # Now execute the test
29287
29288  BOOT_JDK_PREFIX="/usr/lib/jvm"
29289  BOOT_JDK_SUFFIX=""
29290  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29291  if test "x$ALL_JDKS_FOUND" != x; then
29292    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29293
29294  if test "x$BOOT_JDK_FOUND" = xno; then
29295    # Now execute the test
29296
29297        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29298        if test -d "$BOOT_JDK"; then
29299          BOOT_JDK_FOUND=maybe
29300          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29301$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29302        fi
29303
29304
29305    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29306    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29307      # Do we have a bin/java?
29308      if test ! -x "$BOOT_JDK/bin/java"; then
29309        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29310$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29311        BOOT_JDK_FOUND=no
29312      else
29313        # Do we have a bin/javac?
29314        if test ! -x "$BOOT_JDK/bin/javac"; then
29315          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29316$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29317          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29318$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29319          BOOT_JDK_FOUND=no
29320        else
29321          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29322          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29323
29324          # Extra M4 quote needed to protect [] in grep expression.
29325          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29326          if test "x$FOUND_CORRECT_VERSION" = x; then
29327            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29328$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29329            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29330$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29331            BOOT_JDK_FOUND=no
29332          else
29333            # We're done! :-)
29334            BOOT_JDK_FOUND=yes
29335
29336  # Only process if variable expands to non-empty
29337
29338  if test "x$BOOT_JDK" != x; then
29339    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29340
29341  # Input might be given as Windows format, start by converting to
29342  # unix format.
29343  path="$BOOT_JDK"
29344  new_path=`$CYGPATH -u "$path"`
29345
29346  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29347  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29348  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29349  # "foo.exe" is OK but "foo" is an error.
29350  #
29351  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29352  # It is also a way to make sure we got the proper file name for the real test later on.
29353  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29354  if test "x$test_shortpath" = x; then
29355    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29356$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29357    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29358  fi
29359
29360  # Call helper function which possibly converts this using DOS-style short mode.
29361  # If so, the updated path is stored in $new_path.
29362
29363  input_path="$new_path"
29364  # Check if we need to convert this using DOS-style short mode. If the path
29365  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29366  # take no chances and rewrite it.
29367  # Note: m4 eats our [], so we need to use [ and ] instead.
29368  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29369  if test "x$has_forbidden_chars" != x; then
29370    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29371    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29372    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29373    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29374      # Going to short mode and back again did indeed matter. Since short mode is
29375      # case insensitive, let's make it lowercase to improve readability.
29376      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29377      # Now convert it back to Unix-style (cygpath)
29378      input_path=`$CYGPATH -u "$shortmode_path"`
29379      new_path="$input_path"
29380    fi
29381  fi
29382
29383  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29384  if test "x$test_cygdrive_prefix" = x; then
29385    # As a simple fix, exclude /usr/bin since it's not a real path.
29386    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29387      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29388      # a path prefixed by /cygdrive for fixpath to work.
29389      new_path="$CYGWIN_ROOT_PATH$input_path"
29390    fi
29391  fi
29392
29393
29394  if test "x$path" != "x$new_path"; then
29395    BOOT_JDK="$new_path"
29396    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29397$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29398  fi
29399
29400    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29401
29402  path="$BOOT_JDK"
29403  has_colon=`$ECHO $path | $GREP ^.:`
29404  new_path="$path"
29405  if test "x$has_colon" = x; then
29406    # Not in mixed or Windows style, start by that.
29407    new_path=`cmd //c echo $path`
29408  fi
29409
29410
29411  input_path="$new_path"
29412  # Check if we need to convert this using DOS-style short mode. If the path
29413  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29414  # take no chances and rewrite it.
29415  # Note: m4 eats our [], so we need to use [ and ] instead.
29416  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29417  if test "x$has_forbidden_chars" != x; then
29418    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29419    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29420  fi
29421
29422
29423  windows_path="$new_path"
29424  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29425    unix_path=`$CYGPATH -u "$windows_path"`
29426    new_path="$unix_path"
29427  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29428    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29429    new_path="$unix_path"
29430  fi
29431
29432  if test "x$path" != "x$new_path"; then
29433    BOOT_JDK="$new_path"
29434    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29435$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29436  fi
29437
29438  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29439  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29440
29441    else
29442      # We're on a unix platform. Hooray! :)
29443      path="$BOOT_JDK"
29444      has_space=`$ECHO "$path" | $GREP " "`
29445      if test "x$has_space" != x; then
29446        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29447$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29448        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29449      fi
29450
29451      # Use eval to expand a potential ~
29452      eval path="$path"
29453      if test ! -f "$path" && test ! -d "$path"; then
29454        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29455      fi
29456
29457      if test -d "$path"; then
29458        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29459      else
29460        dir="`$DIRNAME "$path"`"
29461        base="`$BASENAME "$path"`"
29462        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29463      fi
29464    fi
29465  fi
29466
29467            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29468$as_echo_n "checking for Boot JDK... " >&6; }
29469            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29470$as_echo "$BOOT_JDK" >&6; }
29471            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29472$as_echo_n "checking Boot JDK version... " >&6; }
29473            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29474            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29475$as_echo "$BOOT_JDK_VERSION" >&6; }
29476          fi # end check jdk version
29477        fi # end check javac
29478      fi # end check java
29479    fi # end check boot jdk found
29480  fi
29481
29482    done
29483  fi
29484
29485
29486    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29487    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29488      # Do we have a bin/java?
29489      if test ! -x "$BOOT_JDK/bin/java"; then
29490        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29491$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29492        BOOT_JDK_FOUND=no
29493      else
29494        # Do we have a bin/javac?
29495        if test ! -x "$BOOT_JDK/bin/javac"; then
29496          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29497$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29498          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29499$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29500          BOOT_JDK_FOUND=no
29501        else
29502          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29503          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29504
29505          # Extra M4 quote needed to protect [] in grep expression.
29506          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29507          if test "x$FOUND_CORRECT_VERSION" = x; then
29508            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29509$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29510            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29511$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29512            BOOT_JDK_FOUND=no
29513          else
29514            # We're done! :-)
29515            BOOT_JDK_FOUND=yes
29516
29517  # Only process if variable expands to non-empty
29518
29519  if test "x$BOOT_JDK" != x; then
29520    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29521
29522  # Input might be given as Windows format, start by converting to
29523  # unix format.
29524  path="$BOOT_JDK"
29525  new_path=`$CYGPATH -u "$path"`
29526
29527  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29528  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29529  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29530  # "foo.exe" is OK but "foo" is an error.
29531  #
29532  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29533  # It is also a way to make sure we got the proper file name for the real test later on.
29534  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29535  if test "x$test_shortpath" = x; then
29536    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29537$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29538    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29539  fi
29540
29541  # Call helper function which possibly converts this using DOS-style short mode.
29542  # If so, the updated path is stored in $new_path.
29543
29544  input_path="$new_path"
29545  # Check if we need to convert this using DOS-style short mode. If the path
29546  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29547  # take no chances and rewrite it.
29548  # Note: m4 eats our [], so we need to use [ and ] instead.
29549  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29550  if test "x$has_forbidden_chars" != x; then
29551    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29552    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29553    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29554    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29555      # Going to short mode and back again did indeed matter. Since short mode is
29556      # case insensitive, let's make it lowercase to improve readability.
29557      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29558      # Now convert it back to Unix-style (cygpath)
29559      input_path=`$CYGPATH -u "$shortmode_path"`
29560      new_path="$input_path"
29561    fi
29562  fi
29563
29564  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29565  if test "x$test_cygdrive_prefix" = x; then
29566    # As a simple fix, exclude /usr/bin since it's not a real path.
29567    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29568      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29569      # a path prefixed by /cygdrive for fixpath to work.
29570      new_path="$CYGWIN_ROOT_PATH$input_path"
29571    fi
29572  fi
29573
29574
29575  if test "x$path" != "x$new_path"; then
29576    BOOT_JDK="$new_path"
29577    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29578$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29579  fi
29580
29581    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29582
29583  path="$BOOT_JDK"
29584  has_colon=`$ECHO $path | $GREP ^.:`
29585  new_path="$path"
29586  if test "x$has_colon" = x; then
29587    # Not in mixed or Windows style, start by that.
29588    new_path=`cmd //c echo $path`
29589  fi
29590
29591
29592  input_path="$new_path"
29593  # Check if we need to convert this using DOS-style short mode. If the path
29594  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29595  # take no chances and rewrite it.
29596  # Note: m4 eats our [], so we need to use [ and ] instead.
29597  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29598  if test "x$has_forbidden_chars" != x; then
29599    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29600    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29601  fi
29602
29603
29604  windows_path="$new_path"
29605  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29606    unix_path=`$CYGPATH -u "$windows_path"`
29607    new_path="$unix_path"
29608  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29609    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29610    new_path="$unix_path"
29611  fi
29612
29613  if test "x$path" != "x$new_path"; then
29614    BOOT_JDK="$new_path"
29615    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29616$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29617  fi
29618
29619  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29620  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29621
29622    else
29623      # We're on a unix platform. Hooray! :)
29624      path="$BOOT_JDK"
29625      has_space=`$ECHO "$path" | $GREP " "`
29626      if test "x$has_space" != x; then
29627        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29628$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29629        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29630      fi
29631
29632      # Use eval to expand a potential ~
29633      eval path="$path"
29634      if test ! -f "$path" && test ! -d "$path"; then
29635        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29636      fi
29637
29638      if test -d "$path"; then
29639        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29640      else
29641        dir="`$DIRNAME "$path"`"
29642        base="`$BASENAME "$path"`"
29643        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29644      fi
29645    fi
29646  fi
29647
29648            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29649$as_echo_n "checking for Boot JDK... " >&6; }
29650            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29651$as_echo "$BOOT_JDK" >&6; }
29652            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29653$as_echo_n "checking Boot JDK version... " >&6; }
29654            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29655            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29656$as_echo "$BOOT_JDK_VERSION" >&6; }
29657          fi # end check jdk version
29658        fi # end check javac
29659      fi # end check java
29660    fi # end check boot jdk found
29661  fi
29662
29663  fi
29664
29665
29666    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29667    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29668      # Do we have a bin/java?
29669      if test ! -x "$BOOT_JDK/bin/java"; then
29670        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29671$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29672        BOOT_JDK_FOUND=no
29673      else
29674        # Do we have a bin/javac?
29675        if test ! -x "$BOOT_JDK/bin/javac"; then
29676          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29677$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29678          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29679$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29680          BOOT_JDK_FOUND=no
29681        else
29682          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29683          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29684
29685          # Extra M4 quote needed to protect [] in grep expression.
29686          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29687          if test "x$FOUND_CORRECT_VERSION" = x; then
29688            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29689$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29690            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29691$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29692            BOOT_JDK_FOUND=no
29693          else
29694            # We're done! :-)
29695            BOOT_JDK_FOUND=yes
29696
29697  # Only process if variable expands to non-empty
29698
29699  if test "x$BOOT_JDK" != x; then
29700    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29701
29702  # Input might be given as Windows format, start by converting to
29703  # unix format.
29704  path="$BOOT_JDK"
29705  new_path=`$CYGPATH -u "$path"`
29706
29707  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29708  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29709  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29710  # "foo.exe" is OK but "foo" is an error.
29711  #
29712  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29713  # It is also a way to make sure we got the proper file name for the real test later on.
29714  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29715  if test "x$test_shortpath" = x; then
29716    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29717$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29718    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29719  fi
29720
29721  # Call helper function which possibly converts this using DOS-style short mode.
29722  # If so, the updated path is stored in $new_path.
29723
29724  input_path="$new_path"
29725  # Check if we need to convert this using DOS-style short mode. If the path
29726  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29727  # take no chances and rewrite it.
29728  # Note: m4 eats our [], so we need to use [ and ] instead.
29729  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29730  if test "x$has_forbidden_chars" != x; then
29731    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29732    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29733    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29734    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29735      # Going to short mode and back again did indeed matter. Since short mode is
29736      # case insensitive, let's make it lowercase to improve readability.
29737      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29738      # Now convert it back to Unix-style (cygpath)
29739      input_path=`$CYGPATH -u "$shortmode_path"`
29740      new_path="$input_path"
29741    fi
29742  fi
29743
29744  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29745  if test "x$test_cygdrive_prefix" = x; then
29746    # As a simple fix, exclude /usr/bin since it's not a real path.
29747    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29748      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29749      # a path prefixed by /cygdrive for fixpath to work.
29750      new_path="$CYGWIN_ROOT_PATH$input_path"
29751    fi
29752  fi
29753
29754
29755  if test "x$path" != "x$new_path"; then
29756    BOOT_JDK="$new_path"
29757    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29758$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29759  fi
29760
29761    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29762
29763  path="$BOOT_JDK"
29764  has_colon=`$ECHO $path | $GREP ^.:`
29765  new_path="$path"
29766  if test "x$has_colon" = x; then
29767    # Not in mixed or Windows style, start by that.
29768    new_path=`cmd //c echo $path`
29769  fi
29770
29771
29772  input_path="$new_path"
29773  # Check if we need to convert this using DOS-style short mode. If the path
29774  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29775  # take no chances and rewrite it.
29776  # Note: m4 eats our [], so we need to use [ and ] instead.
29777  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29778  if test "x$has_forbidden_chars" != x; then
29779    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29780    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29781  fi
29782
29783
29784  windows_path="$new_path"
29785  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29786    unix_path=`$CYGPATH -u "$windows_path"`
29787    new_path="$unix_path"
29788  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29789    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29790    new_path="$unix_path"
29791  fi
29792
29793  if test "x$path" != "x$new_path"; then
29794    BOOT_JDK="$new_path"
29795    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29796$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29797  fi
29798
29799  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29800  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29801
29802    else
29803      # We're on a unix platform. Hooray! :)
29804      path="$BOOT_JDK"
29805      has_space=`$ECHO "$path" | $GREP " "`
29806      if test "x$has_space" != x; then
29807        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29808$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29809        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29810      fi
29811
29812      # Use eval to expand a potential ~
29813      eval path="$path"
29814      if test ! -f "$path" && test ! -d "$path"; then
29815        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29816      fi
29817
29818      if test -d "$path"; then
29819        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29820      else
29821        dir="`$DIRNAME "$path"`"
29822        base="`$BASENAME "$path"`"
29823        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29824      fi
29825    fi
29826  fi
29827
29828            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29829$as_echo_n "checking for Boot JDK... " >&6; }
29830            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29831$as_echo "$BOOT_JDK" >&6; }
29832            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29833$as_echo_n "checking Boot JDK version... " >&6; }
29834            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29835            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29836$as_echo "$BOOT_JDK_VERSION" >&6; }
29837          fi # end check jdk version
29838        fi # end check javac
29839      fi # end check java
29840    fi # end check boot jdk found
29841  fi
29842
29843
29844  # If we haven't found anything yet, we've truly lost. Give up.
29845  if test "x$BOOT_JDK_FOUND" = xno; then
29846
29847  # Print a helpful message on how to acquire the necessary build dependency.
29848  # openjdk is the help tag: freetype, cups, alsa etc
29849  MISSING_DEPENDENCY=openjdk
29850
29851  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29852    cygwin_help $MISSING_DEPENDENCY
29853  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29854    msys_help $MISSING_DEPENDENCY
29855  else
29856    PKGHANDLER_COMMAND=
29857
29858    case $PKGHANDLER in
29859      apt-get)
29860        apt_help     $MISSING_DEPENDENCY ;;
29861      yum)
29862        yum_help     $MISSING_DEPENDENCY ;;
29863      port)
29864        port_help    $MISSING_DEPENDENCY ;;
29865      pkgutil)
29866        pkgutil_help $MISSING_DEPENDENCY ;;
29867      pkgadd)
29868        pkgadd_help  $MISSING_DEPENDENCY ;;
29869    esac
29870
29871    if test "x$PKGHANDLER_COMMAND" != x; then
29872      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29873    fi
29874  fi
29875
29876    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
29877$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
29878    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitly setting --with-boot-jdk" >&5
29879$as_echo "$as_me: This might be fixed by explicitly setting --with-boot-jdk" >&6;}
29880    as_fn_error $? "Cannot continue" "$LINENO" 5
29881  fi
29882
29883
29884
29885  # Setup tools from the Boot JDK.
29886
29887  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29888
29889  # Publish this variable in the help.
29890
29891
29892  if [ -z "${JAVA+x}" ]; then
29893    # The variable is not set by user, try to locate tool using the code snippet
29894
29895      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29896$as_echo_n "checking for java in Boot JDK... " >&6; }
29897      JAVA=$BOOT_JDK/bin/java
29898      if test ! -x $JAVA; then
29899        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29900$as_echo "not found" >&6; }
29901        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
29902$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
29903        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29904      fi
29905      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29906$as_echo "ok" >&6; }
29907
29908
29909  else
29910    # The variable is set, but is it from the command line or the environment?
29911
29912    # Try to remove the string !JAVA! from our list.
29913    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
29914    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29915      # If it failed, the variable was not from the command line. Ignore it,
29916      # but warn the user (except for BASH, which is always set by the calling BASH).
29917      if test "xJAVA" != xBASH; then
29918        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
29919$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
29920      fi
29921      # Try to locate tool using the code snippet
29922
29923      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29924$as_echo_n "checking for java in Boot JDK... " >&6; }
29925      JAVA=$BOOT_JDK/bin/java
29926      if test ! -x $JAVA; then
29927        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29928$as_echo "not found" >&6; }
29929        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
29930$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
29931        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29932      fi
29933      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29934$as_echo "ok" >&6; }
29935
29936
29937    else
29938      # If it succeeded, then it was overridden by the user. We will use it
29939      # for the tool.
29940
29941      # First remove it from the list of overridden variables, so we can test
29942      # for unknown variables in the end.
29943      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29944
29945      # Check if we try to supply an empty value
29946      if test "x$JAVA" = x; then
29947        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
29948$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
29949        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
29950$as_echo_n "checking for JAVA... " >&6; }
29951        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29952$as_echo "disabled" >&6; }
29953      else
29954        # Check if the provided tool contains a complete path.
29955        tool_specified="$JAVA"
29956        tool_basename="${tool_specified##*/}"
29957        if test "x$tool_basename" = "x$tool_specified"; then
29958          # A command without a complete path is provided, search $PATH.
29959          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
29960$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
29961          # Extract the first word of "$tool_basename", so it can be a program name with args.
29962set dummy $tool_basename; ac_word=$2
29963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29964$as_echo_n "checking for $ac_word... " >&6; }
29965if ${ac_cv_path_JAVA+:} false; then :
29966  $as_echo_n "(cached) " >&6
29967else
29968  case $JAVA in
29969  [\\/]* | ?:[\\/]*)
29970  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
29971  ;;
29972  *)
29973  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29974for as_dir in $PATH
29975do
29976  IFS=$as_save_IFS
29977  test -z "$as_dir" && as_dir=.
29978    for ac_exec_ext in '' $ac_executable_extensions; do
29979  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29980    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
29981    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29982    break 2
29983  fi
29984done
29985  done
29986IFS=$as_save_IFS
29987
29988  ;;
29989esac
29990fi
29991JAVA=$ac_cv_path_JAVA
29992if test -n "$JAVA"; then
29993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
29994$as_echo "$JAVA" >&6; }
29995else
29996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29997$as_echo "no" >&6; }
29998fi
29999
30000
30001          if test "x$JAVA" = x; then
30002            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30003          fi
30004        else
30005          # Otherwise we believe it is a complete path. Use it as it is.
30006          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
30007$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
30008          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30009$as_echo_n "checking for JAVA... " >&6; }
30010          if test ! -x "$tool_specified"; then
30011            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30012$as_echo "not found" >&6; }
30013            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
30014          fi
30015          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30016$as_echo "$tool_specified" >&6; }
30017        fi
30018      fi
30019    fi
30020
30021  fi
30022
30023
30024
30025  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30026
30027  # Publish this variable in the help.
30028
30029
30030  if [ -z "${JAVAC+x}" ]; then
30031    # The variable is not set by user, try to locate tool using the code snippet
30032
30033      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30034$as_echo_n "checking for javac in Boot JDK... " >&6; }
30035      JAVAC=$BOOT_JDK/bin/javac
30036      if test ! -x $JAVAC; then
30037        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30038$as_echo "not found" >&6; }
30039        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30040$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30041        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30042      fi
30043      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30044$as_echo "ok" >&6; }
30045
30046
30047  else
30048    # The variable is set, but is it from the command line or the environment?
30049
30050    # Try to remove the string !JAVAC! from our list.
30051    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
30052    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30053      # If it failed, the variable was not from the command line. Ignore it,
30054      # but warn the user (except for BASH, which is always set by the calling BASH).
30055      if test "xJAVAC" != xBASH; then
30056        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
30057$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
30058      fi
30059      # Try to locate tool using the code snippet
30060
30061      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30062$as_echo_n "checking for javac in Boot JDK... " >&6; }
30063      JAVAC=$BOOT_JDK/bin/javac
30064      if test ! -x $JAVAC; then
30065        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30066$as_echo "not found" >&6; }
30067        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30068$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30069        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30070      fi
30071      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30072$as_echo "ok" >&6; }
30073
30074
30075    else
30076      # If it succeeded, then it was overridden by the user. We will use it
30077      # for the tool.
30078
30079      # First remove it from the list of overridden variables, so we can test
30080      # for unknown variables in the end.
30081      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30082
30083      # Check if we try to supply an empty value
30084      if test "x$JAVAC" = x; then
30085        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
30086$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
30087        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30088$as_echo_n "checking for JAVAC... " >&6; }
30089        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30090$as_echo "disabled" >&6; }
30091      else
30092        # Check if the provided tool contains a complete path.
30093        tool_specified="$JAVAC"
30094        tool_basename="${tool_specified##*/}"
30095        if test "x$tool_basename" = "x$tool_specified"; then
30096          # A command without a complete path is provided, search $PATH.
30097          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
30098$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
30099          # Extract the first word of "$tool_basename", so it can be a program name with args.
30100set dummy $tool_basename; ac_word=$2
30101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30102$as_echo_n "checking for $ac_word... " >&6; }
30103if ${ac_cv_path_JAVAC+:} false; then :
30104  $as_echo_n "(cached) " >&6
30105else
30106  case $JAVAC in
30107  [\\/]* | ?:[\\/]*)
30108  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
30109  ;;
30110  *)
30111  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30112for as_dir in $PATH
30113do
30114  IFS=$as_save_IFS
30115  test -z "$as_dir" && as_dir=.
30116    for ac_exec_ext in '' $ac_executable_extensions; do
30117  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30118    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
30119    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30120    break 2
30121  fi
30122done
30123  done
30124IFS=$as_save_IFS
30125
30126  ;;
30127esac
30128fi
30129JAVAC=$ac_cv_path_JAVAC
30130if test -n "$JAVAC"; then
30131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
30132$as_echo "$JAVAC" >&6; }
30133else
30134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30135$as_echo "no" >&6; }
30136fi
30137
30138
30139          if test "x$JAVAC" = x; then
30140            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30141          fi
30142        else
30143          # Otherwise we believe it is a complete path. Use it as it is.
30144          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
30145$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
30146          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30147$as_echo_n "checking for JAVAC... " >&6; }
30148          if test ! -x "$tool_specified"; then
30149            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30150$as_echo "not found" >&6; }
30151            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
30152          fi
30153          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30154$as_echo "$tool_specified" >&6; }
30155        fi
30156      fi
30157    fi
30158
30159  fi
30160
30161
30162
30163  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30164
30165  # Publish this variable in the help.
30166
30167
30168  if [ -z "${JAVAH+x}" ]; then
30169    # The variable is not set by user, try to locate tool using the code snippet
30170
30171      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30172$as_echo_n "checking for javah in Boot JDK... " >&6; }
30173      JAVAH=$BOOT_JDK/bin/javah
30174      if test ! -x $JAVAH; then
30175        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30176$as_echo "not found" >&6; }
30177        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30178$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30179        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30180      fi
30181      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30182$as_echo "ok" >&6; }
30183
30184
30185  else
30186    # The variable is set, but is it from the command line or the environment?
30187
30188    # Try to remove the string !JAVAH! from our list.
30189    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
30190    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30191      # If it failed, the variable was not from the command line. Ignore it,
30192      # but warn the user (except for BASH, which is always set by the calling BASH).
30193      if test "xJAVAH" != xBASH; then
30194        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
30195$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
30196      fi
30197      # Try to locate tool using the code snippet
30198
30199      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30200$as_echo_n "checking for javah in Boot JDK... " >&6; }
30201      JAVAH=$BOOT_JDK/bin/javah
30202      if test ! -x $JAVAH; then
30203        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30204$as_echo "not found" >&6; }
30205        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30206$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30207        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30208      fi
30209      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30210$as_echo "ok" >&6; }
30211
30212
30213    else
30214      # If it succeeded, then it was overridden by the user. We will use it
30215      # for the tool.
30216
30217      # First remove it from the list of overridden variables, so we can test
30218      # for unknown variables in the end.
30219      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30220
30221      # Check if we try to supply an empty value
30222      if test "x$JAVAH" = x; then
30223        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
30224$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
30225        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30226$as_echo_n "checking for JAVAH... " >&6; }
30227        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30228$as_echo "disabled" >&6; }
30229      else
30230        # Check if the provided tool contains a complete path.
30231        tool_specified="$JAVAH"
30232        tool_basename="${tool_specified##*/}"
30233        if test "x$tool_basename" = "x$tool_specified"; then
30234          # A command without a complete path is provided, search $PATH.
30235          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
30236$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
30237          # Extract the first word of "$tool_basename", so it can be a program name with args.
30238set dummy $tool_basename; ac_word=$2
30239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30240$as_echo_n "checking for $ac_word... " >&6; }
30241if ${ac_cv_path_JAVAH+:} false; then :
30242  $as_echo_n "(cached) " >&6
30243else
30244  case $JAVAH in
30245  [\\/]* | ?:[\\/]*)
30246  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
30247  ;;
30248  *)
30249  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30250for as_dir in $PATH
30251do
30252  IFS=$as_save_IFS
30253  test -z "$as_dir" && as_dir=.
30254    for ac_exec_ext in '' $ac_executable_extensions; do
30255  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30256    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
30257    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30258    break 2
30259  fi
30260done
30261  done
30262IFS=$as_save_IFS
30263
30264  ;;
30265esac
30266fi
30267JAVAH=$ac_cv_path_JAVAH
30268if test -n "$JAVAH"; then
30269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
30270$as_echo "$JAVAH" >&6; }
30271else
30272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30273$as_echo "no" >&6; }
30274fi
30275
30276
30277          if test "x$JAVAH" = x; then
30278            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30279          fi
30280        else
30281          # Otherwise we believe it is a complete path. Use it as it is.
30282          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
30283$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
30284          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30285$as_echo_n "checking for JAVAH... " >&6; }
30286          if test ! -x "$tool_specified"; then
30287            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30288$as_echo "not found" >&6; }
30289            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
30290          fi
30291          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30292$as_echo "$tool_specified" >&6; }
30293        fi
30294      fi
30295    fi
30296
30297  fi
30298
30299
30300
30301  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30302
30303  # Publish this variable in the help.
30304
30305
30306  if [ -z "${JAR+x}" ]; then
30307    # The variable is not set by user, try to locate tool using the code snippet
30308
30309      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30310$as_echo_n "checking for jar in Boot JDK... " >&6; }
30311      JAR=$BOOT_JDK/bin/jar
30312      if test ! -x $JAR; then
30313        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30314$as_echo "not found" >&6; }
30315        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30316$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30317        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30318      fi
30319      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30320$as_echo "ok" >&6; }
30321
30322
30323  else
30324    # The variable is set, but is it from the command line or the environment?
30325
30326    # Try to remove the string !JAR! from our list.
30327    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
30328    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30329      # If it failed, the variable was not from the command line. Ignore it,
30330      # but warn the user (except for BASH, which is always set by the calling BASH).
30331      if test "xJAR" != xBASH; then
30332        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
30333$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
30334      fi
30335      # Try to locate tool using the code snippet
30336
30337      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30338$as_echo_n "checking for jar in Boot JDK... " >&6; }
30339      JAR=$BOOT_JDK/bin/jar
30340      if test ! -x $JAR; then
30341        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30342$as_echo "not found" >&6; }
30343        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30344$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30345        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30346      fi
30347      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30348$as_echo "ok" >&6; }
30349
30350
30351    else
30352      # If it succeeded, then it was overridden by the user. We will use it
30353      # for the tool.
30354
30355      # First remove it from the list of overridden variables, so we can test
30356      # for unknown variables in the end.
30357      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30358
30359      # Check if we try to supply an empty value
30360      if test "x$JAR" = x; then
30361        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
30362$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
30363        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30364$as_echo_n "checking for JAR... " >&6; }
30365        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30366$as_echo "disabled" >&6; }
30367      else
30368        # Check if the provided tool contains a complete path.
30369        tool_specified="$JAR"
30370        tool_basename="${tool_specified##*/}"
30371        if test "x$tool_basename" = "x$tool_specified"; then
30372          # A command without a complete path is provided, search $PATH.
30373          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
30374$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
30375          # Extract the first word of "$tool_basename", so it can be a program name with args.
30376set dummy $tool_basename; ac_word=$2
30377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30378$as_echo_n "checking for $ac_word... " >&6; }
30379if ${ac_cv_path_JAR+:} false; then :
30380  $as_echo_n "(cached) " >&6
30381else
30382  case $JAR in
30383  [\\/]* | ?:[\\/]*)
30384  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
30385  ;;
30386  *)
30387  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30388for as_dir in $PATH
30389do
30390  IFS=$as_save_IFS
30391  test -z "$as_dir" && as_dir=.
30392    for ac_exec_ext in '' $ac_executable_extensions; do
30393  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30394    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
30395    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30396    break 2
30397  fi
30398done
30399  done
30400IFS=$as_save_IFS
30401
30402  ;;
30403esac
30404fi
30405JAR=$ac_cv_path_JAR
30406if test -n "$JAR"; then
30407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
30408$as_echo "$JAR" >&6; }
30409else
30410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30411$as_echo "no" >&6; }
30412fi
30413
30414
30415          if test "x$JAR" = x; then
30416            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30417          fi
30418        else
30419          # Otherwise we believe it is a complete path. Use it as it is.
30420          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
30421$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
30422          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30423$as_echo_n "checking for JAR... " >&6; }
30424          if test ! -x "$tool_specified"; then
30425            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30426$as_echo "not found" >&6; }
30427            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
30428          fi
30429          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30430$as_echo "$tool_specified" >&6; }
30431        fi
30432      fi
30433    fi
30434
30435  fi
30436
30437
30438
30439  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30440
30441  # Publish this variable in the help.
30442
30443
30444  if [ -z "${JARSIGNER+x}" ]; then
30445    # The variable is not set by user, try to locate tool using the code snippet
30446
30447      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30448$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30449      JARSIGNER=$BOOT_JDK/bin/jarsigner
30450      if test ! -x $JARSIGNER; then
30451        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30452$as_echo "not found" >&6; }
30453        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30454$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30455        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30456      fi
30457      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30458$as_echo "ok" >&6; }
30459
30460
30461  else
30462    # The variable is set, but is it from the command line or the environment?
30463
30464    # Try to remove the string !JARSIGNER! from our list.
30465    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
30466    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30467      # If it failed, the variable was not from the command line. Ignore it,
30468      # but warn the user (except for BASH, which is always set by the calling BASH).
30469      if test "xJARSIGNER" != xBASH; then
30470        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
30471$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
30472      fi
30473      # Try to locate tool using the code snippet
30474
30475      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30476$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30477      JARSIGNER=$BOOT_JDK/bin/jarsigner
30478      if test ! -x $JARSIGNER; then
30479        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30480$as_echo "not found" >&6; }
30481        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30482$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30483        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30484      fi
30485      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30486$as_echo "ok" >&6; }
30487
30488
30489    else
30490      # If it succeeded, then it was overridden by the user. We will use it
30491      # for the tool.
30492
30493      # First remove it from the list of overridden variables, so we can test
30494      # for unknown variables in the end.
30495      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30496
30497      # Check if we try to supply an empty value
30498      if test "x$JARSIGNER" = x; then
30499        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
30500$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
30501        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30502$as_echo_n "checking for JARSIGNER... " >&6; }
30503        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30504$as_echo "disabled" >&6; }
30505      else
30506        # Check if the provided tool contains a complete path.
30507        tool_specified="$JARSIGNER"
30508        tool_basename="${tool_specified##*/}"
30509        if test "x$tool_basename" = "x$tool_specified"; then
30510          # A command without a complete path is provided, search $PATH.
30511          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
30512$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
30513          # Extract the first word of "$tool_basename", so it can be a program name with args.
30514set dummy $tool_basename; ac_word=$2
30515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30516$as_echo_n "checking for $ac_word... " >&6; }
30517if ${ac_cv_path_JARSIGNER+:} false; then :
30518  $as_echo_n "(cached) " >&6
30519else
30520  case $JARSIGNER in
30521  [\\/]* | ?:[\\/]*)
30522  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
30523  ;;
30524  *)
30525  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30526for as_dir in $PATH
30527do
30528  IFS=$as_save_IFS
30529  test -z "$as_dir" && as_dir=.
30530    for ac_exec_ext in '' $ac_executable_extensions; do
30531  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30532    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
30533    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30534    break 2
30535  fi
30536done
30537  done
30538IFS=$as_save_IFS
30539
30540  ;;
30541esac
30542fi
30543JARSIGNER=$ac_cv_path_JARSIGNER
30544if test -n "$JARSIGNER"; then
30545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
30546$as_echo "$JARSIGNER" >&6; }
30547else
30548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30549$as_echo "no" >&6; }
30550fi
30551
30552
30553          if test "x$JARSIGNER" = x; then
30554            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30555          fi
30556        else
30557          # Otherwise we believe it is a complete path. Use it as it is.
30558          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
30559$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
30560          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30561$as_echo_n "checking for JARSIGNER... " >&6; }
30562          if test ! -x "$tool_specified"; then
30563            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30564$as_echo "not found" >&6; }
30565            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
30566          fi
30567          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30568$as_echo "$tool_specified" >&6; }
30569        fi
30570      fi
30571    fi
30572
30573  fi
30574
30575
30576
30577  # Finally, set some other options...
30578
30579  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
30580  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
30581
30582
30583
30584  $ECHO "Check if jvm arg is ok: --patch-module foo=bar" >&5
30585  $ECHO "Command: $JAVA --patch-module foo=bar -version" >&5
30586  OUTPUT=`$JAVA --patch-module foo=bar -version 2>&1`
30587  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
30588  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
30589  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30590    dummy="$dummy --patch-module foo=bar"
30591    JVM_ARG_OK=true
30592  else
30593    $ECHO "Arg failed:" >&5
30594    $ECHO "$OUTPUT" >&5
30595    JVM_ARG_OK=false
30596  fi
30597
30598  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
30599$as_echo_n "checking if Boot JDK supports modules... " >&6; }
30600  if test "x$JVM_ARG_OK" = "xtrue"; then
30601    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30602$as_echo "yes" >&6; }
30603    BOOT_JDK_MODULAR="true"
30604  else
30605    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30606$as_echo "no" >&6; }
30607    BOOT_JDK_MODULAR="false"
30608  fi
30609
30610
30611
30612
30613  # Check if the boot jdk is 32 or 64 bit
30614  if "$JAVA" -d64 -version > /dev/null 2>&1; then
30615    BOOT_JDK_BITS="64"
30616  else
30617    BOOT_JDK_BITS="32"
30618  fi
30619  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
30620$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
30621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
30622$as_echo "$BOOT_JDK_BITS" >&6; }
30623
30624
30625
30626
30627# Check whether --with-build-jdk was given.
30628if test "${with_build_jdk+set}" = set; then :
30629  withval=$with_build_jdk;
30630fi
30631
30632
30633  CREATE_BUILDJDK=false
30634  EXTERNAL_BUILDJDK=false
30635  BUILD_JDK_FOUND="no"
30636  if test "x$with_build_jdk" != "x"; then
30637
30638  if test "x$BUILD_JDK_FOUND" = xno; then
30639    # Execute the test
30640
30641       if test "x$with_build_jdk" != x; then
30642         BUILD_JDK=$with_build_jdk
30643         BUILD_JDK_FOUND=maybe
30644         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
30645$as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
30646       fi
30647
30648    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30649    if test "x$BUILD_JDK_FOUND" = xmaybe; then
30650      # Do we have a bin/java?
30651      if test ! -x "$BUILD_JDK/bin/java"; then
30652        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
30653$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
30654        BUILD_JDK_FOUND=no
30655      elif test ! -x "$BUILD_JDK/bin/jlink"; then
30656        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
30657$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
30658        BUILD_JDK_FOUND=no
30659      elif test ! -x "$BUILD_JDK/bin/jmod"; then
30660        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&5
30661$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&6;}
30662        BUILD_JDK_FOUND=no
30663      elif test ! -x "$BUILD_JDK/bin/javac"; then
30664        # Do we have a bin/javac?
30665        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
30666$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
30667        { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
30668$as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
30669        BUILD_JDK_FOUND=no
30670      else
30671        # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30672        BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30673
30674        # Extra M4 quote needed to protect [] in grep expression.
30675        FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
30676        if test "x$FOUND_CORRECT_VERSION" = x; then
30677          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
30678$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
30679          { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
30680$as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
30681          BUILD_JDK_FOUND=no
30682        else
30683          # We're done!
30684          BUILD_JDK_FOUND=yes
30685
30686  # Only process if variable expands to non-empty
30687
30688  if test "x$BUILD_JDK" != x; then
30689    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30690
30691  # Input might be given as Windows format, start by converting to
30692  # unix format.
30693  path="$BUILD_JDK"
30694  new_path=`$CYGPATH -u "$path"`
30695
30696  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30697  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30698  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30699  # "foo.exe" is OK but "foo" is an error.
30700  #
30701  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30702  # It is also a way to make sure we got the proper file name for the real test later on.
30703  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30704  if test "x$test_shortpath" = x; then
30705    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30706$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30707    as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
30708  fi
30709
30710  # Call helper function which possibly converts this using DOS-style short mode.
30711  # If so, the updated path is stored in $new_path.
30712
30713  input_path="$new_path"
30714  # Check if we need to convert this using DOS-style short mode. If the path
30715  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30716  # take no chances and rewrite it.
30717  # Note: m4 eats our [], so we need to use [ and ] instead.
30718  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30719  if test "x$has_forbidden_chars" != x; then
30720    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30721    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30722    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30723    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30724      # Going to short mode and back again did indeed matter. Since short mode is
30725      # case insensitive, let's make it lowercase to improve readability.
30726      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30727      # Now convert it back to Unix-style (cygpath)
30728      input_path=`$CYGPATH -u "$shortmode_path"`
30729      new_path="$input_path"
30730    fi
30731  fi
30732
30733  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30734  if test "x$test_cygdrive_prefix" = x; then
30735    # As a simple fix, exclude /usr/bin since it's not a real path.
30736    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30737      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30738      # a path prefixed by /cygdrive for fixpath to work.
30739      new_path="$CYGWIN_ROOT_PATH$input_path"
30740    fi
30741  fi
30742
30743
30744  if test "x$path" != "x$new_path"; then
30745    BUILD_JDK="$new_path"
30746    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30747$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30748  fi
30749
30750    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30751
30752  path="$BUILD_JDK"
30753  has_colon=`$ECHO $path | $GREP ^.:`
30754  new_path="$path"
30755  if test "x$has_colon" = x; then
30756    # Not in mixed or Windows style, start by that.
30757    new_path=`cmd //c echo $path`
30758  fi
30759
30760
30761  input_path="$new_path"
30762  # Check if we need to convert this using DOS-style short mode. If the path
30763  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30764  # take no chances and rewrite it.
30765  # Note: m4 eats our [], so we need to use [ and ] instead.
30766  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30767  if test "x$has_forbidden_chars" != x; then
30768    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30769    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30770  fi
30771
30772
30773  windows_path="$new_path"
30774  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30775    unix_path=`$CYGPATH -u "$windows_path"`
30776    new_path="$unix_path"
30777  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30778    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30779    new_path="$unix_path"
30780  fi
30781
30782  if test "x$path" != "x$new_path"; then
30783    BUILD_JDK="$new_path"
30784    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30785$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30786  fi
30787
30788  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30789  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30790
30791    else
30792      # We're on a unix platform. Hooray! :)
30793      path="$BUILD_JDK"
30794      has_space=`$ECHO "$path" | $GREP " "`
30795      if test "x$has_space" != x; then
30796        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30797$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30798        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30799      fi
30800
30801      # Use eval to expand a potential ~
30802      eval path="$path"
30803      if test ! -f "$path" && test ! -d "$path"; then
30804        as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30805      fi
30806
30807      if test -d "$path"; then
30808        BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
30809      else
30810        dir="`$DIRNAME "$path"`"
30811        base="`$BASENAME "$path"`"
30812        BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30813      fi
30814    fi
30815  fi
30816
30817          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30818$as_echo_n "checking for Build JDK... " >&6; }
30819          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
30820$as_echo "$BUILD_JDK" >&6; }
30821          { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
30822$as_echo_n "checking Build JDK version... " >&6; }
30823          BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30824          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
30825$as_echo "$BUILD_JDK_VERSION" >&6; }
30826        fi # end check jdk version
30827      fi # end check java
30828    fi # end check build jdk found
30829  fi
30830
30831    EXTERNAL_BUILDJDK=true
30832  else
30833    if test "x$COMPILE_TYPE" = "xcross"; then
30834      BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
30835      BUILD_JDK_FOUND=yes
30836      CREATE_BUILDJDK=true
30837      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30838$as_echo_n "checking for Build JDK... " >&6; }
30839      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
30840$as_echo "yes, will build it for the host platform" >&6; }
30841    else
30842      BUILD_JDK="\$(JDK_OUTPUTDIR)"
30843      BUILD_JDK_FOUND=yes
30844      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30845$as_echo_n "checking for Build JDK... " >&6; }
30846      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
30847$as_echo "yes, will use output dir" >&6; }
30848    fi
30849  fi
30850
30851  JMOD="$BUILD_JDK/bin/jmod"
30852  JLINK="$BUILD_JDK/bin/jlink"
30853
30854
30855
30856  if test "x$BUILD_JDK_FOUND" != "xyes"; then
30857    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30858$as_echo_n "checking for Build JDK... " >&6; }
30859    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30860$as_echo "no" >&6; }
30861    as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
30862  fi
30863
30864
30865
30866
30867
30868
30869###############################################################################
30870#
30871# Configure the sources to use. We can add or override individual directories.
30872#
30873###############################################################################
30874
30875
30876  # Where are the sources.
30877  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
30878  CORBA_TOPDIR="$SRC_ROOT/corba"
30879  JAXP_TOPDIR="$SRC_ROOT/jaxp"
30880  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
30881  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
30882  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
30883  JDK_TOPDIR="$SRC_ROOT/jdk"
30884
30885
30886
30887
30888
30889
30890
30891
30892
30893  # This feature is no longer supported.
30894
30895
30896
30897# Check whether --with-add-source-root was given.
30898if test "${with_add_source_root+set}" = set; then :
30899  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
30900$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
30901fi
30902
30903
30904
30905
30906# Check whether --with-override-source-root was given.
30907if test "${with_override_source_root+set}" = set; then :
30908  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
30909$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
30910fi
30911
30912
30913
30914
30915# Check whether --with-adds-and-overrides was given.
30916if test "${with_adds_and_overrides+set}" = set; then :
30917  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
30918$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
30919fi
30920
30921
30922
30923
30924# Check whether --with-override-langtools was given.
30925if test "${with_override_langtools+set}" = set; then :
30926  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
30927$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
30928fi
30929
30930
30931
30932
30933# Check whether --with-override-corba was given.
30934if test "${with_override_corba+set}" = set; then :
30935  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
30936$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
30937fi
30938
30939
30940
30941
30942# Check whether --with-override-jaxp was given.
30943if test "${with_override_jaxp+set}" = set; then :
30944  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
30945$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
30946fi
30947
30948
30949
30950
30951# Check whether --with-override-jaxws was given.
30952if test "${with_override_jaxws+set}" = set; then :
30953  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
30954$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
30955fi
30956
30957
30958
30959
30960# Check whether --with-override-hotspot was given.
30961if test "${with_override_hotspot+set}" = set; then :
30962  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
30963$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
30964fi
30965
30966
30967
30968
30969# Check whether --with-override-nashorn was given.
30970if test "${with_override_nashorn+set}" = set; then :
30971  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
30972$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
30973fi
30974
30975
30976
30977
30978# Check whether --with-override-jdk was given.
30979if test "${with_override_jdk+set}" = set; then :
30980  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
30981$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
30982fi
30983
30984
30985
30986
30987  BUILD_OUTPUT="$OUTPUT_ROOT"
30988
30989
30990  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
30991  BUILD_HOTSPOT=true
30992
30993
30994
30995# Check whether --with-import-hotspot was given.
30996if test "${with_import_hotspot+set}" = set; then :
30997  withval=$with_import_hotspot;
30998fi
30999
31000  if test "x$with_import_hotspot" != x; then
31001    CURDIR="$PWD"
31002    cd "$with_import_hotspot"
31003    HOTSPOT_DIST="`pwd`"
31004    cd "$CURDIR"
31005    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
31006      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
31007    fi
31008    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
31009$as_echo_n "checking if hotspot should be imported... " >&6; }
31010    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
31011$as_echo "yes from $HOTSPOT_DIST" >&6; }
31012    BUILD_HOTSPOT=false
31013  fi
31014
31015  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
31016
31017
31018
31019
31020# Check whether --with-import-modules was given.
31021if test "${with_import_modules+set}" = set; then :
31022  withval=$with_import_modules;
31023fi
31024
31025
31026  if test "x$with_import_modules" != x \
31027      && test "x$with_import_modules" != "xno"; then
31028    if test -d "$with_import_modules"; then
31029      IMPORT_MODULES_TOPDIR="$with_import_modules"
31030
31031  # Only process if variable expands to non-empty
31032
31033  if test "x$IMPORT_MODULES_TOPDIR" != x; then
31034    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31035
31036  # Input might be given as Windows format, start by converting to
31037  # unix format.
31038  path="$IMPORT_MODULES_TOPDIR"
31039  new_path=`$CYGPATH -u "$path"`
31040
31041  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31042  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31043  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31044  # "foo.exe" is OK but "foo" is an error.
31045  #
31046  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31047  # It is also a way to make sure we got the proper file name for the real test later on.
31048  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31049  if test "x$test_shortpath" = x; then
31050    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31051$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31052    as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
31053  fi
31054
31055  # Call helper function which possibly converts this using DOS-style short mode.
31056  # If so, the updated path is stored in $new_path.
31057
31058  input_path="$new_path"
31059  # Check if we need to convert this using DOS-style short mode. If the path
31060  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31061  # take no chances and rewrite it.
31062  # Note: m4 eats our [], so we need to use [ and ] instead.
31063  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31064  if test "x$has_forbidden_chars" != x; then
31065    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31066    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31067    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31068    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31069      # Going to short mode and back again did indeed matter. Since short mode is
31070      # case insensitive, let's make it lowercase to improve readability.
31071      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31072      # Now convert it back to Unix-style (cygpath)
31073      input_path=`$CYGPATH -u "$shortmode_path"`
31074      new_path="$input_path"
31075    fi
31076  fi
31077
31078  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31079  if test "x$test_cygdrive_prefix" = x; then
31080    # As a simple fix, exclude /usr/bin since it's not a real path.
31081    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31082      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31083      # a path prefixed by /cygdrive for fixpath to work.
31084      new_path="$CYGWIN_ROOT_PATH$input_path"
31085    fi
31086  fi
31087
31088
31089  if test "x$path" != "x$new_path"; then
31090    IMPORT_MODULES_TOPDIR="$new_path"
31091    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31092$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31093  fi
31094
31095    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31096
31097  path="$IMPORT_MODULES_TOPDIR"
31098  has_colon=`$ECHO $path | $GREP ^.:`
31099  new_path="$path"
31100  if test "x$has_colon" = x; then
31101    # Not in mixed or Windows style, start by that.
31102    new_path=`cmd //c echo $path`
31103  fi
31104
31105
31106  input_path="$new_path"
31107  # Check if we need to convert this using DOS-style short mode. If the path
31108  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31109  # take no chances and rewrite it.
31110  # Note: m4 eats our [], so we need to use [ and ] instead.
31111  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31112  if test "x$has_forbidden_chars" != x; then
31113    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31114    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31115  fi
31116
31117
31118  windows_path="$new_path"
31119  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31120    unix_path=`$CYGPATH -u "$windows_path"`
31121    new_path="$unix_path"
31122  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31123    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31124    new_path="$unix_path"
31125  fi
31126
31127  if test "x$path" != "x$new_path"; then
31128    IMPORT_MODULES_TOPDIR="$new_path"
31129    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31130$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31131  fi
31132
31133  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31134  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31135
31136    else
31137      # We're on a unix platform. Hooray! :)
31138      path="$IMPORT_MODULES_TOPDIR"
31139      has_space=`$ECHO "$path" | $GREP " "`
31140      if test "x$has_space" != x; then
31141        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31142$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31143        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31144      fi
31145
31146      # Use eval to expand a potential ~
31147      eval path="$path"
31148      if test ! -f "$path" && test ! -d "$path"; then
31149        as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
31150      fi
31151
31152      if test -d "$path"; then
31153        IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
31154      else
31155        dir="`$DIRNAME "$path"`"
31156        base="`$BASENAME "$path"`"
31157        IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
31158      fi
31159    fi
31160  fi
31161
31162    elif test -e "$with_import_modules"; then
31163      IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
31164      $RM -rf "$IMPORT_MODULES_TOPDIR"
31165      $MKDIR -p "$IMPORT_MODULES_TOPDIR"
31166      if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
31167        as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31168      fi
31169    else
31170      as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31171    fi
31172  fi
31173
31174  if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
31175    IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
31176  fi
31177  if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
31178    IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
31179  fi
31180  if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
31181    IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
31182  fi
31183  if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
31184    IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
31185  fi
31186  if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
31187    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
31188  fi
31189  # Workaround for using different imported module-info.java in Jake due to a
31190  # change in format. Remove once new format is standard in JDK 9 and javafx
31191  # delivers just that.
31192  if test -d "$IMPORT_MODULES_TOPDIR/modules_src_jake"; then
31193    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src_jake $IMPORT_MODULES_SRC"
31194  fi
31195  if test -d "$IMPORT_MODULES_TOPDIR/make"; then
31196    IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
31197  fi
31198
31199
31200
31201
31202
31203
31204
31205
31206
31207###############################################################################
31208#
31209# Setup the toolchain (compilers etc), i.e. tools used to compile and process
31210# native code.
31211#
31212###############################################################################
31213
31214# See if we are doing a complete static build or not
31215
31216  # Check whether --enable-static-build was given.
31217if test "${enable_static_build+set}" = set; then :
31218  enableval=$enable_static_build;
31219fi
31220
31221  STATIC_BUILD=false
31222  if test "x$enable_static_build" = "xyes"; then
31223    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31224$as_echo_n "checking if static build is enabled... " >&6; }
31225    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31226$as_echo "yes" >&6; }
31227    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
31228      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
31229    fi
31230    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
31231    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
31232    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
31233    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31234    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31235    STATIC_BUILD=true
31236  elif test "x$enable_static_build" = "xno"; then
31237    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31238$as_echo_n "checking if static build is enabled... " >&6; }
31239    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31240$as_echo "no" >&6; }
31241  elif test "x$enable_static_build" != "x"; then
31242    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
31243  fi
31244
31245
31246
31247
31248# First determine the toolchain type (compiler family)
31249
31250
31251# Check whether --with-toolchain-type was given.
31252if test "${with_toolchain_type+set}" = set; then :
31253  withval=$with_toolchain_type;
31254fi
31255
31256
31257  # Use indirect variable referencing
31258  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
31259  VALID_TOOLCHAINS=${!toolchain_var_name}
31260
31261  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31262    if test -n "$XCODEBUILD"; then
31263      # On Mac OS X, default toolchain to clang after Xcode 5
31264      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
31265      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
31266      if test $? -ne 0; then
31267        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
31268      fi
31269      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
31270          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
31271          $CUT -f 1 -d .`
31272      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
31273$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
31274      if test $XCODE_MAJOR_VERSION -ge 5; then
31275          DEFAULT_TOOLCHAIN="clang"
31276      else
31277          DEFAULT_TOOLCHAIN="gcc"
31278      fi
31279    else
31280      # If Xcode is not installed, but the command line tools are
31281      # then we can't run xcodebuild. On these systems we should
31282      # default to clang
31283      DEFAULT_TOOLCHAIN="clang"
31284    fi
31285  else
31286    # First toolchain type in the list is the default
31287    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
31288  fi
31289
31290  if test "x$with_toolchain_type" = xlist; then
31291    # List all toolchains
31292    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
31293$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
31294    for toolchain in $VALID_TOOLCHAINS; do
31295      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
31296      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31297      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
31298    done
31299
31300    exit 0
31301  elif test "x$with_toolchain_type" != x; then
31302    # User override; check that it is valid
31303    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
31304      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
31305$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
31306      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
31307$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
31308      as_fn_error $? "Cannot continue." "$LINENO" 5
31309    fi
31310    TOOLCHAIN_TYPE=$with_toolchain_type
31311  else
31312    # No flag given, use default
31313    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
31314  fi
31315
31316
31317  TOOLCHAIN_CC_BINARY_clang="clang"
31318  TOOLCHAIN_CC_BINARY_gcc="gcc"
31319  TOOLCHAIN_CC_BINARY_microsoft="cl"
31320  TOOLCHAIN_CC_BINARY_solstudio="cc"
31321  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
31322
31323  TOOLCHAIN_CXX_BINARY_clang="clang++"
31324  TOOLCHAIN_CXX_BINARY_gcc="g++"
31325  TOOLCHAIN_CXX_BINARY_microsoft="cl"
31326  TOOLCHAIN_CXX_BINARY_solstudio="CC"
31327  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
31328
31329  # Use indirect variable referencing
31330  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
31331  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31332  toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
31333  TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
31334  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
31335  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
31336  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
31337  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
31338
31339
31340  # Define filename patterns
31341  if test "x$OPENJDK_TARGET_OS" = xwindows; then
31342    LIBRARY_PREFIX=
31343    SHARED_LIBRARY_SUFFIX='.dll'
31344    STATIC_LIBRARY_SUFFIX='.lib'
31345    SHARED_LIBRARY='$1.dll'
31346    STATIC_LIBRARY='$1.lib'
31347    OBJ_SUFFIX='.obj'
31348    EXE_SUFFIX='.exe'
31349  else
31350    LIBRARY_PREFIX=lib
31351    SHARED_LIBRARY_SUFFIX='.so'
31352    STATIC_LIBRARY_SUFFIX='.a'
31353    SHARED_LIBRARY='lib$1.so'
31354    STATIC_LIBRARY='lib$1.a'
31355    OBJ_SUFFIX='.o'
31356    EXE_SUFFIX=''
31357    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31358      # For full static builds, we're overloading the SHARED_LIBRARY
31359      # variables in order to limit the amount of changes required.
31360      # It would be better to remove SHARED and just use LIBRARY and
31361      # LIBRARY_SUFFIX for libraries that can be built either
31362      # shared or static and use STATIC_* for libraries that are
31363      # always built statically.
31364      if test "x$STATIC_BUILD" = xtrue; then
31365        SHARED_LIBRARY='lib$1.a'
31366        SHARED_LIBRARY_SUFFIX='.a'
31367      else
31368        SHARED_LIBRARY='lib$1.dylib'
31369        SHARED_LIBRARY_SUFFIX='.dylib'
31370      fi
31371    fi
31372  fi
31373
31374
31375
31376
31377
31378
31379
31380
31381
31382
31383  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
31384    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
31385$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
31386  else
31387    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
31388$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
31389  fi
31390
31391
31392# User supplied flags should be used when configure detects compilers
31393
31394  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
31395    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
31396$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
31397  fi
31398
31399  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
31400    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
31401$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
31402  fi
31403
31404  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
31405    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
31406$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
31407  fi
31408
31409
31410# Check whether --with-extra-cflags was given.
31411if test "${with_extra_cflags+set}" = set; then :
31412  withval=$with_extra_cflags;
31413fi
31414
31415
31416
31417# Check whether --with-extra-cxxflags was given.
31418if test "${with_extra_cxxflags+set}" = set; then :
31419  withval=$with_extra_cxxflags;
31420fi
31421
31422
31423
31424# Check whether --with-extra-ldflags was given.
31425if test "${with_extra_ldflags+set}" = set; then :
31426  withval=$with_extra_ldflags;
31427fi
31428
31429
31430  EXTRA_CFLAGS="$with_extra_cflags"
31431  EXTRA_CXXFLAGS="$with_extra_cxxflags"
31432  EXTRA_LDFLAGS="$with_extra_ldflags"
31433
31434  # Hotspot needs these set in their legacy form
31435  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
31436  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
31437  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
31438
31439
31440
31441
31442
31443
31444
31445
31446
31447  # The global CFLAGS and LDLAGS variables are used by configure tests and
31448  # should include the extra parameters
31449  CFLAGS="$EXTRA_CFLAGS"
31450  CXXFLAGS="$EXTRA_CXXFLAGS"
31451  LDFLAGS="$EXTRA_LDFLAGS"
31452  CPPFLAGS=""
31453
31454# The sysroot cflags are needed for configure to be able to run the compilers
31455
31456  if test "x$SYSROOT" != "x"; then
31457    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31458      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31459        # Solaris Studio does not have a concept of sysroot. Instead we must
31460        # make sure the default include and lib dirs are appended to each
31461        # compile and link command line. Must also add -I-xbuiltin to enable
31462        # inlining of system functions and intrinsics.
31463        SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
31464        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
31465            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
31466      fi
31467    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
31468      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
31469      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
31470    elif test "x$TOOLCHAIN_TYPE" = xclang; then
31471      SYSROOT_CFLAGS="-isysroot $SYSROOT"
31472      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
31473    fi
31474    # Propagate the sysroot args to hotspot
31475    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
31476    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
31477    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
31478    # The global CFLAGS and LDFLAGS variables need these for configure to function
31479    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
31480    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
31481    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
31482    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
31483  fi
31484
31485  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31486    # We also need -iframework<path>/System/Library/Frameworks
31487    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31488    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31489    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
31490    # set this here so it doesn't have to be peppered throughout the forest
31491    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31492    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31493  fi
31494
31495
31496
31497
31498
31499# Then detect the actual binaries needed
31500
31501  # FIXME: Is this needed?
31502  ac_ext=cpp
31503ac_cpp='$CXXCPP $CPPFLAGS'
31504ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31505ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31506ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31507
31508
31509  # Store the CFLAGS etc passed to the configure script.
31510  ORG_CFLAGS="$CFLAGS"
31511  ORG_CXXFLAGS="$CXXFLAGS"
31512
31513  # autoconf magic only relies on PATH, so update it if tools dir is specified
31514  OLD_PATH="$PATH"
31515
31516  # On Windows, we need to detect the visual studio installation first.
31517  # This will change the PATH, but we need to keep that new PATH even
31518  # after toolchain detection is done, since the compiler (on x86) uses
31519  # it for DLL resolution in runtime.
31520  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
31521      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
31522
31523  # Store path to cygwin link.exe to help excluding it when searching for
31524  # VS linker. This must be done before changing the PATH when looking for VS.
31525  # Extract the first word of "link", so it can be a program name with args.
31526set dummy link; ac_word=$2
31527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31528$as_echo_n "checking for $ac_word... " >&6; }
31529if ${ac_cv_path_CYGWIN_LINK+:} false; then :
31530  $as_echo_n "(cached) " >&6
31531else
31532  case $CYGWIN_LINK in
31533  [\\/]* | ?:[\\/]*)
31534  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
31535  ;;
31536  *)
31537  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31538for as_dir in $PATH
31539do
31540  IFS=$as_save_IFS
31541  test -z "$as_dir" && as_dir=.
31542    for ac_exec_ext in '' $ac_executable_extensions; do
31543  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31544    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
31545    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31546    break 2
31547  fi
31548done
31549  done
31550IFS=$as_save_IFS
31551
31552  ;;
31553esac
31554fi
31555CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
31556if test -n "$CYGWIN_LINK"; then
31557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
31558$as_echo "$CYGWIN_LINK" >&6; }
31559else
31560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31561$as_echo "no" >&6; }
31562fi
31563
31564
31565  if test "x$CYGWIN_LINK" != x; then
31566    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
31567$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
31568    "$CYGWIN_LINK" --version > /dev/null
31569    if test $? -eq 0 ; then
31570      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31571$as_echo "yes" >&6; }
31572    else
31573      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31574$as_echo "no" >&6; }
31575      # This might be the VS linker. Don't exclude it later on.
31576      CYGWIN_LINK=""
31577    fi
31578  fi
31579
31580  # First-hand choice is to locate and run the vsvars bat file.
31581
31582
31583# Check whether --with-toolchain-version was given.
31584if test "${with_toolchain_version+set}" = set; then :
31585  withval=$with_toolchain_version;
31586fi
31587
31588
31589  if test "x$with_toolchain_version" = xlist; then
31590    # List all toolchains
31591    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
31592$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
31593    for version in $VALID_VS_VERSIONS; do
31594      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
31595      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
31596    done
31597
31598    exit 0
31599  elif test "x$DEVKIT_VS_VERSION" != x; then
31600    VS_VERSION=$DEVKIT_VS_VERSION
31601    TOOLCHAIN_VERSION=$VS_VERSION
31602    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
31603    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
31604    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
31605    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
31606    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31607    VS_PATH="$TOOLCHAIN_PATH:$PATH"
31608
31609    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
31610    # can still be exported as INCLUDE for compiler invocations without
31611    # SYSROOT_CFLAGS
31612    OLDIFS="$IFS"
31613    IFS=";"
31614    for i in $DEVKIT_VS_INCLUDE; do
31615      ipath=$i
31616
31617  unix_path="$ipath"
31618  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31619    windows_path=`$CYGPATH -m "$unix_path"`
31620    ipath="$windows_path"
31621  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31622    windows_path=`cmd //c echo $unix_path`
31623    ipath="$windows_path"
31624  fi
31625
31626      VS_INCLUDE="$VS_INCLUDE;$ipath"
31627    done
31628    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
31629    # as LIB for compiler invocations without SYSROOT_LDFLAGS
31630    for i in $DEVKIT_VS_LIB; do
31631      libpath=$i
31632
31633  unix_path="$libpath"
31634  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31635    windows_path=`$CYGPATH -m "$unix_path"`
31636    libpath="$windows_path"
31637  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31638    windows_path=`cmd //c echo $unix_path`
31639    libpath="$windows_path"
31640  fi
31641
31642      VS_LIB="$VS_LIB;$libpath"
31643    done
31644    IFS="$OLDIFS"
31645
31646    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
31647$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
31648
31649  elif test "x$with_toolchain_version" != x; then
31650    # User override; check that it is valid
31651    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
31652      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
31653$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
31654      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
31655$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
31656      as_fn_error $? "Cannot continue." "$LINENO" 5
31657    fi
31658    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
31659  else
31660    # No flag given, use default
31661    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
31662  fi
31663
31664  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
31665
31666  VS_VERSION="$VS_VERSION"
31667  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
31668  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
31669  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
31670  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
31671
31672  # When using --with-tools-dir, assume it points to the correct and default
31673  # version of Visual Studio or that --with-toolchain-version was also set.
31674  if test "x$with_tools_dir" != x; then
31675
31676  if test "x$VS_ENV_CMD" = x; then
31677    VS_VERSION="${VS_VERSION}"
31678    VS_BASE="$with_tools_dir/../.."
31679    METHOD="--with-tools-dir"
31680
31681    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31682      VCVARSFILE="vc/bin/vcvars32.bat"
31683    else
31684      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31685    fi
31686
31687
31688  windows_path="$VS_BASE"
31689  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31690    unix_path=`$CYGPATH -u "$windows_path"`
31691    VS_BASE="$unix_path"
31692  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31693    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31694    VS_BASE="$unix_path"
31695  fi
31696
31697    if test -d "$VS_BASE"; then
31698      if test -f "$VS_BASE/$VCVARSFILE"; then
31699        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31700$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31701        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31702        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31703        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31704        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31705      else
31706        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31707$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31708        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31709$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31710      fi
31711    fi
31712  fi
31713
31714
31715  if test "x$VS_ENV_CMD" = x; then
31716    VS_VERSION="${VS_VERSION}"
31717    VS_BASE="$with_tools_dir/../../.."
31718    METHOD="--with-tools-dir"
31719
31720    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31721      VCVARSFILE="vc/bin/vcvars32.bat"
31722    else
31723      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31724    fi
31725
31726
31727  windows_path="$VS_BASE"
31728  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31729    unix_path=`$CYGPATH -u "$windows_path"`
31730    VS_BASE="$unix_path"
31731  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31732    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31733    VS_BASE="$unix_path"
31734  fi
31735
31736    if test -d "$VS_BASE"; then
31737      if test -f "$VS_BASE/$VCVARSFILE"; then
31738        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31739$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31740        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31741        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31742        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31743        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31744      else
31745        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31746$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31747        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31748$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31749      fi
31750    fi
31751  fi
31752
31753    if test "x$VS_ENV_CMD" = x; then
31754      # Having specified an argument which is incorrect will produce an instant failure;
31755      # we should not go on looking
31756      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
31757$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
31758      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
31759$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
31760      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
31761$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
31762      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
31763    fi
31764  fi
31765
31766  VS_ENV_CMD=""
31767  VS_ENV_ARGS=""
31768
31769  if test "x$VS_COMNTOOLS" != x; then
31770
31771  if test "x$VS_ENV_CMD" = x; then
31772    VS_VERSION="${VS_VERSION}"
31773    VS_BASE="$VS_COMNTOOLS/../.."
31774    METHOD="$VS_COMNTOOLS_VAR variable"
31775
31776    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31777      VCVARSFILE="vc/bin/vcvars32.bat"
31778    else
31779      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31780    fi
31781
31782
31783  windows_path="$VS_BASE"
31784  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31785    unix_path=`$CYGPATH -u "$windows_path"`
31786    VS_BASE="$unix_path"
31787  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31788    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31789    VS_BASE="$unix_path"
31790  fi
31791
31792    if test -d "$VS_BASE"; then
31793      if test -f "$VS_BASE/$VCVARSFILE"; then
31794        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31795$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31796        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31797        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31798        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31799        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31800      else
31801        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31802$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31803        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31804$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31805      fi
31806    fi
31807  fi
31808
31809  fi
31810  if test "x$PROGRAMFILES" != x; then
31811
31812  if test "x$VS_ENV_CMD" = x; then
31813    VS_VERSION="${VS_VERSION}"
31814    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
31815    METHOD="well-known name"
31816
31817    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31818      VCVARSFILE="vc/bin/vcvars32.bat"
31819    else
31820      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31821    fi
31822
31823
31824  windows_path="$VS_BASE"
31825  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31826    unix_path=`$CYGPATH -u "$windows_path"`
31827    VS_BASE="$unix_path"
31828  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31829    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31830    VS_BASE="$unix_path"
31831  fi
31832
31833    if test -d "$VS_BASE"; then
31834      if test -f "$VS_BASE/$VCVARSFILE"; then
31835        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31836$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31837        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31838        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31839        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31840        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31841      else
31842        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31843$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31844        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31845$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31846      fi
31847    fi
31848  fi
31849
31850  fi
31851  # Work around the insanely named ProgramFiles(x86) env variable
31852  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
31853  if test "x$PROGRAMFILES_X86" != x; then
31854
31855  if test "x$VS_ENV_CMD" = x; then
31856    VS_VERSION="${VS_VERSION}"
31857    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
31858    METHOD="well-known name"
31859
31860    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31861      VCVARSFILE="vc/bin/vcvars32.bat"
31862    else
31863      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31864    fi
31865
31866
31867  windows_path="$VS_BASE"
31868  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31869    unix_path=`$CYGPATH -u "$windows_path"`
31870    VS_BASE="$unix_path"
31871  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31872    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31873    VS_BASE="$unix_path"
31874  fi
31875
31876    if test -d "$VS_BASE"; then
31877      if test -f "$VS_BASE/$VCVARSFILE"; then
31878        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31879$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31880        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31881        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31882        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31883        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31884      else
31885        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31886$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31887        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31888$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31889      fi
31890    fi
31891  fi
31892
31893  fi
31894
31895  if test "x$VS_ENV_CMD" = x; then
31896    VS_VERSION="${VS_VERSION}"
31897    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
31898    METHOD="well-known name"
31899
31900    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31901      VCVARSFILE="vc/bin/vcvars32.bat"
31902    else
31903      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31904    fi
31905
31906
31907  windows_path="$VS_BASE"
31908  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31909    unix_path=`$CYGPATH -u "$windows_path"`
31910    VS_BASE="$unix_path"
31911  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31912    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31913    VS_BASE="$unix_path"
31914  fi
31915
31916    if test -d "$VS_BASE"; then
31917      if test -f "$VS_BASE/$VCVARSFILE"; then
31918        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31919$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31920        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31921        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31922        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31923        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31924      else
31925        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31926$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31927        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31928$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31929      fi
31930    fi
31931  fi
31932
31933
31934  if test "x$VS_ENV_CMD" = x; then
31935    VS_VERSION="${VS_VERSION}"
31936    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
31937    METHOD="well-known name"
31938
31939    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31940      VCVARSFILE="vc/bin/vcvars32.bat"
31941    else
31942      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31943    fi
31944
31945
31946  windows_path="$VS_BASE"
31947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31948    unix_path=`$CYGPATH -u "$windows_path"`
31949    VS_BASE="$unix_path"
31950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31951    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31952    VS_BASE="$unix_path"
31953  fi
31954
31955    if test -d "$VS_BASE"; then
31956      if test -f "$VS_BASE/$VCVARSFILE"; then
31957        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31958$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31959        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31960        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31961        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31962        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31963      else
31964        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31965$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31966        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31967$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31968      fi
31969    fi
31970  fi
31971
31972
31973  if test "x$SDK_INSTALL_DIR" != x; then
31974    if test "x$ProgramW6432" != x; then
31975
31976  if test "x$VS_ENV_CMD" = x; then
31977    VS_VERSION="${VS_VERSION}"
31978    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
31979    METHOD="well-known name"
31980
31981  windows_path="$WIN_SDK_BASE"
31982  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31983    unix_path=`$CYGPATH -u "$windows_path"`
31984    WIN_SDK_BASE="$unix_path"
31985  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31986    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31987    WIN_SDK_BASE="$unix_path"
31988  fi
31989
31990    if test -d "$WIN_SDK_BASE"; then
31991      # There have been cases of partial or broken SDK installations. A missing
31992      # lib dir is not going to work.
31993      if test ! -d "$WIN_SDK_BASE/lib"; then
31994        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31995$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31996        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31997$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31998      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31999        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32000$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32001        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32002        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32003          VS_ENV_ARGS="/x86"
32004        else
32005          VS_ENV_ARGS="/x64"
32006        fi
32007        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32008        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32009        # TODO: improve detection for other versions of SDK
32010        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32011      else
32012        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32013$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32014        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32015$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32016      fi
32017    fi
32018  fi
32019
32020    fi
32021    if test "x$PROGRAMW6432" != x; then
32022
32023  if test "x$VS_ENV_CMD" = x; then
32024    VS_VERSION="${VS_VERSION}"
32025    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
32026    METHOD="well-known name"
32027
32028  windows_path="$WIN_SDK_BASE"
32029  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32030    unix_path=`$CYGPATH -u "$windows_path"`
32031    WIN_SDK_BASE="$unix_path"
32032  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32033    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32034    WIN_SDK_BASE="$unix_path"
32035  fi
32036
32037    if test -d "$WIN_SDK_BASE"; then
32038      # There have been cases of partial or broken SDK installations. A missing
32039      # lib dir is not going to work.
32040      if test ! -d "$WIN_SDK_BASE/lib"; then
32041        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32042$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32043        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32044$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32045      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32046        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32047$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32048        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32049        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32050          VS_ENV_ARGS="/x86"
32051        else
32052          VS_ENV_ARGS="/x64"
32053        fi
32054        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32055        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32056        # TODO: improve detection for other versions of SDK
32057        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32058      else
32059        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32060$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32061        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32062$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32063      fi
32064    fi
32065  fi
32066
32067    fi
32068    if test "x$PROGRAMFILES" != x; then
32069
32070  if test "x$VS_ENV_CMD" = x; then
32071    VS_VERSION="${VS_VERSION}"
32072    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
32073    METHOD="well-known name"
32074
32075  windows_path="$WIN_SDK_BASE"
32076  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32077    unix_path=`$CYGPATH -u "$windows_path"`
32078    WIN_SDK_BASE="$unix_path"
32079  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32080    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32081    WIN_SDK_BASE="$unix_path"
32082  fi
32083
32084    if test -d "$WIN_SDK_BASE"; then
32085      # There have been cases of partial or broken SDK installations. A missing
32086      # lib dir is not going to work.
32087      if test ! -d "$WIN_SDK_BASE/lib"; then
32088        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32089$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32090        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32091$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32092      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32093        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32094$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32095        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32096        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32097          VS_ENV_ARGS="/x86"
32098        else
32099          VS_ENV_ARGS="/x64"
32100        fi
32101        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32102        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32103        # TODO: improve detection for other versions of SDK
32104        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32105      else
32106        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32107$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32108        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32109$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32110      fi
32111    fi
32112  fi
32113
32114    fi
32115
32116  if test "x$VS_ENV_CMD" = x; then
32117    VS_VERSION="${VS_VERSION}"
32118    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
32119    METHOD="well-known name"
32120
32121  windows_path="$WIN_SDK_BASE"
32122  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32123    unix_path=`$CYGPATH -u "$windows_path"`
32124    WIN_SDK_BASE="$unix_path"
32125  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32126    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32127    WIN_SDK_BASE="$unix_path"
32128  fi
32129
32130    if test -d "$WIN_SDK_BASE"; then
32131      # There have been cases of partial or broken SDK installations. A missing
32132      # lib dir is not going to work.
32133      if test ! -d "$WIN_SDK_BASE/lib"; then
32134        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32135$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32136        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32137$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32138      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32139        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32140$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32141        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32142        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32143          VS_ENV_ARGS="/x86"
32144        else
32145          VS_ENV_ARGS="/x64"
32146        fi
32147        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32148        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32149        # TODO: improve detection for other versions of SDK
32150        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32151      else
32152        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32153$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32154        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32155$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32156      fi
32157    fi
32158  fi
32159
32160
32161  if test "x$VS_ENV_CMD" = x; then
32162    VS_VERSION="${VS_VERSION}"
32163    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
32164    METHOD="well-known name"
32165
32166  windows_path="$WIN_SDK_BASE"
32167  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32168    unix_path=`$CYGPATH -u "$windows_path"`
32169    WIN_SDK_BASE="$unix_path"
32170  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32171    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32172    WIN_SDK_BASE="$unix_path"
32173  fi
32174
32175    if test -d "$WIN_SDK_BASE"; then
32176      # There have been cases of partial or broken SDK installations. A missing
32177      # lib dir is not going to work.
32178      if test ! -d "$WIN_SDK_BASE/lib"; then
32179        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32180$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32181        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32182$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32183      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32184        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32185$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32186        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32187        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32188          VS_ENV_ARGS="/x86"
32189        else
32190          VS_ENV_ARGS="/x64"
32191        fi
32192        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32193        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32194        # TODO: improve detection for other versions of SDK
32195        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32196      else
32197        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32198$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32199        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32200$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32201      fi
32202    fi
32203  fi
32204
32205  fi
32206
32207    if test "x$VS_ENV_CMD" != x; then
32208      TOOLCHAIN_VERSION=$VS_VERSION
32209      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32210      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32211      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32212      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32213      # The rest of the variables are already evaled while probing
32214      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
32215$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
32216      break
32217    fi
32218  done
32219
32220
32221  # If we have a devkit, skip all of the below.
32222  if test "x$DEVKIT_VS_VERSION" = x; then
32223    if test "x$VS_ENV_CMD" != x; then
32224      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
32225
32226  # Only process if variable expands to non-empty
32227
32228  if test "x$VS_ENV_CMD" != x; then
32229    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32230
32231  # First separate the path from the arguments. This will split at the first
32232  # space.
32233  complete="$VS_ENV_CMD"
32234  path="${complete%% *}"
32235  tmp="$complete EOL"
32236  arguments="${tmp#* }"
32237
32238  # Input might be given as Windows format, start by converting to
32239  # unix format.
32240  new_path=`$CYGPATH -u "$path"`
32241
32242  # Now try to locate executable using which
32243  new_path=`$WHICH "$new_path" 2> /dev/null`
32244  # bat and cmd files are not always considered executable in cygwin causing which
32245  # to not find them
32246  if test "x$new_path" = x \
32247      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32248      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32249    new_path=`$CYGPATH -u "$path"`
32250  fi
32251  if test "x$new_path" = x; then
32252    # Oops. Which didn't find the executable.
32253    # The splitting of arguments from the executable at a space might have been incorrect,
32254    # since paths with space are more likely in Windows. Give it another try with the whole
32255    # argument.
32256    path="$complete"
32257    arguments="EOL"
32258    new_path=`$CYGPATH -u "$path"`
32259    new_path=`$WHICH "$new_path" 2> /dev/null`
32260    # bat and cmd files are not always considered executable in cygwin causing which
32261    # to not find them
32262    if test "x$new_path" = x \
32263        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32264        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32265      new_path=`$CYGPATH -u "$path"`
32266    fi
32267    if test "x$new_path" = x; then
32268      # It's still not found. Now this is an unrecoverable error.
32269      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32270$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32271      has_space=`$ECHO "$complete" | $GREP " "`
32272      if test "x$has_space" != x; then
32273        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32274$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32275      fi
32276      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32277    fi
32278  fi
32279
32280  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32281  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32282  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32283  # "foo.exe" is OK but "foo" is an error.
32284  #
32285  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32286  # It is also a way to make sure we got the proper file name for the real test later on.
32287  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32288  if test "x$test_shortpath" = x; then
32289    # Short path failed, file does not exist as specified.
32290    # Try adding .exe or .cmd
32291    if test -f "${new_path}.exe"; then
32292      input_to_shortpath="${new_path}.exe"
32293    elif test -f "${new_path}.cmd"; then
32294      input_to_shortpath="${new_path}.cmd"
32295    else
32296      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
32297$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
32298      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32299$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32300      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32301    fi
32302  else
32303    input_to_shortpath="$new_path"
32304  fi
32305
32306  # Call helper function which possibly converts this using DOS-style short mode.
32307  # If so, the updated path is stored in $new_path.
32308  new_path="$input_to_shortpath"
32309
32310  input_path="$input_to_shortpath"
32311  # Check if we need to convert this using DOS-style short mode. If the path
32312  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32313  # take no chances and rewrite it.
32314  # Note: m4 eats our [], so we need to use [ and ] instead.
32315  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32316  if test "x$has_forbidden_chars" != x; then
32317    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32318    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32319    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32320    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32321      # Going to short mode and back again did indeed matter. Since short mode is
32322      # case insensitive, let's make it lowercase to improve readability.
32323      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32324      # Now convert it back to Unix-style (cygpath)
32325      input_path=`$CYGPATH -u "$shortmode_path"`
32326      new_path="$input_path"
32327    fi
32328  fi
32329
32330  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32331  if test "x$test_cygdrive_prefix" = x; then
32332    # As a simple fix, exclude /usr/bin since it's not a real path.
32333    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32334      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32335      # a path prefixed by /cygdrive for fixpath to work.
32336      new_path="$CYGWIN_ROOT_PATH$input_path"
32337    fi
32338  fi
32339
32340  # remove trailing .exe if any
32341  new_path="${new_path/%.exe/}"
32342
32343    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32344
32345  # First separate the path from the arguments. This will split at the first
32346  # space.
32347  complete="$VS_ENV_CMD"
32348  path="${complete%% *}"
32349  tmp="$complete EOL"
32350  arguments="${tmp#* }"
32351
32352  # Input might be given as Windows format, start by converting to
32353  # unix format.
32354  new_path="$path"
32355
32356  windows_path="$new_path"
32357  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32358    unix_path=`$CYGPATH -u "$windows_path"`
32359    new_path="$unix_path"
32360  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32361    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32362    new_path="$unix_path"
32363  fi
32364
32365
32366  # Now try to locate executable using which
32367  new_path=`$WHICH "$new_path" 2> /dev/null`
32368
32369  if test "x$new_path" = x; then
32370    # Oops. Which didn't find the executable.
32371    # The splitting of arguments from the executable at a space might have been incorrect,
32372    # since paths with space are more likely in Windows. Give it another try with the whole
32373    # argument.
32374    path="$complete"
32375    arguments="EOL"
32376    new_path="$path"
32377
32378  windows_path="$new_path"
32379  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32380    unix_path=`$CYGPATH -u "$windows_path"`
32381    new_path="$unix_path"
32382  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32383    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32384    new_path="$unix_path"
32385  fi
32386
32387
32388    new_path=`$WHICH "$new_path" 2> /dev/null`
32389    # bat and cmd files are not always considered executable in MSYS causing which
32390    # to not find them
32391    if test "x$new_path" = x \
32392        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32393        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32394      new_path="$path"
32395
32396  windows_path="$new_path"
32397  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32398    unix_path=`$CYGPATH -u "$windows_path"`
32399    new_path="$unix_path"
32400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32401    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32402    new_path="$unix_path"
32403  fi
32404
32405    fi
32406
32407    if test "x$new_path" = x; then
32408      # It's still not found. Now this is an unrecoverable error.
32409      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32410$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32411      has_space=`$ECHO "$complete" | $GREP " "`
32412      if test "x$has_space" != x; then
32413        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32414$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32415      fi
32416      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32417    fi
32418  fi
32419
32420  # Now new_path has a complete unix path to the binary
32421  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32422    # Keep paths in /bin as-is, but remove trailing .exe if any
32423    new_path="${new_path/%.exe/}"
32424    # Do not save /bin paths to all_fixpath_prefixes!
32425  else
32426    # Not in mixed or Windows style, start by that.
32427    new_path=`cmd //c echo $new_path`
32428
32429  input_path="$new_path"
32430  # Check if we need to convert this using DOS-style short mode. If the path
32431  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32432  # take no chances and rewrite it.
32433  # Note: m4 eats our [], so we need to use [ and ] instead.
32434  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32435  if test "x$has_forbidden_chars" != x; then
32436    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32437    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32438  fi
32439
32440    # Output is in $new_path
32441
32442  windows_path="$new_path"
32443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32444    unix_path=`$CYGPATH -u "$windows_path"`
32445    new_path="$unix_path"
32446  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32447    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32448    new_path="$unix_path"
32449  fi
32450
32451    # remove trailing .exe if any
32452    new_path="${new_path/%.exe/}"
32453
32454    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32455    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32456  fi
32457
32458    else
32459      # We're on a unix platform. Hooray! :)
32460      # First separate the path from the arguments. This will split at the first
32461      # space.
32462      complete="$VS_ENV_CMD"
32463      path="${complete%% *}"
32464      tmp="$complete EOL"
32465      arguments="${tmp#* }"
32466
32467      # Cannot rely on the command "which" here since it doesn't always work.
32468      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32469      if test -z "$is_absolute_path"; then
32470        # Path to executable is not absolute. Find it.
32471        IFS_save="$IFS"
32472        IFS=:
32473        for p in $PATH; do
32474          if test -f "$p/$path" && test -x "$p/$path"; then
32475            new_path="$p/$path"
32476            break
32477          fi
32478        done
32479        IFS="$IFS_save"
32480      else
32481        # This is an absolute path, we can use it without further modifications.
32482        new_path="$path"
32483      fi
32484
32485      if test "x$new_path" = x; then
32486        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32487$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32488        has_space=`$ECHO "$complete" | $GREP " "`
32489        if test "x$has_space" != x; then
32490          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32491$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32492        fi
32493        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32494      fi
32495    fi
32496
32497    # Now join together the path and the arguments once again
32498    if test "x$arguments" != xEOL; then
32499      new_complete="$new_path ${arguments% *}"
32500    else
32501      new_complete="$new_path"
32502    fi
32503
32504    if test "x$complete" != "x$new_complete"; then
32505      VS_ENV_CMD="$new_complete"
32506      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
32507$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
32508    fi
32509  fi
32510
32511
32512      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
32513      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
32514$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
32515
32516      # We need to create a couple of temporary files.
32517      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
32518      $MKDIR -p $VS_ENV_TMP_DIR
32519
32520      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
32521      # Instead create a shell script which will set the relevant variables when run.
32522      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
32523
32524  unix_path="$WINPATH_VS_ENV_CMD"
32525  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32526    windows_path=`$CYGPATH -m "$unix_path"`
32527    WINPATH_VS_ENV_CMD="$windows_path"
32528  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32529    windows_path=`cmd //c echo $unix_path`
32530    WINPATH_VS_ENV_CMD="$windows_path"
32531  fi
32532
32533      WINPATH_BASH="$BASH"
32534
32535  unix_path="$WINPATH_BASH"
32536  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32537    windows_path=`$CYGPATH -m "$unix_path"`
32538    WINPATH_BASH="$windows_path"
32539  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32540    windows_path=`cmd //c echo $unix_path`
32541    WINPATH_BASH="$windows_path"
32542  fi
32543
32544
32545      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
32546      # script (executable by bash) that will setup the important variables.
32547      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
32548      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
32549      # This will end up something like:
32550      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
32551      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
32552      # These will end up something like:
32553      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
32554      # The trailing space for everyone except PATH is no typo, but is needed due
32555      # to trailing \ in the Windows paths. These will be stripped later.
32556      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
32557          >> $EXTRACT_VC_ENV_BAT_FILE
32558      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
32559          >> $EXTRACT_VC_ENV_BAT_FILE
32560      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
32561          >> $EXTRACT_VC_ENV_BAT_FILE
32562      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
32563          >> $EXTRACT_VC_ENV_BAT_FILE
32564      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
32565          >> $EXTRACT_VC_ENV_BAT_FILE
32566      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
32567          >> $EXTRACT_VC_ENV_BAT_FILE
32568
32569      # Now execute the newly created bat file.
32570      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
32571      # Change directory so we don't need to mess with Windows paths in redirects.
32572      cd $VS_ENV_TMP_DIR
32573      cmd /c extract-vs-env.bat | $CAT
32574      cd $CURDIR
32575
32576      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
32577        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
32578$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
32579        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32580$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32581        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32582$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32583        as_fn_error $? "Cannot continue" "$LINENO" 5
32584      fi
32585
32586      # Now set all paths and other env variables. This will allow the rest of
32587      # the configure script to find and run the compiler in the proper way.
32588      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
32589$as_echo "$as_me: Setting extracted environment variables" >&6;}
32590      . $VS_ENV_TMP_DIR/set-vs-env.sh
32591      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
32592      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
32593    else
32594      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
32595      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
32596$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
32597    fi
32598  fi
32599
32600  # At this point, we should have correct variables in the environment, or we can't continue.
32601  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
32602$as_echo_n "checking for Visual Studio variables... " >&6; }
32603
32604  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
32605      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
32606    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
32607      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
32608$as_echo "present but broken" >&6; }
32609      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
32610    else
32611      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
32612$as_echo "ok" >&6; }
32613      # Remove any trailing "\" ";" and " " from the variables.
32614      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
32615      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
32616      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
32617      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
32618      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
32619      # Remove any paths containing # (typically F#) as that messes up make. This
32620      # is needed if visual studio was installed with F# support.
32621      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
32622
32623
32624
32625
32626
32627      # Convert VS_INCLUDE into SYSROOT_CFLAGS
32628      OLDIFS="$IFS"
32629      IFS=";"
32630      for i in $VS_INCLUDE; do
32631        ipath=$i
32632        # Only process non-empty elements
32633        if test "x$ipath" != x; then
32634          IFS="$OLDIFS"
32635          # Check that directory exists before calling fixup_path
32636          testpath=$ipath
32637
32638  windows_path="$testpath"
32639  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32640    unix_path=`$CYGPATH -u "$windows_path"`
32641    testpath="$unix_path"
32642  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32643    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32644    testpath="$unix_path"
32645  fi
32646
32647          if test -d "$testpath"; then
32648
32649  # Only process if variable expands to non-empty
32650
32651  if test "x$ipath" != x; then
32652    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32653
32654  # Input might be given as Windows format, start by converting to
32655  # unix format.
32656  path="$ipath"
32657  new_path=`$CYGPATH -u "$path"`
32658
32659  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32660  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32661  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32662  # "foo.exe" is OK but "foo" is an error.
32663  #
32664  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32665  # It is also a way to make sure we got the proper file name for the real test later on.
32666  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32667  if test "x$test_shortpath" = x; then
32668    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32669$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32670    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
32671  fi
32672
32673  # Call helper function which possibly converts this using DOS-style short mode.
32674  # If so, the updated path is stored in $new_path.
32675
32676  input_path="$new_path"
32677  # Check if we need to convert this using DOS-style short mode. If the path
32678  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32679  # take no chances and rewrite it.
32680  # Note: m4 eats our [], so we need to use [ and ] instead.
32681  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32682  if test "x$has_forbidden_chars" != x; then
32683    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32684    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32685    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32686    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32687      # Going to short mode and back again did indeed matter. Since short mode is
32688      # case insensitive, let's make it lowercase to improve readability.
32689      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32690      # Now convert it back to Unix-style (cygpath)
32691      input_path=`$CYGPATH -u "$shortmode_path"`
32692      new_path="$input_path"
32693    fi
32694  fi
32695
32696  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32697  if test "x$test_cygdrive_prefix" = x; then
32698    # As a simple fix, exclude /usr/bin since it's not a real path.
32699    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32700      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32701      # a path prefixed by /cygdrive for fixpath to work.
32702      new_path="$CYGWIN_ROOT_PATH$input_path"
32703    fi
32704  fi
32705
32706
32707  if test "x$path" != "x$new_path"; then
32708    ipath="$new_path"
32709    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32710$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32711  fi
32712
32713    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32714
32715  path="$ipath"
32716  has_colon=`$ECHO $path | $GREP ^.:`
32717  new_path="$path"
32718  if test "x$has_colon" = x; then
32719    # Not in mixed or Windows style, start by that.
32720    new_path=`cmd //c echo $path`
32721  fi
32722
32723
32724  input_path="$new_path"
32725  # Check if we need to convert this using DOS-style short mode. If the path
32726  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32727  # take no chances and rewrite it.
32728  # Note: m4 eats our [], so we need to use [ and ] instead.
32729  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32730  if test "x$has_forbidden_chars" != x; then
32731    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32732    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32733  fi
32734
32735
32736  windows_path="$new_path"
32737  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32738    unix_path=`$CYGPATH -u "$windows_path"`
32739    new_path="$unix_path"
32740  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32741    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32742    new_path="$unix_path"
32743  fi
32744
32745  if test "x$path" != "x$new_path"; then
32746    ipath="$new_path"
32747    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32748$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32749  fi
32750
32751  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32752  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32753
32754    else
32755      # We're on a unix platform. Hooray! :)
32756      path="$ipath"
32757      has_space=`$ECHO "$path" | $GREP " "`
32758      if test "x$has_space" != x; then
32759        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32760$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32761        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32762      fi
32763
32764      # Use eval to expand a potential ~
32765      eval path="$path"
32766      if test ! -f "$path" && test ! -d "$path"; then
32767        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
32768      fi
32769
32770      if test -d "$path"; then
32771        ipath="`cd "$path"; $THEPWDCMD -L`"
32772      else
32773        dir="`$DIRNAME "$path"`"
32774        base="`$BASENAME "$path"`"
32775        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
32776      fi
32777    fi
32778  fi
32779
32780            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
32781          fi
32782          IFS=";"
32783        fi
32784      done
32785      # Convert VS_LIB into SYSROOT_LDFLAGS
32786      for i in $VS_LIB; do
32787        libpath=$i
32788        # Only process non-empty elements
32789        if test "x$libpath" != x; then
32790          IFS="$OLDIFS"
32791          # Check that directory exists before calling fixup_path
32792          testpath=$libpath
32793
32794  windows_path="$testpath"
32795  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32796    unix_path=`$CYGPATH -u "$windows_path"`
32797    testpath="$unix_path"
32798  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32799    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32800    testpath="$unix_path"
32801  fi
32802
32803          if test -d "$testpath"; then
32804
32805  # Only process if variable expands to non-empty
32806
32807  if test "x$libpath" != x; then
32808    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32809
32810  # Input might be given as Windows format, start by converting to
32811  # unix format.
32812  path="$libpath"
32813  new_path=`$CYGPATH -u "$path"`
32814
32815  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32816  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32817  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32818  # "foo.exe" is OK but "foo" is an error.
32819  #
32820  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32821  # It is also a way to make sure we got the proper file name for the real test later on.
32822  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32823  if test "x$test_shortpath" = x; then
32824    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32825$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32826    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
32827  fi
32828
32829  # Call helper function which possibly converts this using DOS-style short mode.
32830  # If so, the updated path is stored in $new_path.
32831
32832  input_path="$new_path"
32833  # Check if we need to convert this using DOS-style short mode. If the path
32834  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32835  # take no chances and rewrite it.
32836  # Note: m4 eats our [], so we need to use [ and ] instead.
32837  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32838  if test "x$has_forbidden_chars" != x; then
32839    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32840    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32841    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32842    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32843      # Going to short mode and back again did indeed matter. Since short mode is
32844      # case insensitive, let's make it lowercase to improve readability.
32845      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32846      # Now convert it back to Unix-style (cygpath)
32847      input_path=`$CYGPATH -u "$shortmode_path"`
32848      new_path="$input_path"
32849    fi
32850  fi
32851
32852  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32853  if test "x$test_cygdrive_prefix" = x; then
32854    # As a simple fix, exclude /usr/bin since it's not a real path.
32855    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32856      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32857      # a path prefixed by /cygdrive for fixpath to work.
32858      new_path="$CYGWIN_ROOT_PATH$input_path"
32859    fi
32860  fi
32861
32862
32863  if test "x$path" != "x$new_path"; then
32864    libpath="$new_path"
32865    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32866$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32867  fi
32868
32869    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32870
32871  path="$libpath"
32872  has_colon=`$ECHO $path | $GREP ^.:`
32873  new_path="$path"
32874  if test "x$has_colon" = x; then
32875    # Not in mixed or Windows style, start by that.
32876    new_path=`cmd //c echo $path`
32877  fi
32878
32879
32880  input_path="$new_path"
32881  # Check if we need to convert this using DOS-style short mode. If the path
32882  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32883  # take no chances and rewrite it.
32884  # Note: m4 eats our [], so we need to use [ and ] instead.
32885  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32886  if test "x$has_forbidden_chars" != x; then
32887    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32888    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32889  fi
32890
32891
32892  windows_path="$new_path"
32893  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32894    unix_path=`$CYGPATH -u "$windows_path"`
32895    new_path="$unix_path"
32896  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32897    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32898    new_path="$unix_path"
32899  fi
32900
32901  if test "x$path" != "x$new_path"; then
32902    libpath="$new_path"
32903    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32904$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32905  fi
32906
32907  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32908  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32909
32910    else
32911      # We're on a unix platform. Hooray! :)
32912      path="$libpath"
32913      has_space=`$ECHO "$path" | $GREP " "`
32914      if test "x$has_space" != x; then
32915        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32916$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32917        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32918      fi
32919
32920      # Use eval to expand a potential ~
32921      eval path="$path"
32922      if test ! -f "$path" && test ! -d "$path"; then
32923        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
32924      fi
32925
32926      if test -d "$path"; then
32927        libpath="`cd "$path"; $THEPWDCMD -L`"
32928      else
32929        dir="`$DIRNAME "$path"`"
32930        base="`$BASENAME "$path"`"
32931        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
32932      fi
32933    fi
32934  fi
32935
32936            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
32937          fi
32938          IFS=";"
32939        fi
32940      done
32941      IFS="$OLDIFS"
32942    fi
32943  else
32944    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32945$as_echo "not found" >&6; }
32946
32947    if test "x$VS_ENV_CMD" = x; then
32948      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
32949$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
32950      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
32951$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
32952    else
32953      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
32954$as_echo "$as_me: Running the extraction script failed." >&6;}
32955    fi
32956    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32957$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32958    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32959$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32960    as_fn_error $? "Cannot continue" "$LINENO" 5
32961  fi
32962
32963    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
32964    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
32965    PATH="$VS_PATH"
32966    # The microsoft toolchain also requires INCLUDE and LIB to be set.
32967    export INCLUDE="$VS_INCLUDE"
32968    export LIB="$VS_LIB"
32969  else
32970    if test "x$XCODE_VERSION_OUTPUT" != x; then
32971      # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
32972      TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
32973      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
32974    else
32975      # Currently we do not define this for other toolchains. This might change as the need arise.
32976      TOOLCHAIN_VERSION=
32977    fi
32978  fi
32979
32980
32981  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
32982  # override all other locations.
32983  if test "x$TOOLCHAIN_PATH" != x; then
32984    PATH=$TOOLCHAIN_PATH:$PATH
32985  fi
32986
32987
32988  #
32989  # Setup the compilers (CC and CXX)
32990  #
32991
32992  COMPILER_NAME=C
32993  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
32994
32995  if test "x$CC" != x; then
32996    # User has supplied compiler name already, always let that override.
32997    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
32998$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
32999    if test "x`basename $CC`" = "x$CC"; then
33000      # A command without a complete path is provided, search $PATH.
33001
33002      for ac_prog in $CC
33003do
33004  # Extract the first word of "$ac_prog", so it can be a program name with args.
33005set dummy $ac_prog; ac_word=$2
33006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33007$as_echo_n "checking for $ac_word... " >&6; }
33008if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33009  $as_echo_n "(cached) " >&6
33010else
33011  case $POTENTIAL_CC in
33012  [\\/]* | ?:[\\/]*)
33013  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33014  ;;
33015  *)
33016  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33017for as_dir in $PATH
33018do
33019  IFS=$as_save_IFS
33020  test -z "$as_dir" && as_dir=.
33021    for ac_exec_ext in '' $ac_executable_extensions; do
33022  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33023    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33024    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33025    break 2
33026  fi
33027done
33028  done
33029IFS=$as_save_IFS
33030
33031  ;;
33032esac
33033fi
33034POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33035if test -n "$POTENTIAL_CC"; then
33036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33037$as_echo "$POTENTIAL_CC" >&6; }
33038else
33039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33040$as_echo "no" >&6; }
33041fi
33042
33043
33044  test -n "$POTENTIAL_CC" && break
33045done
33046
33047      if test "x$POTENTIAL_CC" != x; then
33048        CC=$POTENTIAL_CC
33049      else
33050        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
33051      fi
33052    else
33053      # Otherwise it might already be a complete path
33054      if test ! -x "$CC"; then
33055        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
33056      fi
33057    fi
33058  else
33059    # No user supplied value. Locate compiler ourselves.
33060
33061    # If we are cross compiling, assume cross compilation tools follows the
33062    # cross compilation standard where they are prefixed with the autoconf
33063    # standard name for the target. For example the binary
33064    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33065    # If we are not cross compiling, then the default compiler name will be
33066    # used.
33067
33068    CC=
33069    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33070    # before checking the rest of the PATH.
33071    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33072    # step, this should not be necessary.
33073    if test -n "$TOOLCHAIN_PATH"; then
33074      PATH_save="$PATH"
33075      PATH="$TOOLCHAIN_PATH"
33076      for ac_prog in $SEARCH_LIST
33077do
33078  # Extract the first word of "$ac_prog", so it can be a program name with args.
33079set dummy $ac_prog; ac_word=$2
33080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33081$as_echo_n "checking for $ac_word... " >&6; }
33082if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
33083  $as_echo_n "(cached) " >&6
33084else
33085  case $TOOLCHAIN_PATH_CC in
33086  [\\/]* | ?:[\\/]*)
33087  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33088  ;;
33089  *)
33090  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33091for as_dir in $PATH
33092do
33093  IFS=$as_save_IFS
33094  test -z "$as_dir" && as_dir=.
33095    for ac_exec_ext in '' $ac_executable_extensions; do
33096  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33097    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33098    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33099    break 2
33100  fi
33101done
33102  done
33103IFS=$as_save_IFS
33104
33105  ;;
33106esac
33107fi
33108TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
33109if test -n "$TOOLCHAIN_PATH_CC"; then
33110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
33111$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
33112else
33113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33114$as_echo "no" >&6; }
33115fi
33116
33117
33118  test -n "$TOOLCHAIN_PATH_CC" && break
33119done
33120
33121      CC=$TOOLCHAIN_PATH_CC
33122      PATH="$PATH_save"
33123    fi
33124
33125    # AC_PATH_PROGS can't be run multiple times with the same variable,
33126    # so create a new name for this run.
33127    if test "x$CC" = x; then
33128      for ac_prog in $SEARCH_LIST
33129do
33130  # Extract the first word of "$ac_prog", so it can be a program name with args.
33131set dummy $ac_prog; ac_word=$2
33132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33133$as_echo_n "checking for $ac_word... " >&6; }
33134if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33135  $as_echo_n "(cached) " >&6
33136else
33137  case $POTENTIAL_CC in
33138  [\\/]* | ?:[\\/]*)
33139  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33140  ;;
33141  *)
33142  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33143for as_dir in $PATH
33144do
33145  IFS=$as_save_IFS
33146  test -z "$as_dir" && as_dir=.
33147    for ac_exec_ext in '' $ac_executable_extensions; do
33148  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33149    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33150    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33151    break 2
33152  fi
33153done
33154  done
33155IFS=$as_save_IFS
33156
33157  ;;
33158esac
33159fi
33160POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33161if test -n "$POTENTIAL_CC"; then
33162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33163$as_echo "$POTENTIAL_CC" >&6; }
33164else
33165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33166$as_echo "no" >&6; }
33167fi
33168
33169
33170  test -n "$POTENTIAL_CC" && break
33171done
33172
33173      CC=$POTENTIAL_CC
33174    fi
33175
33176    if test "x$CC" = x; then
33177
33178  # Print a helpful message on how to acquire the necessary build dependency.
33179  # devkit is the help tag: freetype, cups, alsa etc
33180  MISSING_DEPENDENCY=devkit
33181
33182  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33183    cygwin_help $MISSING_DEPENDENCY
33184  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33185    msys_help $MISSING_DEPENDENCY
33186  else
33187    PKGHANDLER_COMMAND=
33188
33189    case $PKGHANDLER in
33190      apt-get)
33191        apt_help     $MISSING_DEPENDENCY ;;
33192      yum)
33193        yum_help     $MISSING_DEPENDENCY ;;
33194      port)
33195        port_help    $MISSING_DEPENDENCY ;;
33196      pkgutil)
33197        pkgutil_help $MISSING_DEPENDENCY ;;
33198      pkgadd)
33199        pkgadd_help  $MISSING_DEPENDENCY ;;
33200    esac
33201
33202    if test "x$PKGHANDLER_COMMAND" != x; then
33203      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33204    fi
33205  fi
33206
33207      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33208    fi
33209  fi
33210
33211  # Now we have a compiler binary in CC. Make sure it's okay.
33212
33213  # Only process if variable expands to non-empty
33214
33215  if test "x$CC" != x; then
33216    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33217
33218  # First separate the path from the arguments. This will split at the first
33219  # space.
33220  complete="$CC"
33221  path="${complete%% *}"
33222  tmp="$complete EOL"
33223  arguments="${tmp#* }"
33224
33225  # Input might be given as Windows format, start by converting to
33226  # unix format.
33227  new_path=`$CYGPATH -u "$path"`
33228
33229  # Now try to locate executable using which
33230  new_path=`$WHICH "$new_path" 2> /dev/null`
33231  # bat and cmd files are not always considered executable in cygwin causing which
33232  # to not find them
33233  if test "x$new_path" = x \
33234      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33235      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33236    new_path=`$CYGPATH -u "$path"`
33237  fi
33238  if test "x$new_path" = x; then
33239    # Oops. Which didn't find the executable.
33240    # The splitting of arguments from the executable at a space might have been incorrect,
33241    # since paths with space are more likely in Windows. Give it another try with the whole
33242    # argument.
33243    path="$complete"
33244    arguments="EOL"
33245    new_path=`$CYGPATH -u "$path"`
33246    new_path=`$WHICH "$new_path" 2> /dev/null`
33247    # bat and cmd files are not always considered executable in cygwin causing which
33248    # to not find them
33249    if test "x$new_path" = x \
33250        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33251        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33252      new_path=`$CYGPATH -u "$path"`
33253    fi
33254    if test "x$new_path" = x; then
33255      # It's still not found. Now this is an unrecoverable error.
33256      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33257$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33258      has_space=`$ECHO "$complete" | $GREP " "`
33259      if test "x$has_space" != x; then
33260        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33261$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33262      fi
33263      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33264    fi
33265  fi
33266
33267  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33268  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33269  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33270  # "foo.exe" is OK but "foo" is an error.
33271  #
33272  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33273  # It is also a way to make sure we got the proper file name for the real test later on.
33274  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33275  if test "x$test_shortpath" = x; then
33276    # Short path failed, file does not exist as specified.
33277    # Try adding .exe or .cmd
33278    if test -f "${new_path}.exe"; then
33279      input_to_shortpath="${new_path}.exe"
33280    elif test -f "${new_path}.cmd"; then
33281      input_to_shortpath="${new_path}.cmd"
33282    else
33283      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
33284$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
33285      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33286$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33287      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33288    fi
33289  else
33290    input_to_shortpath="$new_path"
33291  fi
33292
33293  # Call helper function which possibly converts this using DOS-style short mode.
33294  # If so, the updated path is stored in $new_path.
33295  new_path="$input_to_shortpath"
33296
33297  input_path="$input_to_shortpath"
33298  # Check if we need to convert this using DOS-style short mode. If the path
33299  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33300  # take no chances and rewrite it.
33301  # Note: m4 eats our [], so we need to use [ and ] instead.
33302  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33303  if test "x$has_forbidden_chars" != x; then
33304    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33305    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33306    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33307    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33308      # Going to short mode and back again did indeed matter. Since short mode is
33309      # case insensitive, let's make it lowercase to improve readability.
33310      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33311      # Now convert it back to Unix-style (cygpath)
33312      input_path=`$CYGPATH -u "$shortmode_path"`
33313      new_path="$input_path"
33314    fi
33315  fi
33316
33317  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33318  if test "x$test_cygdrive_prefix" = x; then
33319    # As a simple fix, exclude /usr/bin since it's not a real path.
33320    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33321      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33322      # a path prefixed by /cygdrive for fixpath to work.
33323      new_path="$CYGWIN_ROOT_PATH$input_path"
33324    fi
33325  fi
33326
33327  # remove trailing .exe if any
33328  new_path="${new_path/%.exe/}"
33329
33330    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33331
33332  # First separate the path from the arguments. This will split at the first
33333  # space.
33334  complete="$CC"
33335  path="${complete%% *}"
33336  tmp="$complete EOL"
33337  arguments="${tmp#* }"
33338
33339  # Input might be given as Windows format, start by converting to
33340  # unix format.
33341  new_path="$path"
33342
33343  windows_path="$new_path"
33344  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33345    unix_path=`$CYGPATH -u "$windows_path"`
33346    new_path="$unix_path"
33347  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33348    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33349    new_path="$unix_path"
33350  fi
33351
33352
33353  # Now try to locate executable using which
33354  new_path=`$WHICH "$new_path" 2> /dev/null`
33355
33356  if test "x$new_path" = x; then
33357    # Oops. Which didn't find the executable.
33358    # The splitting of arguments from the executable at a space might have been incorrect,
33359    # since paths with space are more likely in Windows. Give it another try with the whole
33360    # argument.
33361    path="$complete"
33362    arguments="EOL"
33363    new_path="$path"
33364
33365  windows_path="$new_path"
33366  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33367    unix_path=`$CYGPATH -u "$windows_path"`
33368    new_path="$unix_path"
33369  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33370    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33371    new_path="$unix_path"
33372  fi
33373
33374
33375    new_path=`$WHICH "$new_path" 2> /dev/null`
33376    # bat and cmd files are not always considered executable in MSYS causing which
33377    # to not find them
33378    if test "x$new_path" = x \
33379        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33380        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33381      new_path="$path"
33382
33383  windows_path="$new_path"
33384  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33385    unix_path=`$CYGPATH -u "$windows_path"`
33386    new_path="$unix_path"
33387  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33388    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33389    new_path="$unix_path"
33390  fi
33391
33392    fi
33393
33394    if test "x$new_path" = x; then
33395      # It's still not found. Now this is an unrecoverable error.
33396      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33397$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33398      has_space=`$ECHO "$complete" | $GREP " "`
33399      if test "x$has_space" != x; then
33400        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33401$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33402      fi
33403      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33404    fi
33405  fi
33406
33407  # Now new_path has a complete unix path to the binary
33408  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33409    # Keep paths in /bin as-is, but remove trailing .exe if any
33410    new_path="${new_path/%.exe/}"
33411    # Do not save /bin paths to all_fixpath_prefixes!
33412  else
33413    # Not in mixed or Windows style, start by that.
33414    new_path=`cmd //c echo $new_path`
33415
33416  input_path="$new_path"
33417  # Check if we need to convert this using DOS-style short mode. If the path
33418  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33419  # take no chances and rewrite it.
33420  # Note: m4 eats our [], so we need to use [ and ] instead.
33421  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33422  if test "x$has_forbidden_chars" != x; then
33423    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33424    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33425  fi
33426
33427    # Output is in $new_path
33428
33429  windows_path="$new_path"
33430  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33431    unix_path=`$CYGPATH -u "$windows_path"`
33432    new_path="$unix_path"
33433  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33434    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33435    new_path="$unix_path"
33436  fi
33437
33438    # remove trailing .exe if any
33439    new_path="${new_path/%.exe/}"
33440
33441    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33442    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33443  fi
33444
33445    else
33446      # We're on a unix platform. Hooray! :)
33447      # First separate the path from the arguments. This will split at the first
33448      # space.
33449      complete="$CC"
33450      path="${complete%% *}"
33451      tmp="$complete EOL"
33452      arguments="${tmp#* }"
33453
33454      # Cannot rely on the command "which" here since it doesn't always work.
33455      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33456      if test -z "$is_absolute_path"; then
33457        # Path to executable is not absolute. Find it.
33458        IFS_save="$IFS"
33459        IFS=:
33460        for p in $PATH; do
33461          if test -f "$p/$path" && test -x "$p/$path"; then
33462            new_path="$p/$path"
33463            break
33464          fi
33465        done
33466        IFS="$IFS_save"
33467      else
33468        # This is an absolute path, we can use it without further modifications.
33469        new_path="$path"
33470      fi
33471
33472      if test "x$new_path" = x; then
33473        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33474$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33475        has_space=`$ECHO "$complete" | $GREP " "`
33476        if test "x$has_space" != x; then
33477          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33478$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33479        fi
33480        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33481      fi
33482    fi
33483
33484    # Now join together the path and the arguments once again
33485    if test "x$arguments" != xEOL; then
33486      new_complete="$new_path ${arguments% *}"
33487    else
33488      new_complete="$new_path"
33489    fi
33490
33491    if test "x$complete" != "x$new_complete"; then
33492      CC="$new_complete"
33493      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
33494$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
33495    fi
33496  fi
33497
33498  TEST_COMPILER="$CC"
33499
33500  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
33501$as_echo_n "checking resolved symbolic links for CC... " >&6; }
33502  SYMLINK_ORIGINAL="$TEST_COMPILER"
33503
33504  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33505    # Follow a chain of symbolic links. Use readlink
33506    # where it exists, else fall back to horribly
33507    # complicated shell code.
33508    if test "x$READLINK_TESTED" != yes; then
33509      # On MacOSX there is a readlink tool with a different
33510      # purpose than the GNU readlink tool. Check the found readlink.
33511      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33512      if test "x$ISGNU" = x; then
33513        # A readlink that we do not know how to use.
33514        # Are there other non-GNU readlinks out there?
33515        READLINK_TESTED=yes
33516        READLINK=
33517      fi
33518    fi
33519
33520    if test "x$READLINK" != x; then
33521      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
33522    else
33523      # Save the current directory for restoring afterwards
33524      STARTDIR=$PWD
33525      COUNTER=0
33526      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
33527      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
33528      cd $sym_link_dir
33529      # Use -P flag to resolve symlinks in directories.
33530      cd `$THEPWDCMD -P`
33531      sym_link_dir=`$THEPWDCMD -P`
33532      # Resolve file symlinks
33533      while test $COUNTER -lt 20; do
33534        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33535        if test "x$ISLINK" == x; then
33536          # This is not a symbolic link! We are done!
33537          break
33538        fi
33539        # Again resolve directory symlinks since the target of the just found
33540        # link could be in a different directory
33541        cd `$DIRNAME $ISLINK`
33542        sym_link_dir=`$THEPWDCMD -P`
33543        sym_link_file=`$BASENAME $ISLINK`
33544        let COUNTER=COUNTER+1
33545      done
33546      cd $STARTDIR
33547      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
33548    fi
33549  fi
33550
33551  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
33552    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
33553$as_echo "no symlink" >&6; }
33554  else
33555    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
33556$as_echo "$SYMLINK_ORIGINAL" >&6; }
33557
33558    # We can't handle ccache by gcc wrappers, since we need to know if we're
33559    # using ccache. Instead ccache usage must be controlled by a configure option.
33560    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
33561    if test "x$COMPILER_BASENAME" = "xccache"; then
33562      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
33563$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
33564      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
33565    fi
33566  fi
33567
33568
33569  COMPILER=$CC
33570  COMPILER_NAME=$COMPILER_NAME
33571
33572  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33573    # cc -V output typically looks like
33574    #     cc: Sun C 5.12 Linux_i386 2011/11/16
33575    # or
33576    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
33577    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33578    # Check that this is likely to be the Solaris Studio cc.
33579    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
33580    if test $? -ne 0; then
33581      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33582      { $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
33583$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33584      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33585$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33586      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33587$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33588      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33589    fi
33590    # Remove usage instructions (if present), and
33591    # collapse compiler output into a single line
33592    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33593        $SED -e 's/ *[Uu]sage:.*//'`
33594    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33595        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33596  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
33597    # xlc -qversion output typically looks like
33598    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
33599    #     Version: 11.01.0000.0015
33600    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
33601    # Check that this is likely to be the IBM XL C compiler.
33602    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
33603    if test $? -ne 0; then
33604      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33605      { $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
33606$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33607      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33608$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33609      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33610$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33611      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33612    fi
33613    # Collapse compiler output into a single line
33614    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33615    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33616        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
33617  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33618    # There is no specific version flag, but all output starts with a version string.
33619    # First line typically looks something like:
33620    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
33621    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
33622    # Check that this is likely to be Microsoft CL.EXE.
33623    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
33624    if test $? -ne 0; then
33625      { $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
33626$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33627      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33628$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33629      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33630    fi
33631    # Collapse compiler output into a single line
33632    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33633    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33634        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
33635  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
33636    # gcc --version output typically looks like
33637    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
33638    #     Copyright (C) 2013 Free Software Foundation, Inc.
33639    #     This is free software; see the source for copying conditions.  There is NO
33640    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33641    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33642    # Check that this is likely to be GCC.
33643    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
33644    if test $? -ne 0; then
33645      { $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
33646$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33647      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
33648$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
33649      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33650    fi
33651    # Remove Copyright and legalese from version string, and
33652    # collapse into a single line
33653    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33654        $SED -e 's/ *Copyright .*//'`
33655    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33656        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
33657  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
33658    # clang --version output typically looks like
33659    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
33660    #    clang version 3.3 (tags/RELEASE_33/final)
33661    # or
33662    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
33663    #    Target: x86_64-pc-linux-gnu
33664    #    Thread model: posix
33665    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33666    # Check that this is likely to be clang
33667    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
33668    if test $? -ne 0; then
33669      { $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
33670$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33671      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33672$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33673      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33674    fi
33675    # Collapse compiler output into a single line
33676    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33677    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33678        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
33679  else
33680      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
33681  fi
33682  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
33683  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
33684  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
33685  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
33686
33687  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
33688$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
33689
33690
33691  # Now that we have resolved CC ourself, let autoconf have its go at it
33692  ac_ext=c
33693ac_cpp='$CPP $CPPFLAGS'
33694ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33695ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33696ac_compiler_gnu=$ac_cv_c_compiler_gnu
33697if test -n "$ac_tool_prefix"; then
33698  for ac_prog in $CC
33699  do
33700    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33701set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33703$as_echo_n "checking for $ac_word... " >&6; }
33704if ${ac_cv_prog_CC+:} false; then :
33705  $as_echo_n "(cached) " >&6
33706else
33707  if test -n "$CC"; then
33708  ac_cv_prog_CC="$CC" # Let the user override the test.
33709else
33710as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33711for as_dir in $PATH
33712do
33713  IFS=$as_save_IFS
33714  test -z "$as_dir" && as_dir=.
33715    for ac_exec_ext in '' $ac_executable_extensions; do
33716  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33717    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
33718    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33719    break 2
33720  fi
33721done
33722  done
33723IFS=$as_save_IFS
33724
33725fi
33726fi
33727CC=$ac_cv_prog_CC
33728if test -n "$CC"; then
33729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
33730$as_echo "$CC" >&6; }
33731else
33732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33733$as_echo "no" >&6; }
33734fi
33735
33736
33737    test -n "$CC" && break
33738  done
33739fi
33740if test -z "$CC"; then
33741  ac_ct_CC=$CC
33742  for ac_prog in $CC
33743do
33744  # Extract the first word of "$ac_prog", so it can be a program name with args.
33745set dummy $ac_prog; ac_word=$2
33746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33747$as_echo_n "checking for $ac_word... " >&6; }
33748if ${ac_cv_prog_ac_ct_CC+:} false; then :
33749  $as_echo_n "(cached) " >&6
33750else
33751  if test -n "$ac_ct_CC"; then
33752  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
33753else
33754as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33755for as_dir in $PATH
33756do
33757  IFS=$as_save_IFS
33758  test -z "$as_dir" && as_dir=.
33759    for ac_exec_ext in '' $ac_executable_extensions; do
33760  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33761    ac_cv_prog_ac_ct_CC="$ac_prog"
33762    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33763    break 2
33764  fi
33765done
33766  done
33767IFS=$as_save_IFS
33768
33769fi
33770fi
33771ac_ct_CC=$ac_cv_prog_ac_ct_CC
33772if test -n "$ac_ct_CC"; then
33773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
33774$as_echo "$ac_ct_CC" >&6; }
33775else
33776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33777$as_echo "no" >&6; }
33778fi
33779
33780
33781  test -n "$ac_ct_CC" && break
33782done
33783
33784  if test "x$ac_ct_CC" = x; then
33785    CC=""
33786  else
33787    case $cross_compiling:$ac_tool_warned in
33788yes:)
33789{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33790$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33791ac_tool_warned=yes ;;
33792esac
33793    CC=$ac_ct_CC
33794  fi
33795fi
33796
33797
33798test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33799$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33800as_fn_error $? "no acceptable C compiler found in \$PATH
33801See \`config.log' for more details" "$LINENO" 5; }
33802
33803# Provide some information about the compiler.
33804$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
33805set X $ac_compile
33806ac_compiler=$2
33807for ac_option in --version -v -V -qversion; do
33808  { { ac_try="$ac_compiler $ac_option >&5"
33809case "(($ac_try" in
33810  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33811  *) ac_try_echo=$ac_try;;
33812esac
33813eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33814$as_echo "$ac_try_echo"; } >&5
33815  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33816  ac_status=$?
33817  if test -s conftest.err; then
33818    sed '10a\
33819... rest of stderr output deleted ...
33820         10q' conftest.err >conftest.er1
33821    cat conftest.er1 >&5
33822  fi
33823  rm -f conftest.er1 conftest.err
33824  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33825  test $ac_status = 0; }
33826done
33827
33828cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33829/* end confdefs.h.  */
33830
33831int
33832main ()
33833{
33834
33835  ;
33836  return 0;
33837}
33838_ACEOF
33839ac_clean_files_save=$ac_clean_files
33840ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
33841# Try to create an executable without -o first, disregard a.out.
33842# It will help us diagnose broken compilers, and finding out an intuition
33843# of exeext.
33844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
33845$as_echo_n "checking whether the C compiler works... " >&6; }
33846ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
33847
33848# The possible output files:
33849ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
33850
33851ac_rmfiles=
33852for ac_file in $ac_files
33853do
33854  case $ac_file in
33855    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33856    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
33857  esac
33858done
33859rm -f $ac_rmfiles
33860
33861if { { ac_try="$ac_link_default"
33862case "(($ac_try" in
33863  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33864  *) ac_try_echo=$ac_try;;
33865esac
33866eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33867$as_echo "$ac_try_echo"; } >&5
33868  (eval "$ac_link_default") 2>&5
33869  ac_status=$?
33870  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33871  test $ac_status = 0; }; then :
33872  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
33873# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
33874# in a Makefile.  We should not override ac_cv_exeext if it was cached,
33875# so that the user can short-circuit this test for compilers unknown to
33876# Autoconf.
33877for ac_file in $ac_files ''
33878do
33879  test -f "$ac_file" || continue
33880  case $ac_file in
33881    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
33882	;;
33883    [ab].out )
33884	# We found the default executable, but exeext='' is most
33885	# certainly right.
33886	break;;
33887    *.* )
33888	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
33889	then :; else
33890	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33891	fi
33892	# We set ac_cv_exeext here because the later test for it is not
33893	# safe: cross compilers may not add the suffix if given an `-o'
33894	# argument, so we may need to know it at that point already.
33895	# Even if this section looks crufty: it has the advantage of
33896	# actually working.
33897	break;;
33898    * )
33899	break;;
33900  esac
33901done
33902test "$ac_cv_exeext" = no && ac_cv_exeext=
33903
33904else
33905  ac_file=''
33906fi
33907if test -z "$ac_file"; then :
33908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33909$as_echo "no" >&6; }
33910$as_echo "$as_me: failed program was:" >&5
33911sed 's/^/| /' conftest.$ac_ext >&5
33912
33913{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33914$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33915as_fn_error 77 "C compiler cannot create executables
33916See \`config.log' for more details" "$LINENO" 5; }
33917else
33918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33919$as_echo "yes" >&6; }
33920fi
33921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
33922$as_echo_n "checking for C compiler default output file name... " >&6; }
33923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
33924$as_echo "$ac_file" >&6; }
33925ac_exeext=$ac_cv_exeext
33926
33927rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
33928ac_clean_files=$ac_clean_files_save
33929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
33930$as_echo_n "checking for suffix of executables... " >&6; }
33931if { { ac_try="$ac_link"
33932case "(($ac_try" in
33933  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33934  *) ac_try_echo=$ac_try;;
33935esac
33936eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33937$as_echo "$ac_try_echo"; } >&5
33938  (eval "$ac_link") 2>&5
33939  ac_status=$?
33940  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33941  test $ac_status = 0; }; then :
33942  # If both `conftest.exe' and `conftest' are `present' (well, observable)
33943# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
33944# work properly (i.e., refer to `conftest.exe'), while it won't with
33945# `rm'.
33946for ac_file in conftest.exe conftest conftest.*; do
33947  test -f "$ac_file" || continue
33948  case $ac_file in
33949    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33950    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33951	  break;;
33952    * ) break;;
33953  esac
33954done
33955else
33956  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33957$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33958as_fn_error $? "cannot compute suffix of executables: cannot compile and link
33959See \`config.log' for more details" "$LINENO" 5; }
33960fi
33961rm -f conftest conftest$ac_cv_exeext
33962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
33963$as_echo "$ac_cv_exeext" >&6; }
33964
33965rm -f conftest.$ac_ext
33966EXEEXT=$ac_cv_exeext
33967ac_exeext=$EXEEXT
33968cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33969/* end confdefs.h.  */
33970#include <stdio.h>
33971int
33972main ()
33973{
33974FILE *f = fopen ("conftest.out", "w");
33975 return ferror (f) || fclose (f) != 0;
33976
33977  ;
33978  return 0;
33979}
33980_ACEOF
33981ac_clean_files="$ac_clean_files conftest.out"
33982# Check that the compiler produces executables we can run.  If not, either
33983# the compiler is broken, or we cross compile.
33984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
33985$as_echo_n "checking whether we are cross compiling... " >&6; }
33986if test "$cross_compiling" != yes; then
33987  { { ac_try="$ac_link"
33988case "(($ac_try" in
33989  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33990  *) ac_try_echo=$ac_try;;
33991esac
33992eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33993$as_echo "$ac_try_echo"; } >&5
33994  (eval "$ac_link") 2>&5
33995  ac_status=$?
33996  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33997  test $ac_status = 0; }
33998  if { ac_try='./conftest$ac_cv_exeext'
33999  { { case "(($ac_try" in
34000  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34001  *) ac_try_echo=$ac_try;;
34002esac
34003eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34004$as_echo "$ac_try_echo"; } >&5
34005  (eval "$ac_try") 2>&5
34006  ac_status=$?
34007  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34008  test $ac_status = 0; }; }; then
34009    cross_compiling=no
34010  else
34011    if test "$cross_compiling" = maybe; then
34012	cross_compiling=yes
34013    else
34014	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34015$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34016as_fn_error $? "cannot run C compiled programs.
34017If you meant to cross compile, use \`--host'.
34018See \`config.log' for more details" "$LINENO" 5; }
34019    fi
34020  fi
34021fi
34022{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
34023$as_echo "$cross_compiling" >&6; }
34024
34025rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
34026ac_clean_files=$ac_clean_files_save
34027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
34028$as_echo_n "checking for suffix of object files... " >&6; }
34029if ${ac_cv_objext+:} false; then :
34030  $as_echo_n "(cached) " >&6
34031else
34032  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34033/* end confdefs.h.  */
34034
34035int
34036main ()
34037{
34038
34039  ;
34040  return 0;
34041}
34042_ACEOF
34043rm -f conftest.o conftest.obj
34044if { { ac_try="$ac_compile"
34045case "(($ac_try" in
34046  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34047  *) ac_try_echo=$ac_try;;
34048esac
34049eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34050$as_echo "$ac_try_echo"; } >&5
34051  (eval "$ac_compile") 2>&5
34052  ac_status=$?
34053  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34054  test $ac_status = 0; }; then :
34055  for ac_file in conftest.o conftest.obj conftest.*; do
34056  test -f "$ac_file" || continue;
34057  case $ac_file in
34058    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
34059    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
34060       break;;
34061  esac
34062done
34063else
34064  $as_echo "$as_me: failed program was:" >&5
34065sed 's/^/| /' conftest.$ac_ext >&5
34066
34067{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34068$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34069as_fn_error $? "cannot compute suffix of object files: cannot compile
34070See \`config.log' for more details" "$LINENO" 5; }
34071fi
34072rm -f conftest.$ac_cv_objext conftest.$ac_ext
34073fi
34074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
34075$as_echo "$ac_cv_objext" >&6; }
34076OBJEXT=$ac_cv_objext
34077ac_objext=$OBJEXT
34078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
34079$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
34080if ${ac_cv_c_compiler_gnu+:} false; then :
34081  $as_echo_n "(cached) " >&6
34082else
34083  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34084/* end confdefs.h.  */
34085
34086int
34087main ()
34088{
34089#ifndef __GNUC__
34090       choke me
34091#endif
34092
34093  ;
34094  return 0;
34095}
34096_ACEOF
34097if ac_fn_c_try_compile "$LINENO"; then :
34098  ac_compiler_gnu=yes
34099else
34100  ac_compiler_gnu=no
34101fi
34102rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34103ac_cv_c_compiler_gnu=$ac_compiler_gnu
34104
34105fi
34106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
34107$as_echo "$ac_cv_c_compiler_gnu" >&6; }
34108if test $ac_compiler_gnu = yes; then
34109  GCC=yes
34110else
34111  GCC=
34112fi
34113ac_test_CFLAGS=${CFLAGS+set}
34114ac_save_CFLAGS=$CFLAGS
34115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
34116$as_echo_n "checking whether $CC accepts -g... " >&6; }
34117if ${ac_cv_prog_cc_g+:} false; then :
34118  $as_echo_n "(cached) " >&6
34119else
34120  ac_save_c_werror_flag=$ac_c_werror_flag
34121   ac_c_werror_flag=yes
34122   ac_cv_prog_cc_g=no
34123   CFLAGS="-g"
34124   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34125/* end confdefs.h.  */
34126
34127int
34128main ()
34129{
34130
34131  ;
34132  return 0;
34133}
34134_ACEOF
34135if ac_fn_c_try_compile "$LINENO"; then :
34136  ac_cv_prog_cc_g=yes
34137else
34138  CFLAGS=""
34139      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34140/* end confdefs.h.  */
34141
34142int
34143main ()
34144{
34145
34146  ;
34147  return 0;
34148}
34149_ACEOF
34150if ac_fn_c_try_compile "$LINENO"; then :
34151
34152else
34153  ac_c_werror_flag=$ac_save_c_werror_flag
34154	 CFLAGS="-g"
34155	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34156/* end confdefs.h.  */
34157
34158int
34159main ()
34160{
34161
34162  ;
34163  return 0;
34164}
34165_ACEOF
34166if ac_fn_c_try_compile "$LINENO"; then :
34167  ac_cv_prog_cc_g=yes
34168fi
34169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34170fi
34171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34172fi
34173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34174   ac_c_werror_flag=$ac_save_c_werror_flag
34175fi
34176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
34177$as_echo "$ac_cv_prog_cc_g" >&6; }
34178if test "$ac_test_CFLAGS" = set; then
34179  CFLAGS=$ac_save_CFLAGS
34180elif test $ac_cv_prog_cc_g = yes; then
34181  if test "$GCC" = yes; then
34182    CFLAGS="-g -O2"
34183  else
34184    CFLAGS="-g"
34185  fi
34186else
34187  if test "$GCC" = yes; then
34188    CFLAGS="-O2"
34189  else
34190    CFLAGS=
34191  fi
34192fi
34193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
34194$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
34195if ${ac_cv_prog_cc_c89+:} false; then :
34196  $as_echo_n "(cached) " >&6
34197else
34198  ac_cv_prog_cc_c89=no
34199ac_save_CC=$CC
34200cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34201/* end confdefs.h.  */
34202#include <stdarg.h>
34203#include <stdio.h>
34204struct stat;
34205/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
34206struct buf { int x; };
34207FILE * (*rcsopen) (struct buf *, struct stat *, int);
34208static char *e (p, i)
34209     char **p;
34210     int i;
34211{
34212  return p[i];
34213}
34214static char *f (char * (*g) (char **, int), char **p, ...)
34215{
34216  char *s;
34217  va_list v;
34218  va_start (v,p);
34219  s = g (p, va_arg (v,int));
34220  va_end (v);
34221  return s;
34222}
34223
34224/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
34225   function prototypes and stuff, but not '\xHH' hex character constants.
34226   These don't provoke an error unfortunately, instead are silently treated
34227   as 'x'.  The following induces an error, until -std is added to get
34228   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
34229   array size at least.  It's necessary to write '\x00'==0 to get something
34230   that's true only with -std.  */
34231int osf4_cc_array ['\x00' == 0 ? 1 : -1];
34232
34233/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
34234   inside strings and character constants.  */
34235#define FOO(x) 'x'
34236int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
34237
34238int test (int i, double x);
34239struct s1 {int (*f) (int a);};
34240struct s2 {int (*f) (double a);};
34241int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
34242int argc;
34243char **argv;
34244int
34245main ()
34246{
34247return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
34248  ;
34249  return 0;
34250}
34251_ACEOF
34252for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
34253	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
34254do
34255  CC="$ac_save_CC $ac_arg"
34256  if ac_fn_c_try_compile "$LINENO"; then :
34257  ac_cv_prog_cc_c89=$ac_arg
34258fi
34259rm -f core conftest.err conftest.$ac_objext
34260  test "x$ac_cv_prog_cc_c89" != "xno" && break
34261done
34262rm -f conftest.$ac_ext
34263CC=$ac_save_CC
34264
34265fi
34266# AC_CACHE_VAL
34267case "x$ac_cv_prog_cc_c89" in
34268  x)
34269    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
34270$as_echo "none needed" >&6; } ;;
34271  xno)
34272    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
34273$as_echo "unsupported" >&6; } ;;
34274  *)
34275    CC="$CC $ac_cv_prog_cc_c89"
34276    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
34277$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
34278esac
34279if test "x$ac_cv_prog_cc_c89" != xno; then :
34280
34281fi
34282
34283ac_ext=cpp
34284ac_cpp='$CXXCPP $CPPFLAGS'
34285ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34286ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34287ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34288
34289
34290
34291  COMPILER_NAME=C++
34292  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
34293
34294  if test "x$CXX" != x; then
34295    # User has supplied compiler name already, always let that override.
34296    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
34297$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
34298    if test "x`basename $CXX`" = "x$CXX"; then
34299      # A command without a complete path is provided, search $PATH.
34300
34301      for ac_prog in $CXX
34302do
34303  # Extract the first word of "$ac_prog", so it can be a program name with args.
34304set dummy $ac_prog; ac_word=$2
34305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34306$as_echo_n "checking for $ac_word... " >&6; }
34307if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34308  $as_echo_n "(cached) " >&6
34309else
34310  case $POTENTIAL_CXX in
34311  [\\/]* | ?:[\\/]*)
34312  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34313  ;;
34314  *)
34315  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34316for as_dir in $PATH
34317do
34318  IFS=$as_save_IFS
34319  test -z "$as_dir" && as_dir=.
34320    for ac_exec_ext in '' $ac_executable_extensions; do
34321  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34322    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34323    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34324    break 2
34325  fi
34326done
34327  done
34328IFS=$as_save_IFS
34329
34330  ;;
34331esac
34332fi
34333POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34334if test -n "$POTENTIAL_CXX"; then
34335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34336$as_echo "$POTENTIAL_CXX" >&6; }
34337else
34338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34339$as_echo "no" >&6; }
34340fi
34341
34342
34343  test -n "$POTENTIAL_CXX" && break
34344done
34345
34346      if test "x$POTENTIAL_CXX" != x; then
34347        CXX=$POTENTIAL_CXX
34348      else
34349        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
34350      fi
34351    else
34352      # Otherwise it might already be a complete path
34353      if test ! -x "$CXX"; then
34354        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
34355      fi
34356    fi
34357  else
34358    # No user supplied value. Locate compiler ourselves.
34359
34360    # If we are cross compiling, assume cross compilation tools follows the
34361    # cross compilation standard where they are prefixed with the autoconf
34362    # standard name for the target. For example the binary
34363    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
34364    # If we are not cross compiling, then the default compiler name will be
34365    # used.
34366
34367    CXX=
34368    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
34369    # before checking the rest of the PATH.
34370    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
34371    # step, this should not be necessary.
34372    if test -n "$TOOLCHAIN_PATH"; then
34373      PATH_save="$PATH"
34374      PATH="$TOOLCHAIN_PATH"
34375      for ac_prog in $SEARCH_LIST
34376do
34377  # Extract the first word of "$ac_prog", so it can be a program name with args.
34378set dummy $ac_prog; ac_word=$2
34379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34380$as_echo_n "checking for $ac_word... " >&6; }
34381if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
34382  $as_echo_n "(cached) " >&6
34383else
34384  case $TOOLCHAIN_PATH_CXX in
34385  [\\/]* | ?:[\\/]*)
34386  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
34387  ;;
34388  *)
34389  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34390for as_dir in $PATH
34391do
34392  IFS=$as_save_IFS
34393  test -z "$as_dir" && as_dir=.
34394    for ac_exec_ext in '' $ac_executable_extensions; do
34395  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34396    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
34397    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34398    break 2
34399  fi
34400done
34401  done
34402IFS=$as_save_IFS
34403
34404  ;;
34405esac
34406fi
34407TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
34408if test -n "$TOOLCHAIN_PATH_CXX"; then
34409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
34410$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
34411else
34412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34413$as_echo "no" >&6; }
34414fi
34415
34416
34417  test -n "$TOOLCHAIN_PATH_CXX" && break
34418done
34419
34420      CXX=$TOOLCHAIN_PATH_CXX
34421      PATH="$PATH_save"
34422    fi
34423
34424    # AC_PATH_PROGS can't be run multiple times with the same variable,
34425    # so create a new name for this run.
34426    if test "x$CXX" = x; then
34427      for ac_prog in $SEARCH_LIST
34428do
34429  # Extract the first word of "$ac_prog", so it can be a program name with args.
34430set dummy $ac_prog; ac_word=$2
34431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34432$as_echo_n "checking for $ac_word... " >&6; }
34433if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34434  $as_echo_n "(cached) " >&6
34435else
34436  case $POTENTIAL_CXX in
34437  [\\/]* | ?:[\\/]*)
34438  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34439  ;;
34440  *)
34441  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34442for as_dir in $PATH
34443do
34444  IFS=$as_save_IFS
34445  test -z "$as_dir" && as_dir=.
34446    for ac_exec_ext in '' $ac_executable_extensions; do
34447  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34448    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34449    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34450    break 2
34451  fi
34452done
34453  done
34454IFS=$as_save_IFS
34455
34456  ;;
34457esac
34458fi
34459POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34460if test -n "$POTENTIAL_CXX"; then
34461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34462$as_echo "$POTENTIAL_CXX" >&6; }
34463else
34464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34465$as_echo "no" >&6; }
34466fi
34467
34468
34469  test -n "$POTENTIAL_CXX" && break
34470done
34471
34472      CXX=$POTENTIAL_CXX
34473    fi
34474
34475    if test "x$CXX" = x; then
34476
34477  # Print a helpful message on how to acquire the necessary build dependency.
34478  # devkit is the help tag: freetype, cups, alsa etc
34479  MISSING_DEPENDENCY=devkit
34480
34481  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34482    cygwin_help $MISSING_DEPENDENCY
34483  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34484    msys_help $MISSING_DEPENDENCY
34485  else
34486    PKGHANDLER_COMMAND=
34487
34488    case $PKGHANDLER in
34489      apt-get)
34490        apt_help     $MISSING_DEPENDENCY ;;
34491      yum)
34492        yum_help     $MISSING_DEPENDENCY ;;
34493      port)
34494        port_help    $MISSING_DEPENDENCY ;;
34495      pkgutil)
34496        pkgutil_help $MISSING_DEPENDENCY ;;
34497      pkgadd)
34498        pkgadd_help  $MISSING_DEPENDENCY ;;
34499    esac
34500
34501    if test "x$PKGHANDLER_COMMAND" != x; then
34502      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34503    fi
34504  fi
34505
34506      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
34507    fi
34508  fi
34509
34510  # Now we have a compiler binary in CXX. Make sure it's okay.
34511
34512  # Only process if variable expands to non-empty
34513
34514  if test "x$CXX" != x; then
34515    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34516
34517  # First separate the path from the arguments. This will split at the first
34518  # space.
34519  complete="$CXX"
34520  path="${complete%% *}"
34521  tmp="$complete EOL"
34522  arguments="${tmp#* }"
34523
34524  # Input might be given as Windows format, start by converting to
34525  # unix format.
34526  new_path=`$CYGPATH -u "$path"`
34527
34528  # Now try to locate executable using which
34529  new_path=`$WHICH "$new_path" 2> /dev/null`
34530  # bat and cmd files are not always considered executable in cygwin causing which
34531  # to not find them
34532  if test "x$new_path" = x \
34533      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34534      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34535    new_path=`$CYGPATH -u "$path"`
34536  fi
34537  if test "x$new_path" = x; then
34538    # Oops. Which didn't find the executable.
34539    # The splitting of arguments from the executable at a space might have been incorrect,
34540    # since paths with space are more likely in Windows. Give it another try with the whole
34541    # argument.
34542    path="$complete"
34543    arguments="EOL"
34544    new_path=`$CYGPATH -u "$path"`
34545    new_path=`$WHICH "$new_path" 2> /dev/null`
34546    # bat and cmd files are not always considered executable in cygwin causing which
34547    # to not find them
34548    if test "x$new_path" = x \
34549        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34550        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34551      new_path=`$CYGPATH -u "$path"`
34552    fi
34553    if test "x$new_path" = x; then
34554      # It's still not found. Now this is an unrecoverable error.
34555      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34556$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34557      has_space=`$ECHO "$complete" | $GREP " "`
34558      if test "x$has_space" != x; then
34559        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34560$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34561      fi
34562      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34563    fi
34564  fi
34565
34566  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34567  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34568  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34569  # "foo.exe" is OK but "foo" is an error.
34570  #
34571  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34572  # It is also a way to make sure we got the proper file name for the real test later on.
34573  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34574  if test "x$test_shortpath" = x; then
34575    # Short path failed, file does not exist as specified.
34576    # Try adding .exe or .cmd
34577    if test -f "${new_path}.exe"; then
34578      input_to_shortpath="${new_path}.exe"
34579    elif test -f "${new_path}.cmd"; then
34580      input_to_shortpath="${new_path}.cmd"
34581    else
34582      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
34583$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
34584      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34585$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34586      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34587    fi
34588  else
34589    input_to_shortpath="$new_path"
34590  fi
34591
34592  # Call helper function which possibly converts this using DOS-style short mode.
34593  # If so, the updated path is stored in $new_path.
34594  new_path="$input_to_shortpath"
34595
34596  input_path="$input_to_shortpath"
34597  # Check if we need to convert this using DOS-style short mode. If the path
34598  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34599  # take no chances and rewrite it.
34600  # Note: m4 eats our [], so we need to use [ and ] instead.
34601  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34602  if test "x$has_forbidden_chars" != x; then
34603    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34604    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34605    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34606    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34607      # Going to short mode and back again did indeed matter. Since short mode is
34608      # case insensitive, let's make it lowercase to improve readability.
34609      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34610      # Now convert it back to Unix-style (cygpath)
34611      input_path=`$CYGPATH -u "$shortmode_path"`
34612      new_path="$input_path"
34613    fi
34614  fi
34615
34616  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34617  if test "x$test_cygdrive_prefix" = x; then
34618    # As a simple fix, exclude /usr/bin since it's not a real path.
34619    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34620      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34621      # a path prefixed by /cygdrive for fixpath to work.
34622      new_path="$CYGWIN_ROOT_PATH$input_path"
34623    fi
34624  fi
34625
34626  # remove trailing .exe if any
34627  new_path="${new_path/%.exe/}"
34628
34629    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34630
34631  # First separate the path from the arguments. This will split at the first
34632  # space.
34633  complete="$CXX"
34634  path="${complete%% *}"
34635  tmp="$complete EOL"
34636  arguments="${tmp#* }"
34637
34638  # Input might be given as Windows format, start by converting to
34639  # unix format.
34640  new_path="$path"
34641
34642  windows_path="$new_path"
34643  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34644    unix_path=`$CYGPATH -u "$windows_path"`
34645    new_path="$unix_path"
34646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34647    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34648    new_path="$unix_path"
34649  fi
34650
34651
34652  # Now try to locate executable using which
34653  new_path=`$WHICH "$new_path" 2> /dev/null`
34654
34655  if test "x$new_path" = x; then
34656    # Oops. Which didn't find the executable.
34657    # The splitting of arguments from the executable at a space might have been incorrect,
34658    # since paths with space are more likely in Windows. Give it another try with the whole
34659    # argument.
34660    path="$complete"
34661    arguments="EOL"
34662    new_path="$path"
34663
34664  windows_path="$new_path"
34665  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34666    unix_path=`$CYGPATH -u "$windows_path"`
34667    new_path="$unix_path"
34668  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34669    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34670    new_path="$unix_path"
34671  fi
34672
34673
34674    new_path=`$WHICH "$new_path" 2> /dev/null`
34675    # bat and cmd files are not always considered executable in MSYS causing which
34676    # to not find them
34677    if test "x$new_path" = x \
34678        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34679        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34680      new_path="$path"
34681
34682  windows_path="$new_path"
34683  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34684    unix_path=`$CYGPATH -u "$windows_path"`
34685    new_path="$unix_path"
34686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34687    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34688    new_path="$unix_path"
34689  fi
34690
34691    fi
34692
34693    if test "x$new_path" = x; then
34694      # It's still not found. Now this is an unrecoverable error.
34695      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34696$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34697      has_space=`$ECHO "$complete" | $GREP " "`
34698      if test "x$has_space" != x; then
34699        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34700$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34701      fi
34702      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34703    fi
34704  fi
34705
34706  # Now new_path has a complete unix path to the binary
34707  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34708    # Keep paths in /bin as-is, but remove trailing .exe if any
34709    new_path="${new_path/%.exe/}"
34710    # Do not save /bin paths to all_fixpath_prefixes!
34711  else
34712    # Not in mixed or Windows style, start by that.
34713    new_path=`cmd //c echo $new_path`
34714
34715  input_path="$new_path"
34716  # Check if we need to convert this using DOS-style short mode. If the path
34717  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34718  # take no chances and rewrite it.
34719  # Note: m4 eats our [], so we need to use [ and ] instead.
34720  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34721  if test "x$has_forbidden_chars" != x; then
34722    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34723    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34724  fi
34725
34726    # Output is in $new_path
34727
34728  windows_path="$new_path"
34729  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34730    unix_path=`$CYGPATH -u "$windows_path"`
34731    new_path="$unix_path"
34732  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34733    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34734    new_path="$unix_path"
34735  fi
34736
34737    # remove trailing .exe if any
34738    new_path="${new_path/%.exe/}"
34739
34740    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34741    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34742  fi
34743
34744    else
34745      # We're on a unix platform. Hooray! :)
34746      # First separate the path from the arguments. This will split at the first
34747      # space.
34748      complete="$CXX"
34749      path="${complete%% *}"
34750      tmp="$complete EOL"
34751      arguments="${tmp#* }"
34752
34753      # Cannot rely on the command "which" here since it doesn't always work.
34754      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34755      if test -z "$is_absolute_path"; then
34756        # Path to executable is not absolute. Find it.
34757        IFS_save="$IFS"
34758        IFS=:
34759        for p in $PATH; do
34760          if test -f "$p/$path" && test -x "$p/$path"; then
34761            new_path="$p/$path"
34762            break
34763          fi
34764        done
34765        IFS="$IFS_save"
34766      else
34767        # This is an absolute path, we can use it without further modifications.
34768        new_path="$path"
34769      fi
34770
34771      if test "x$new_path" = x; then
34772        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34773$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34774        has_space=`$ECHO "$complete" | $GREP " "`
34775        if test "x$has_space" != x; then
34776          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34777$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34778        fi
34779        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34780      fi
34781    fi
34782
34783    # Now join together the path and the arguments once again
34784    if test "x$arguments" != xEOL; then
34785      new_complete="$new_path ${arguments% *}"
34786    else
34787      new_complete="$new_path"
34788    fi
34789
34790    if test "x$complete" != "x$new_complete"; then
34791      CXX="$new_complete"
34792      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
34793$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
34794    fi
34795  fi
34796
34797  TEST_COMPILER="$CXX"
34798
34799  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
34800$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
34801  SYMLINK_ORIGINAL="$TEST_COMPILER"
34802
34803  if test "x$OPENJDK_BUILD_OS" != xwindows; then
34804    # Follow a chain of symbolic links. Use readlink
34805    # where it exists, else fall back to horribly
34806    # complicated shell code.
34807    if test "x$READLINK_TESTED" != yes; then
34808      # On MacOSX there is a readlink tool with a different
34809      # purpose than the GNU readlink tool. Check the found readlink.
34810      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34811      if test "x$ISGNU" = x; then
34812        # A readlink that we do not know how to use.
34813        # Are there other non-GNU readlinks out there?
34814        READLINK_TESTED=yes
34815        READLINK=
34816      fi
34817    fi
34818
34819    if test "x$READLINK" != x; then
34820      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34821    else
34822      # Save the current directory for restoring afterwards
34823      STARTDIR=$PWD
34824      COUNTER=0
34825      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34826      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34827      cd $sym_link_dir
34828      # Use -P flag to resolve symlinks in directories.
34829      cd `$THEPWDCMD -P`
34830      sym_link_dir=`$THEPWDCMD -P`
34831      # Resolve file symlinks
34832      while test $COUNTER -lt 20; do
34833        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34834        if test "x$ISLINK" == x; then
34835          # This is not a symbolic link! We are done!
34836          break
34837        fi
34838        # Again resolve directory symlinks since the target of the just found
34839        # link could be in a different directory
34840        cd `$DIRNAME $ISLINK`
34841        sym_link_dir=`$THEPWDCMD -P`
34842        sym_link_file=`$BASENAME $ISLINK`
34843        let COUNTER=COUNTER+1
34844      done
34845      cd $STARTDIR
34846      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34847    fi
34848  fi
34849
34850  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34851    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34852$as_echo "no symlink" >&6; }
34853  else
34854    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34855$as_echo "$SYMLINK_ORIGINAL" >&6; }
34856
34857    # We can't handle ccache by gcc wrappers, since we need to know if we're
34858    # using ccache. Instead ccache usage must be controlled by a configure option.
34859    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34860    if test "x$COMPILER_BASENAME" = "xccache"; then
34861      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34862$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34863      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34864    fi
34865  fi
34866
34867
34868  COMPILER=$CXX
34869  COMPILER_NAME=$COMPILER_NAME
34870
34871  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34872    # cc -V output typically looks like
34873    #     cc: Sun C 5.12 Linux_i386 2011/11/16
34874    # or
34875    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
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" =~ (.*\.){4} ]] ; then
35263    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
35264$as_echo "$as_me: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
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%05d\n", $1, $2, $3, $4) }' <<< "$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" =~ (.*\.){4} ]] ; then
35331    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only four parts (W.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%05d\n", $1, $2, $3, $4) }' <<< "$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    # or
46958    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
46959    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
46960    # Check that this is likely to be the Solaris Studio cc.
46961    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
46962    if test $? -ne 0; then
46963      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46964      { $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
46965$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46966      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46967$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
46968      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
46969$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
46970      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46971    fi
46972    # Remove usage instructions (if present), and
46973    # collapse compiler output into a single line
46974    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
46975        $SED -e 's/ *[Uu]sage:.*//'`
46976    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
46977        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
46978  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
46979    # xlc -qversion output typically looks like
46980    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
46981    #     Version: 11.01.0000.0015
46982    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
46983    # Check that this is likely to be the IBM XL C compiler.
46984    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
46985    if test $? -ne 0; then
46986      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46987      { $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
46988$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46989      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46990$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
46991      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
46992$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
46993      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46994    fi
46995    # Collapse compiler output into a single line
46996    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
46997    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
46998        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
46999  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47000    # There is no specific version flag, but all output starts with a version string.
47001    # First line typically looks something like:
47002    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47003    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47004    # Check that this is likely to be Microsoft CL.EXE.
47005    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47006    if test $? -ne 0; then
47007      { $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
47008$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47009      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47010$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47011      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47012    fi
47013    # Collapse compiler output into a single line
47014    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47015    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47016        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47017  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47018    # gcc --version output typically looks like
47019    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47020    #     Copyright (C) 2013 Free Software Foundation, Inc.
47021    #     This is free software; see the source for copying conditions.  There is NO
47022    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47023    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47024    # Check that this is likely to be GCC.
47025    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47026    if test $? -ne 0; then
47027      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
47028$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47029      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47030$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47031      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47032    fi
47033    # Remove Copyright and legalese from version string, and
47034    # collapse into a single line
47035    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47036        $SED -e 's/ *Copyright .*//'`
47037    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47038        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47039  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47040    # clang --version output typically looks like
47041    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47042    #    clang version 3.3 (tags/RELEASE_33/final)
47043    # or
47044    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47045    #    Target: x86_64-pc-linux-gnu
47046    #    Thread model: posix
47047    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47048    # Check that this is likely to be clang
47049    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47050    if test $? -ne 0; then
47051      { $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
47052$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47053      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47054$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47055      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47056    fi
47057    # Collapse compiler output into a single line
47058    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47059    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47060        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47061  else
47062      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47063  fi
47064  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47065  BUILD_CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47066  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47067  BUILD_CC_VERSION_STRING="$COMPILER_VERSION_STRING"
47068
47069  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47070$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47071
47072
47073  COMPILER=$BUILD_CXX
47074  COMPILER_NAME=BuildC++
47075
47076  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47077    # cc -V output typically looks like
47078    #     cc: Sun C 5.12 Linux_i386 2011/11/16
47079    # or
47080    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
47081    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47082    # Check that this is likely to be the Solaris Studio cc.
47083    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
47084    if test $? -ne 0; then
47085      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47086      { $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
47087$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47088      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47089$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47090      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47091$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47092      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47093    fi
47094    # Remove usage instructions (if present), and
47095    # collapse compiler output into a single line
47096    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47097        $SED -e 's/ *[Uu]sage:.*//'`
47098    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47099        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47100  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47101    # xlc -qversion output typically looks like
47102    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47103    #     Version: 11.01.0000.0015
47104    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47105    # Check that this is likely to be the IBM XL C compiler.
47106    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47107    if test $? -ne 0; then
47108      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47109      { $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
47110$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47111      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47112$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47113      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47114$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47115      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47116    fi
47117    # Collapse compiler output into a single line
47118    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47119    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47120        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47121  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47122    # There is no specific version flag, but all output starts with a version string.
47123    # First line typically looks something like:
47124    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47125    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47126    # Check that this is likely to be Microsoft CL.EXE.
47127    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47128    if test $? -ne 0; then
47129      { $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
47130$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47131      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47132$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47133      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47134    fi
47135    # Collapse compiler output into a single line
47136    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47137    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47138        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47139  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47140    # gcc --version output typically looks like
47141    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47142    #     Copyright (C) 2013 Free Software Foundation, Inc.
47143    #     This is free software; see the source for copying conditions.  There is NO
47144    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47145    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47146    # Check that this is likely to be GCC.
47147    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47148    if test $? -ne 0; then
47149      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
47150$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47151      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47152$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47153      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47154    fi
47155    # Remove Copyright and legalese from version string, and
47156    # collapse into a single line
47157    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47158        $SED -e 's/ *Copyright .*//'`
47159    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47160        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47161  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47162    # clang --version output typically looks like
47163    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47164    #    clang version 3.3 (tags/RELEASE_33/final)
47165    # or
47166    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47167    #    Target: x86_64-pc-linux-gnu
47168    #    Thread model: posix
47169    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47170    # Check that this is likely to be clang
47171    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47172    if test $? -ne 0; then
47173      { $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
47174$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47175      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47176$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47177      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47178    fi
47179    # Collapse compiler output into a single line
47180    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47181    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47182        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47183  else
47184      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47185  fi
47186  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47187  BUILD_CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47188  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47189  BUILD_CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
47190
47191  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47192$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47193
47194
47195  if test "x$BUILD_CC_VERSION_NUMBER" != "x$BUILD_CXX_VERSION_NUMBER"; then
47196    { $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
47197$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&2;}
47198    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47199$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47200  fi
47201
47202  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47203  if  [[ "[$]BUILD_CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
47204    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&5
47205$as_echo "$as_me: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47206  fi
47207
47208  if  [[  "[$]BUILD_CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47209    { $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
47210$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47211  fi
47212
47213  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$BUILD_CC_VERSION_NUMBER"`
47214
47215  else
47216    # If we are not cross compiling, use the normal target compilers for
47217    # building the build platform executables.
47218    BUILD_CC="$CC"
47219    BUILD_CXX="$CXX"
47220    BUILD_LD="$LD"
47221    BUILD_LDCXX="$LDCXX"
47222    BUILD_NM="$NM"
47223    BUILD_AS="$AS"
47224    BUILD_OBJCOPY="$OBJCOPY"
47225    BUILD_STRIP="$STRIP"
47226    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
47227    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
47228    BUILD_AR="$AR"
47229
47230
47231  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
47232    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
47233$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
47234    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47235$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47236  fi
47237
47238  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47239  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
47240    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
47241$as_echo "$as_me: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47242  fi
47243
47244  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47245    { $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
47246$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47247  fi
47248
47249  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
47250
47251  fi
47252
47253
47254
47255
47256
47257
47258
47259
47260
47261
47262
47263
47264
47265
47266  # The package path is used only on macosx?
47267  # FIXME: clean this up, and/or move it elsewhere.
47268  PACKAGE_PATH=/opt/local
47269
47270
47271  # Check for extra potential brokenness.
47272  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47273    # On Windows, double-check that we got the right compiler.
47274    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47275    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
47276    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
47277      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
47278        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
47279      fi
47280    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
47281      if test "x$COMPILER_CPU_TEST" != "xx64"; then
47282        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
47283      fi
47284    fi
47285  fi
47286
47287  if test "x$TOOLCHAIN_TYPE" = xgcc; then
47288    # If this is a --hash-style=gnu system, use --hash-style=both, why?
47289    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
47290    # This is later checked when setting flags.
47291
47292    # "-Og" suppported for GCC 4.8 and later
47293    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
47294
47295
47296
47297
47298
47299
47300
47301
47302
47303
47304
47305
47306
47307
47308
47309
47310
47311
47312
47313
47314
47315
47316
47317
47318
47319
47320
47321
47322
47323
47324
47325
47326
47327
47328
47329
47330
47331
47332
47333
47334
47335
47336
47337
47338
47339
47340
47341    # Execute function body
47342
47343
47344
47345
47346
47347
47348
47349
47350
47351
47352
47353
47354
47355
47356
47357
47358
47359
47360
47361
47362
47363
47364
47365
47366
47367
47368
47369
47370
47371
47372
47373
47374
47375
47376
47377
47378
47379
47380
47381
47382
47383
47384
47385
47386
47387
47388
47389
47390    # Execute function body
47391
47392  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47393$as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47394  supports=yes
47395
47396  saved_cflags="$CFLAGS"
47397  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
47398  ac_ext=c
47399ac_cpp='$CPP $CPPFLAGS'
47400ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47401ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47402ac_compiler_gnu=$ac_cv_c_compiler_gnu
47403
47404  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47405/* end confdefs.h.  */
47406int i;
47407_ACEOF
47408if ac_fn_c_try_compile "$LINENO"; then :
47409
47410else
47411  supports=no
47412fi
47413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47414  ac_ext=cpp
47415ac_cpp='$CXXCPP $CPPFLAGS'
47416ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47417ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47418ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47419
47420  CFLAGS="$saved_cflags"
47421
47422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47423$as_echo "$supports" >&6; }
47424  if test "x$supports" = "xyes" ; then
47425    :
47426    C_COMP_SUPPORTS="yes"
47427  else
47428    :
47429    C_COMP_SUPPORTS="no"
47430  fi
47431
47432
47433
47434
47435
47436
47437
47438
47439
47440
47441
47442
47443
47444
47445
47446
47447
47448
47449
47450
47451
47452
47453
47454
47455
47456
47457
47458
47459
47460
47461
47462
47463
47464
47465
47466
47467
47468
47469
47470
47471
47472
47473
47474
47475
47476
47477
47478
47479
47480
47481
47482
47483
47484
47485
47486
47487
47488
47489
47490    # Execute function body
47491
47492  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47493$as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47494  supports=yes
47495
47496  saved_cxxflags="$CXXFLAGS"
47497  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
47498  ac_ext=cpp
47499ac_cpp='$CXXCPP $CPPFLAGS'
47500ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47501ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47502ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47503
47504  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47505/* end confdefs.h.  */
47506int i;
47507_ACEOF
47508if ac_fn_cxx_try_compile "$LINENO"; then :
47509
47510else
47511  supports=no
47512fi
47513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47514  ac_ext=cpp
47515ac_cpp='$CXXCPP $CPPFLAGS'
47516ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47517ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47518ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47519
47520  CXXFLAGS="$saved_cxxflags"
47521
47522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47523$as_echo "$supports" >&6; }
47524  if test "x$supports" = "xyes" ; then
47525    :
47526    CXX_COMP_SUPPORTS="yes"
47527  else
47528    :
47529    CXX_COMP_SUPPORTS="no"
47530  fi
47531
47532
47533
47534
47535
47536
47537
47538
47539
47540
47541
47542
47543
47544  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47545$as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47546  supports=no
47547  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
47548
47549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47550$as_echo "$supports" >&6; }
47551  if test "x$supports" = "xyes" ; then
47552    :
47553    HAS_CFLAG_OPTIMIZE_DEBUG=true
47554  else
47555    :
47556    HAS_CFLAG_OPTIMIZE_DEBUG=false
47557  fi
47558
47559
47560
47561
47562
47563
47564
47565    # "-z relro" supported in GNU binutils 2.17 and later
47566    LINKER_RELRO_FLAG="-Wl,-z,relro"
47567
47568
47569
47570
47571
47572
47573
47574
47575
47576
47577
47578
47579
47580
47581
47582
47583
47584
47585
47586
47587
47588
47589
47590
47591
47592
47593
47594
47595
47596
47597
47598
47599
47600
47601
47602
47603
47604
47605
47606
47607
47608
47609
47610
47611
47612
47613
47614    # Execute function body
47615
47616  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
47617$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
47618  supports=yes
47619
47620  saved_ldflags="$LDFLAGS"
47621  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
47622  ac_ext=c
47623ac_cpp='$CPP $CPPFLAGS'
47624ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47625ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47626ac_compiler_gnu=$ac_cv_c_compiler_gnu
47627
47628  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47629/* end confdefs.h.  */
47630
47631int
47632main ()
47633{
47634
47635  ;
47636  return 0;
47637}
47638_ACEOF
47639if ac_fn_c_try_link "$LINENO"; then :
47640
47641else
47642  supports=no
47643fi
47644rm -f core conftest.err conftest.$ac_objext \
47645    conftest$ac_exeext conftest.$ac_ext
47646  ac_ext=cpp
47647ac_cpp='$CXXCPP $CPPFLAGS'
47648ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47649ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47650ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47651
47652  LDFLAGS="$saved_ldflags"
47653
47654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47655$as_echo "$supports" >&6; }
47656  if test "x$supports" = "xyes" ; then
47657    :
47658    HAS_LINKER_RELRO=true
47659  else
47660    :
47661    HAS_LINKER_RELRO=false
47662  fi
47663
47664
47665
47666
47667
47668
47669
47670
47671
47672
47673
47674
47675
47676    # "-z now" supported in GNU binutils 2.11 and later
47677    LINKER_NOW_FLAG="-Wl,-z,now"
47678
47679
47680
47681
47682
47683
47684
47685
47686
47687
47688
47689
47690
47691
47692
47693
47694
47695
47696
47697
47698
47699
47700
47701
47702
47703
47704
47705
47706
47707
47708
47709
47710
47711
47712
47713
47714
47715
47716
47717
47718
47719
47720
47721
47722
47723
47724
47725    # Execute function body
47726
47727  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
47728$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
47729  supports=yes
47730
47731  saved_ldflags="$LDFLAGS"
47732  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
47733  ac_ext=c
47734ac_cpp='$CPP $CPPFLAGS'
47735ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47736ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47737ac_compiler_gnu=$ac_cv_c_compiler_gnu
47738
47739  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47740/* end confdefs.h.  */
47741
47742int
47743main ()
47744{
47745
47746  ;
47747  return 0;
47748}
47749_ACEOF
47750if ac_fn_c_try_link "$LINENO"; then :
47751
47752else
47753  supports=no
47754fi
47755rm -f core conftest.err conftest.$ac_objext \
47756    conftest$ac_exeext conftest.$ac_ext
47757  ac_ext=cpp
47758ac_cpp='$CXXCPP $CPPFLAGS'
47759ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47760ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47761ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47762
47763  LDFLAGS="$saved_ldflags"
47764
47765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47766$as_echo "$supports" >&6; }
47767  if test "x$supports" = "xyes" ; then
47768    :
47769    HAS_LINKER_NOW=true
47770  else
47771    :
47772    HAS_LINKER_NOW=false
47773  fi
47774
47775
47776
47777
47778
47779
47780
47781
47782
47783
47784
47785
47786  fi
47787
47788  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
47789  # in executable.'
47790  USING_BROKEN_SUSE_LD=no
47791  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
47792    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
47793$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
47794    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
47795    $ECHO "int main() { }" > main.c
47796    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
47797      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47798$as_echo "no" >&6; }
47799      USING_BROKEN_SUSE_LD=no
47800    else
47801      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47802$as_echo "yes" >&6; }
47803      USING_BROKEN_SUSE_LD=yes
47804    fi
47805    $RM version-script.map main.c a.out
47806  fi
47807
47808
47809  # Setup hotspot lecagy names for toolchains
47810  HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
47811  if test "x$TOOLCHAIN_TYPE" = xclang; then
47812    HOTSPOT_TOOLCHAIN_TYPE=gcc
47813  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47814    HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
47815  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47816    HOTSPOT_TOOLCHAIN_TYPE=visCPP
47817  fi
47818
47819
47820
47821# Setup the JTReg Regression Test Harness.
47822
47823
47824# Check whether --with-jtreg was given.
47825if test "${with_jtreg+set}" = set; then :
47826  withval=$with_jtreg;
47827else
47828  with_jtreg=no
47829fi
47830
47831
47832  if test "x$with_jtreg" = xno; then
47833    # jtreg disabled
47834    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47835$as_echo_n "checking for jtreg... " >&6; }
47836    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47837$as_echo "no" >&6; }
47838  else
47839    if test "x$with_jtreg" != xyes; then
47840      # with path specified.
47841      JT_HOME="$with_jtreg"
47842    fi
47843
47844    if test "x$JT_HOME" != x; then
47845      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47846$as_echo_n "checking for jtreg... " >&6; }
47847
47848      # use JT_HOME enviroment var.
47849
47850  # Only process if variable expands to non-empty
47851
47852  if test "x$JT_HOME" != x; then
47853    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47854
47855  # Input might be given as Windows format, start by converting to
47856  # unix format.
47857  path="$JT_HOME"
47858  new_path=`$CYGPATH -u "$path"`
47859
47860  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47861  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47862  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47863  # "foo.exe" is OK but "foo" is an error.
47864  #
47865  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47866  # It is also a way to make sure we got the proper file name for the real test later on.
47867  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47868  if test "x$test_shortpath" = x; then
47869    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47870$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
47871    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
47872  fi
47873
47874  # Call helper function which possibly converts this using DOS-style short mode.
47875  # If so, the updated path is stored in $new_path.
47876
47877  input_path="$new_path"
47878  # Check if we need to convert this using DOS-style short mode. If the path
47879  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47880  # take no chances and rewrite it.
47881  # Note: m4 eats our [], so we need to use [ and ] instead.
47882  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47883  if test "x$has_forbidden_chars" != x; then
47884    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47885    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47886    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47887    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47888      # Going to short mode and back again did indeed matter. Since short mode is
47889      # case insensitive, let's make it lowercase to improve readability.
47890      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47891      # Now convert it back to Unix-style (cygpath)
47892      input_path=`$CYGPATH -u "$shortmode_path"`
47893      new_path="$input_path"
47894    fi
47895  fi
47896
47897  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47898  if test "x$test_cygdrive_prefix" = x; then
47899    # As a simple fix, exclude /usr/bin since it's not a real path.
47900    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47901      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47902      # a path prefixed by /cygdrive for fixpath to work.
47903      new_path="$CYGWIN_ROOT_PATH$input_path"
47904    fi
47905  fi
47906
47907
47908  if test "x$path" != "x$new_path"; then
47909    JT_HOME="$new_path"
47910    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47911$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47912  fi
47913
47914    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47915
47916  path="$JT_HOME"
47917  has_colon=`$ECHO $path | $GREP ^.:`
47918  new_path="$path"
47919  if test "x$has_colon" = x; then
47920    # Not in mixed or Windows style, start by that.
47921    new_path=`cmd //c echo $path`
47922  fi
47923
47924
47925  input_path="$new_path"
47926  # Check if we need to convert this using DOS-style short mode. If the path
47927  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47928  # take no chances and rewrite it.
47929  # Note: m4 eats our [], so we need to use [ and ] instead.
47930  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47931  if test "x$has_forbidden_chars" != x; then
47932    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47933    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47934  fi
47935
47936
47937  windows_path="$new_path"
47938  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47939    unix_path=`$CYGPATH -u "$windows_path"`
47940    new_path="$unix_path"
47941  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47942    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47943    new_path="$unix_path"
47944  fi
47945
47946  if test "x$path" != "x$new_path"; then
47947    JT_HOME="$new_path"
47948    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47949$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47950  fi
47951
47952  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47953  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47954
47955    else
47956      # We're on a unix platform. Hooray! :)
47957      path="$JT_HOME"
47958      has_space=`$ECHO "$path" | $GREP " "`
47959      if test "x$has_space" != x; then
47960        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47961$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
47962        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47963      fi
47964
47965      # Use eval to expand a potential ~
47966      eval path="$path"
47967      if test ! -f "$path" && test ! -d "$path"; then
47968        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
47969      fi
47970
47971      if test -d "$path"; then
47972        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
47973      else
47974        dir="`$DIRNAME "$path"`"
47975        base="`$BASENAME "$path"`"
47976        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
47977      fi
47978    fi
47979  fi
47980
47981
47982      # jtreg win32 script works for everybody
47983      JTREGEXE="$JT_HOME/bin/jtreg"
47984
47985      if test ! -f "$JTREGEXE"; then
47986        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
47987      fi
47988
47989      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
47990$as_echo "$JTREGEXE" >&6; }
47991    else
47992      # try to find jtreg on path
47993
47994
47995
47996  # Publish this variable in the help.
47997
47998
47999  if [ -z "${JTREGEXE+x}" ]; then
48000    # The variable is not set by user, try to locate tool using the code snippet
48001    for ac_prog in jtreg
48002do
48003  # Extract the first word of "$ac_prog", so it can be a program name with args.
48004set dummy $ac_prog; ac_word=$2
48005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48006$as_echo_n "checking for $ac_word... " >&6; }
48007if ${ac_cv_path_JTREGEXE+:} false; then :
48008  $as_echo_n "(cached) " >&6
48009else
48010  case $JTREGEXE in
48011  [\\/]* | ?:[\\/]*)
48012  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48013  ;;
48014  *)
48015  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48016for as_dir in $PATH
48017do
48018  IFS=$as_save_IFS
48019  test -z "$as_dir" && as_dir=.
48020    for ac_exec_ext in '' $ac_executable_extensions; do
48021  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48022    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48023    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48024    break 2
48025  fi
48026done
48027  done
48028IFS=$as_save_IFS
48029
48030  ;;
48031esac
48032fi
48033JTREGEXE=$ac_cv_path_JTREGEXE
48034if test -n "$JTREGEXE"; then
48035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48036$as_echo "$JTREGEXE" >&6; }
48037else
48038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48039$as_echo "no" >&6; }
48040fi
48041
48042
48043  test -n "$JTREGEXE" && break
48044done
48045
48046  else
48047    # The variable is set, but is it from the command line or the environment?
48048
48049    # Try to remove the string !JTREGEXE! from our list.
48050    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
48051    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48052      # If it failed, the variable was not from the command line. Ignore it,
48053      # but warn the user (except for BASH, which is always set by the calling BASH).
48054      if test "xJTREGEXE" != xBASH; then
48055        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
48056$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
48057      fi
48058      # 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      # If it succeeded, then it was overridden by the user. We will use it
48106      # for the tool.
48107
48108      # First remove it from the list of overridden variables, so we can test
48109      # for unknown variables in the end.
48110      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48111
48112      # Check if we try to supply an empty value
48113      if test "x$JTREGEXE" = x; then
48114        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
48115$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
48116        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48117$as_echo_n "checking for JTREGEXE... " >&6; }
48118        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
48119$as_echo "disabled" >&6; }
48120      else
48121        # Check if the provided tool contains a complete path.
48122        tool_specified="$JTREGEXE"
48123        tool_basename="${tool_specified##*/}"
48124        if test "x$tool_basename" = "x$tool_specified"; then
48125          # A command without a complete path is provided, search $PATH.
48126          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
48127$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
48128          # Extract the first word of "$tool_basename", so it can be a program name with args.
48129set dummy $tool_basename; ac_word=$2
48130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48131$as_echo_n "checking for $ac_word... " >&6; }
48132if ${ac_cv_path_JTREGEXE+:} false; then :
48133  $as_echo_n "(cached) " >&6
48134else
48135  case $JTREGEXE in
48136  [\\/]* | ?:[\\/]*)
48137  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48138  ;;
48139  *)
48140  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48141for as_dir in $PATH
48142do
48143  IFS=$as_save_IFS
48144  test -z "$as_dir" && as_dir=.
48145    for ac_exec_ext in '' $ac_executable_extensions; do
48146  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48147    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48148    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48149    break 2
48150  fi
48151done
48152  done
48153IFS=$as_save_IFS
48154
48155  ;;
48156esac
48157fi
48158JTREGEXE=$ac_cv_path_JTREGEXE
48159if test -n "$JTREGEXE"; then
48160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48161$as_echo "$JTREGEXE" >&6; }
48162else
48163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48164$as_echo "no" >&6; }
48165fi
48166
48167
48168          if test "x$JTREGEXE" = x; then
48169            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
48170          fi
48171        else
48172          # Otherwise we believe it is a complete path. Use it as it is.
48173          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
48174$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
48175          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48176$as_echo_n "checking for JTREGEXE... " >&6; }
48177          if test ! -x "$tool_specified"; then
48178            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
48179$as_echo "not found" >&6; }
48180            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
48181          fi
48182          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
48183$as_echo "$tool_specified" >&6; }
48184        fi
48185      fi
48186    fi
48187
48188  fi
48189
48190
48191
48192  if test "x$JTREGEXE" = x; then
48193    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
48194  fi
48195
48196
48197      JT_HOME="`$DIRNAME $JTREGEXE`"
48198    fi
48199  fi
48200
48201
48202
48203
48204
48205
48206  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
48207  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
48208  # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
48209  #                              commands produced by the link step (currently AIX only)
48210  if test "x$TOOLCHAIN_TYPE" = xxlc; then
48211    COMPILER_TARGET_BITS_FLAG="-q"
48212    COMPILER_COMMAND_FILE_FLAG="-f"
48213    COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
48214  else
48215    COMPILER_TARGET_BITS_FLAG="-m"
48216    COMPILER_COMMAND_FILE_FLAG="@"
48217    COMPILER_BINDCMD_FILE_FLAG=""
48218
48219    # The solstudio linker does not support @-files.
48220    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48221      COMPILER_COMMAND_FILE_FLAG=
48222    fi
48223
48224    # Check if @file is supported by gcc
48225    if test "x$TOOLCHAIN_TYPE" = xgcc; then
48226      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
48227$as_echo_n "checking if @file is supported by gcc... " >&6; }
48228      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
48229      $ECHO "" "--version" > command.file
48230      if $CXX @command.file 2>&5 >&5; then
48231        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48232$as_echo "yes" >&6; }
48233        COMPILER_COMMAND_FILE_FLAG="@"
48234      else
48235        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48236$as_echo "no" >&6; }
48237        COMPILER_COMMAND_FILE_FLAG=
48238      fi
48239      $RM command.file
48240    fi
48241  fi
48242
48243
48244
48245
48246  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
48247  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48248    ARFLAGS="-r"
48249  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48250    ARFLAGS="-X64"
48251  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
48252    # lib.exe is used as AR to create static libraries.
48253    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
48254  else
48255    ARFLAGS=""
48256  fi
48257
48258
48259  ## Setup strip.
48260  # FIXME: should this really be per platform, or should it be per toolchain type?
48261  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
48262  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
48263  if test "x$OPENJDK_TARGET_OS" = xlinux; then
48264    STRIPFLAGS="-g"
48265  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
48266    STRIPFLAGS="-x"
48267  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
48268    STRIPFLAGS="-S"
48269  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48270    STRIPFLAGS="-X32_64"
48271  fi
48272
48273
48274
48275  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48276    CC_OUT_OPTION=-Fo
48277    EXE_OUT_OPTION=-out:
48278    LD_OUT_OPTION=-out:
48279    AR_OUT_OPTION=-out:
48280  else
48281    # The option used to specify the target .o,.a or .so file.
48282    # When compiling, how to specify the to be created object file.
48283    CC_OUT_OPTION='-o$(SPACE)'
48284    # When linking, how to specify the to be created executable.
48285    EXE_OUT_OPTION='-o$(SPACE)'
48286    # When linking, how to specify the to be created dynamically linkable library.
48287    LD_OUT_OPTION='-o$(SPACE)'
48288    # When archiving, how to specify the to be create static archive for object files.
48289    AR_OUT_OPTION='rcs$(SPACE)'
48290  fi
48291
48292
48293
48294
48295
48296  # On Windows, we need to set RC flags.
48297  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48298    RC_FLAGS="-nologo -l0x409"
48299    JVM_RCFLAGS="-nologo"
48300    if test "x$DEBUG_LEVEL" = xrelease; then
48301      RC_FLAGS="$RC_FLAGS -DNDEBUG"
48302      JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
48303    fi
48304
48305    # The version variables used to create RC_FLAGS may be overridden
48306    # in a custom configure script, or possibly the command line.
48307    # Let those variables be expanded at make time in spec.gmk.
48308    # The \$ are escaped to the shell, and the $(...) variables
48309    # are evaluated by make.
48310    RC_FLAGS="$RC_FLAGS \
48311        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
48312        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
48313        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
48314        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
48315        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
48316        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
48317        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
48318
48319    JVM_RCFLAGS="$JVM_RCFLAGS \
48320        -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
48321        -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
48322        -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
48323        -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
48324        -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
48325        -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
48326        -D\"HS_FNAME=jvm.dll\" \
48327        -D\"HS_INTERNAL_NAME=jvm\""
48328  fi
48329
48330
48331
48332  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48333    # silence copyright notice and other headers.
48334    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
48335  fi
48336
48337
48338# Now we can test some aspects on the target using configure macros.
48339
48340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
48341$as_echo_n "checking for ANSI C header files... " >&6; }
48342if ${ac_cv_header_stdc+:} false; then :
48343  $as_echo_n "(cached) " >&6
48344else
48345  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48346/* end confdefs.h.  */
48347#include <stdlib.h>
48348#include <stdarg.h>
48349#include <string.h>
48350#include <float.h>
48351
48352int
48353main ()
48354{
48355
48356  ;
48357  return 0;
48358}
48359_ACEOF
48360if ac_fn_cxx_try_compile "$LINENO"; then :
48361  ac_cv_header_stdc=yes
48362else
48363  ac_cv_header_stdc=no
48364fi
48365rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48366
48367if test $ac_cv_header_stdc = yes; then
48368  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
48369  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48370/* end confdefs.h.  */
48371#include <string.h>
48372
48373_ACEOF
48374if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48375  $EGREP "memchr" >/dev/null 2>&1; then :
48376
48377else
48378  ac_cv_header_stdc=no
48379fi
48380rm -f conftest*
48381
48382fi
48383
48384if test $ac_cv_header_stdc = yes; then
48385  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
48386  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48387/* end confdefs.h.  */
48388#include <stdlib.h>
48389
48390_ACEOF
48391if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48392  $EGREP "free" >/dev/null 2>&1; then :
48393
48394else
48395  ac_cv_header_stdc=no
48396fi
48397rm -f conftest*
48398
48399fi
48400
48401if test $ac_cv_header_stdc = yes; then
48402  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
48403  if test "$cross_compiling" = yes; then :
48404  :
48405else
48406  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48407/* end confdefs.h.  */
48408#include <ctype.h>
48409#include <stdlib.h>
48410#if ((' ' & 0x0FF) == 0x020)
48411# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
48412# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
48413#else
48414# define ISLOWER(c) \
48415		   (('a' <= (c) && (c) <= 'i') \
48416		     || ('j' <= (c) && (c) <= 'r') \
48417		     || ('s' <= (c) && (c) <= 'z'))
48418# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
48419#endif
48420
48421#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
48422int
48423main ()
48424{
48425  int i;
48426  for (i = 0; i < 256; i++)
48427    if (XOR (islower (i), ISLOWER (i))
48428	|| toupper (i) != TOUPPER (i))
48429      return 2;
48430  return 0;
48431}
48432_ACEOF
48433if ac_fn_cxx_try_run "$LINENO"; then :
48434
48435else
48436  ac_cv_header_stdc=no
48437fi
48438rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48439  conftest.$ac_objext conftest.beam conftest.$ac_ext
48440fi
48441
48442fi
48443fi
48444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
48445$as_echo "$ac_cv_header_stdc" >&6; }
48446if test $ac_cv_header_stdc = yes; then
48447
48448$as_echo "#define STDC_HEADERS 1" >>confdefs.h
48449
48450fi
48451
48452# On IRIX 5.3, sys/types and inttypes.h are conflicting.
48453for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
48454		  inttypes.h stdint.h unistd.h
48455do :
48456  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
48457ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
48458"
48459if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
48460  cat >>confdefs.h <<_ACEOF
48461#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
48462_ACEOF
48463
48464fi
48465
48466done
48467
48468
48469
48470  ###############################################################################
48471  #
48472  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
48473  # (The JVM can use 32 or 64 bit Java pointers but that decision
48474  # is made at runtime.)
48475  #
48476
48477  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
48478    # Always specify -m flag on Solaris
48479    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
48480
48481  # When we add flags to the "official" CFLAGS etc, we need to
48482  # keep track of these additions in ADDED_CFLAGS etc. These
48483  # will later be checked to make sure only controlled additions
48484  # have been made to CFLAGS etc.
48485  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48486  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48487  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48488
48489  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48490  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48491  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48492
48493  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48494  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48495  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48496
48497  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48498  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48499  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48500
48501  elif test "x$COMPILE_TYPE" = xreduced; then
48502    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
48503      # Specify -m if running reduced on unix platforms
48504
48505  # When we add flags to the "official" CFLAGS etc, we need to
48506  # keep track of these additions in ADDED_CFLAGS etc. These
48507  # will later be checked to make sure only controlled additions
48508  # have been made to CFLAGS etc.
48509  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48510  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48511  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48512
48513  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48514  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48515  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48516
48517  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48518  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48519  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48520
48521  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48522  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48523  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48524
48525    fi
48526  fi
48527  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48528    JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48529    JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48530    JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48531  fi
48532
48533  # Make compilation sanity check
48534  for ac_header in stdio.h
48535do :
48536  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
48537if test "x$ac_cv_header_stdio_h" = xyes; then :
48538  cat >>confdefs.h <<_ACEOF
48539#define HAVE_STDIO_H 1
48540_ACEOF
48541
48542else
48543
48544    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
48545$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
48546    if test "x$COMPILE_TYPE" = xreduced; then
48547
48548  # Print a helpful message on how to acquire the necessary build dependency.
48549  # reduced is the help tag: freetype, cups, alsa etc
48550  MISSING_DEPENDENCY=reduced
48551
48552  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48553    cygwin_help $MISSING_DEPENDENCY
48554  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48555    msys_help $MISSING_DEPENDENCY
48556  else
48557    PKGHANDLER_COMMAND=
48558
48559    case $PKGHANDLER in
48560      apt-get)
48561        apt_help     $MISSING_DEPENDENCY ;;
48562      yum)
48563        yum_help     $MISSING_DEPENDENCY ;;
48564      port)
48565        port_help    $MISSING_DEPENDENCY ;;
48566      pkgutil)
48567        pkgutil_help $MISSING_DEPENDENCY ;;
48568      pkgadd)
48569        pkgadd_help  $MISSING_DEPENDENCY ;;
48570    esac
48571
48572    if test "x$PKGHANDLER_COMMAND" != x; then
48573      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48574    fi
48575  fi
48576
48577      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48578$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48579    elif test "x$COMPILE_TYPE" = xcross; then
48580      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48581$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48582    fi
48583    as_fn_error $? "Cannot continue." "$LINENO" 5
48584
48585fi
48586
48587done
48588
48589
48590  # The cast to long int works around a bug in the HP C Compiler
48591# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48592# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48593# This bug is HP SR number 8606223364.
48594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48595$as_echo_n "checking size of int *... " >&6; }
48596if ${ac_cv_sizeof_int_p+:} false; then :
48597  $as_echo_n "(cached) " >&6
48598else
48599  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48600
48601else
48602  if test "$ac_cv_type_int_p" = yes; then
48603     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48604$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48605as_fn_error 77 "cannot compute sizeof (int *)
48606See \`config.log' for more details" "$LINENO" 5; }
48607   else
48608     ac_cv_sizeof_int_p=0
48609   fi
48610fi
48611
48612fi
48613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48614$as_echo "$ac_cv_sizeof_int_p" >&6; }
48615
48616
48617
48618cat >>confdefs.h <<_ACEOF
48619#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48620_ACEOF
48621
48622
48623
48624  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
48625  if test "x$ac_cv_sizeof_int_p" = x; then
48626    # The test failed, lets stick to the assumed value.
48627    { $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
48628$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
48629  else
48630    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48631
48632    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48633      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
48634      # Let's try to implicitely set the compilers target architecture and retry the test
48635      { $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
48636$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;}
48637      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
48638$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
48639
48640  # When we add flags to the "official" CFLAGS etc, we need to
48641  # keep track of these additions in ADDED_CFLAGS etc. These
48642  # will later be checked to make sure only controlled additions
48643  # have been made to CFLAGS etc.
48644  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48645  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48646  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48647
48648  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48649  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48650  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48651
48652  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48653  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48654  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48655
48656  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48657  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48658  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48659
48660
48661      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
48662      unset ac_cv_sizeof_int_p
48663      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
48664      cat >>confdefs.h <<_ACEOF
48665#undef SIZEOF_INT_P
48666_ACEOF
48667
48668      # The cast to long int works around a bug in the HP C Compiler
48669# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48670# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48671# This bug is HP SR number 8606223364.
48672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48673$as_echo_n "checking size of int *... " >&6; }
48674if ${ac_cv_sizeof_int_p+:} false; then :
48675  $as_echo_n "(cached) " >&6
48676else
48677  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48678
48679else
48680  if test "$ac_cv_type_int_p" = yes; then
48681     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48682$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48683as_fn_error 77 "cannot compute sizeof (int *)
48684See \`config.log' for more details" "$LINENO" 5; }
48685   else
48686     ac_cv_sizeof_int_p=0
48687   fi
48688fi
48689
48690fi
48691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48692$as_echo "$ac_cv_sizeof_int_p" >&6; }
48693
48694
48695
48696cat >>confdefs.h <<_ACEOF
48697#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48698_ACEOF
48699
48700
48701
48702      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48703
48704      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48705        { $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
48706$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;}
48707        if test "x$COMPILE_TYPE" = xreduced; then
48708
48709  # Print a helpful message on how to acquire the necessary build dependency.
48710  # reduced is the help tag: freetype, cups, alsa etc
48711  MISSING_DEPENDENCY=reduced
48712
48713  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48714    cygwin_help $MISSING_DEPENDENCY
48715  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48716    msys_help $MISSING_DEPENDENCY
48717  else
48718    PKGHANDLER_COMMAND=
48719
48720    case $PKGHANDLER in
48721      apt-get)
48722        apt_help     $MISSING_DEPENDENCY ;;
48723      yum)
48724        yum_help     $MISSING_DEPENDENCY ;;
48725      port)
48726        port_help    $MISSING_DEPENDENCY ;;
48727      pkgutil)
48728        pkgutil_help $MISSING_DEPENDENCY ;;
48729      pkgadd)
48730        pkgadd_help  $MISSING_DEPENDENCY ;;
48731    esac
48732
48733    if test "x$PKGHANDLER_COMMAND" != x; then
48734      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48735    fi
48736  fi
48737
48738          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48739$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48740        elif test "x$COMPILE_TYPE" = xcross; then
48741          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48742$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48743        fi
48744        as_fn_error $? "Cannot continue." "$LINENO" 5
48745      fi
48746    fi
48747  fi
48748
48749  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
48750$as_echo_n "checking for target address size... " >&6; }
48751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
48752$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
48753
48754
48755  ###############################################################################
48756  #
48757  # Is the target little of big endian?
48758  #
48759   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
48760$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
48761if ${ac_cv_c_bigendian+:} false; then :
48762  $as_echo_n "(cached) " >&6
48763else
48764  ac_cv_c_bigendian=unknown
48765    # See if we're dealing with a universal compiler.
48766    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48767/* end confdefs.h.  */
48768#ifndef __APPLE_CC__
48769	       not a universal capable compiler
48770	     #endif
48771	     typedef int dummy;
48772
48773_ACEOF
48774if ac_fn_cxx_try_compile "$LINENO"; then :
48775
48776	# Check for potential -arch flags.  It is not universal unless
48777	# there are at least two -arch flags with different values.
48778	ac_arch=
48779	ac_prev=
48780	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
48781	 if test -n "$ac_prev"; then
48782	   case $ac_word in
48783	     i?86 | x86_64 | ppc | ppc64)
48784	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
48785		 ac_arch=$ac_word
48786	       else
48787		 ac_cv_c_bigendian=universal
48788		 break
48789	       fi
48790	       ;;
48791	   esac
48792	   ac_prev=
48793	 elif test "x$ac_word" = "x-arch"; then
48794	   ac_prev=arch
48795	 fi
48796       done
48797fi
48798rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48799    if test $ac_cv_c_bigendian = unknown; then
48800      # See if sys/param.h defines the BYTE_ORDER macro.
48801      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48802/* end confdefs.h.  */
48803#include <sys/types.h>
48804	     #include <sys/param.h>
48805
48806int
48807main ()
48808{
48809#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
48810		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
48811		     && LITTLE_ENDIAN)
48812	      bogus endian macros
48813	     #endif
48814
48815  ;
48816  return 0;
48817}
48818_ACEOF
48819if ac_fn_cxx_try_compile "$LINENO"; then :
48820  # It does; now see whether it defined to BIG_ENDIAN or not.
48821	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48822/* end confdefs.h.  */
48823#include <sys/types.h>
48824		#include <sys/param.h>
48825
48826int
48827main ()
48828{
48829#if BYTE_ORDER != BIG_ENDIAN
48830		 not big endian
48831		#endif
48832
48833  ;
48834  return 0;
48835}
48836_ACEOF
48837if ac_fn_cxx_try_compile "$LINENO"; then :
48838  ac_cv_c_bigendian=yes
48839else
48840  ac_cv_c_bigendian=no
48841fi
48842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48843fi
48844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48845    fi
48846    if test $ac_cv_c_bigendian = unknown; then
48847      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
48848      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48849/* end confdefs.h.  */
48850#include <limits.h>
48851
48852int
48853main ()
48854{
48855#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
48856	      bogus endian macros
48857	     #endif
48858
48859  ;
48860  return 0;
48861}
48862_ACEOF
48863if ac_fn_cxx_try_compile "$LINENO"; then :
48864  # It does; now see whether it defined to _BIG_ENDIAN or not.
48865	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48866/* end confdefs.h.  */
48867#include <limits.h>
48868
48869int
48870main ()
48871{
48872#ifndef _BIG_ENDIAN
48873		 not big endian
48874		#endif
48875
48876  ;
48877  return 0;
48878}
48879_ACEOF
48880if ac_fn_cxx_try_compile "$LINENO"; then :
48881  ac_cv_c_bigendian=yes
48882else
48883  ac_cv_c_bigendian=no
48884fi
48885rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48886fi
48887rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48888    fi
48889    if test $ac_cv_c_bigendian = unknown; then
48890      # Compile a test program.
48891      if test "$cross_compiling" = yes; then :
48892  # Try to guess by grepping values from an object file.
48893	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48894/* end confdefs.h.  */
48895short int ascii_mm[] =
48896		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
48897		short int ascii_ii[] =
48898		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
48899		int use_ascii (int i) {
48900		  return ascii_mm[i] + ascii_ii[i];
48901		}
48902		short int ebcdic_ii[] =
48903		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
48904		short int ebcdic_mm[] =
48905		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
48906		int use_ebcdic (int i) {
48907		  return ebcdic_mm[i] + ebcdic_ii[i];
48908		}
48909		extern int foo;
48910
48911int
48912main ()
48913{
48914return use_ascii (foo) == use_ebcdic (foo);
48915  ;
48916  return 0;
48917}
48918_ACEOF
48919if ac_fn_cxx_try_compile "$LINENO"; then :
48920  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
48921	      ac_cv_c_bigendian=yes
48922	    fi
48923	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
48924	      if test "$ac_cv_c_bigendian" = unknown; then
48925		ac_cv_c_bigendian=no
48926	      else
48927		# finding both strings is unlikely to happen, but who knows?
48928		ac_cv_c_bigendian=unknown
48929	      fi
48930	    fi
48931fi
48932rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48933else
48934  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48935/* end confdefs.h.  */
48936$ac_includes_default
48937int
48938main ()
48939{
48940
48941	     /* Are we little or big endian?  From Harbison&Steele.  */
48942	     union
48943	     {
48944	       long int l;
48945	       char c[sizeof (long int)];
48946	     } u;
48947	     u.l = 1;
48948	     return u.c[sizeof (long int) - 1] == 1;
48949
48950  ;
48951  return 0;
48952}
48953_ACEOF
48954if ac_fn_cxx_try_run "$LINENO"; then :
48955  ac_cv_c_bigendian=no
48956else
48957  ac_cv_c_bigendian=yes
48958fi
48959rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48960  conftest.$ac_objext conftest.beam conftest.$ac_ext
48961fi
48962
48963    fi
48964fi
48965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
48966$as_echo "$ac_cv_c_bigendian" >&6; }
48967 case $ac_cv_c_bigendian in #(
48968   yes)
48969     ENDIAN="big";; #(
48970   no)
48971     ENDIAN="little" ;; #(
48972   universal)
48973     ENDIAN="universal_endianness"
48974     ;; #(
48975   *)
48976     ENDIAN="unknown" ;;
48977 esac
48978
48979
48980  if test "x$ENDIAN" = xuniversal_endianness; then
48981    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
48982  fi
48983  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
48984    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
48985  fi
48986
48987
48988# Configure flags for the tools
48989
48990  ###############################################################################
48991  #
48992  # How to compile shared libraries.
48993  #
48994
48995  if test "x$TOOLCHAIN_TYPE" = xgcc; then
48996    PICFLAG="-fPIC"
48997    C_FLAG_REORDER=''
48998    CXX_FLAG_REORDER=''
48999
49000    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49001      # Linking is different on MacOSX
49002      if test "x$STATIC_BUILD" = xtrue; then
49003        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
49004      else
49005        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49006        JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49007      fi
49008      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49009      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49010      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49011      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49012    else
49013      # Default works for linux, might work on other platforms as well.
49014      SHARED_LIBRARY_FLAGS='-shared'
49015      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
49016      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49017      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49018      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49019    fi
49020  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49021    C_FLAG_REORDER=''
49022    CXX_FLAG_REORDER=''
49023
49024    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49025      # Linking is different on MacOSX
49026      PICFLAG=''
49027      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49028      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49029      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49030      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49031      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49032
49033      if test "x$STATIC_BUILD" = xfalse; then
49034        JVM_CFLAGS="$JVM_CFLAGS -fPIC"
49035      fi
49036    else
49037      # Default works for linux, might work on other platforms as well.
49038      PICFLAG='-fPIC'
49039      SHARED_LIBRARY_FLAGS='-shared'
49040      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
49041      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49042      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49043      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49044    fi
49045  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49046    if test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
49047      PICFLAG="-xcode=pic32"
49048    else
49049      PICFLAG="-KPIC"
49050    fi
49051    C_FLAG_REORDER='-xF'
49052    CXX_FLAG_REORDER='-xF'
49053    SHARED_LIBRARY_FLAGS="-G"
49054    SET_EXECUTABLE_ORIGIN='-R\$$ORIGIN$1'
49055    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49056    SET_SHARED_LIBRARY_NAME='-h $1'
49057    SET_SHARED_LIBRARY_MAPFILE='-M$1'
49058  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49059    # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
49060    # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
49061    # will have to patch this single instruction with a call to some out-of-order code which
49062    # does the load from the TOC. This is of course slow. But in that case we also would have
49063    # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
49064    # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
49065    # can be patched directly by the linker and does not require a jump to out-of-order code.
49066    # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
49067    # instead. This creates a distinct TOC for every compilation unit (and thus requires two
49068    # loads for accessing a global variable). But there are rumors that this may be seen as a
49069    # 'performance feature' because of improved code locality of the symbols used in a
49070    # compilation unit.
49071    PICFLAG="-qpic"
49072    JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49073    C_FLAG_REORDER=''
49074    CXX_FLAG_REORDER=''
49075    SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
49076    SET_EXECUTABLE_ORIGIN=""
49077    SET_SHARED_LIBRARY_ORIGIN=''
49078    SET_SHARED_LIBRARY_NAME=''
49079    SET_SHARED_LIBRARY_MAPFILE=''
49080  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49081    PICFLAG=""
49082    C_FLAG_REORDER=''
49083    CXX_FLAG_REORDER=''
49084    SHARED_LIBRARY_FLAGS="-dll"
49085    SET_EXECUTABLE_ORIGIN=''
49086    SET_SHARED_LIBRARY_ORIGIN=''
49087    SET_SHARED_LIBRARY_NAME=''
49088    SET_SHARED_LIBRARY_MAPFILE='-def:$1'
49089  fi
49090
49091
49092
49093
49094
49095
49096
49097
49098
49099  # The (cross) compiler is now configured, we can now test capabilities
49100  # of the target platform.
49101
49102
49103
49104  ###############################################################################
49105  #
49106  # Setup the opt flags for different compilers
49107  # and different operating systems.
49108  #
49109
49110  # FIXME: this was indirectly the old default, but just inherited.
49111  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49112  #   C_FLAG_DEPS="-MMD -MF"
49113  # fi
49114
49115  # Generate make dependency files
49116  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49117    C_FLAG_DEPS="-MMD -MF"
49118  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49119    C_FLAG_DEPS="-MMD -MF"
49120  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49121    C_FLAG_DEPS="-xMMD -xMF"
49122  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49123    C_FLAG_DEPS="-qmakedep=gcc -MF"
49124  fi
49125  CXX_FLAG_DEPS="$C_FLAG_DEPS"
49126
49127
49128
49129  # Debug symbols
49130  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49131    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
49132      # reduce from default "-g2" option to save space
49133      CFLAGS_DEBUG_SYMBOLS="-g1"
49134      CXXFLAGS_DEBUG_SYMBOLS="-g1"
49135    else
49136      CFLAGS_DEBUG_SYMBOLS="-g"
49137      CXXFLAGS_DEBUG_SYMBOLS="-g"
49138    fi
49139  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49140    CFLAGS_DEBUG_SYMBOLS="-g"
49141    CXXFLAGS_DEBUG_SYMBOLS="-g"
49142  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49143    CFLAGS_DEBUG_SYMBOLS="-g -xs"
49144    # -g0 enables debug symbols without disabling inlining.
49145    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
49146  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49147    CFLAGS_DEBUG_SYMBOLS="-g"
49148    CXXFLAGS_DEBUG_SYMBOLS="-g"
49149  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49150    CFLAGS_DEBUG_SYMBOLS="-Zi"
49151    CXXFLAGS_DEBUG_SYMBOLS="-Zi"
49152  fi
49153
49154
49155
49156  # Debug symbols for JVM_CFLAGS
49157  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49158    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
49159    if test "x$DEBUG_LEVEL" = xslowdebug; then
49160      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49161    else
49162      # -g0 does not disable inlining, which -g does.
49163      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
49164    fi
49165  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49166    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
49167  else
49168    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49169  fi
49170
49171
49172  # bounds, memory and behavior checking options
49173  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49174    case $DEBUG_LEVEL in
49175    release )
49176      # no adjustment
49177      ;;
49178    fastdebug )
49179      # no adjustment
49180      ;;
49181    slowdebug )
49182      # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
49183      # get's added conditionally on whether we produce debug symbols or not.
49184      # This is most likely not really correct.
49185
49186      # Add runtime stack smashing and undefined behavior checks.
49187      # Not all versions of gcc support -fstack-protector
49188      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
49189
49190
49191
49192
49193
49194
49195
49196
49197
49198
49199
49200
49201
49202
49203
49204
49205
49206
49207
49208
49209
49210
49211
49212
49213
49214
49215
49216
49217
49218
49219
49220
49221
49222
49223
49224
49225
49226
49227
49228
49229
49230
49231    # Execute function body
49232
49233
49234
49235
49236
49237
49238
49239
49240
49241
49242
49243
49244
49245
49246
49247
49248
49249
49250
49251
49252
49253
49254
49255
49256
49257
49258
49259
49260
49261
49262
49263
49264
49265
49266
49267
49268
49269
49270
49271
49272
49273
49274
49275
49276
49277
49278
49279
49280    # Execute function body
49281
49282  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49283$as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49284  supports=yes
49285
49286  saved_cflags="$CFLAGS"
49287  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
49288  ac_ext=c
49289ac_cpp='$CPP $CPPFLAGS'
49290ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49291ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49292ac_compiler_gnu=$ac_cv_c_compiler_gnu
49293
49294  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49295/* end confdefs.h.  */
49296int i;
49297_ACEOF
49298if ac_fn_c_try_compile "$LINENO"; then :
49299
49300else
49301  supports=no
49302fi
49303rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49304  ac_ext=cpp
49305ac_cpp='$CXXCPP $CPPFLAGS'
49306ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49307ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49308ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49309
49310  CFLAGS="$saved_cflags"
49311
49312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49313$as_echo "$supports" >&6; }
49314  if test "x$supports" = "xyes" ; then
49315    :
49316    C_COMP_SUPPORTS="yes"
49317  else
49318    :
49319    C_COMP_SUPPORTS="no"
49320  fi
49321
49322
49323
49324
49325
49326
49327
49328
49329
49330
49331
49332
49333
49334
49335
49336
49337
49338
49339
49340
49341
49342
49343
49344
49345
49346
49347
49348
49349
49350
49351
49352
49353
49354
49355
49356
49357
49358
49359
49360
49361
49362
49363
49364
49365
49366
49367
49368
49369
49370
49371
49372
49373
49374
49375
49376
49377
49378
49379
49380    # Execute function body
49381
49382  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49383$as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49384  supports=yes
49385
49386  saved_cxxflags="$CXXFLAGS"
49387  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
49388  ac_ext=cpp
49389ac_cpp='$CXXCPP $CPPFLAGS'
49390ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49391ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49392ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49393
49394  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49395/* end confdefs.h.  */
49396int i;
49397_ACEOF
49398if ac_fn_cxx_try_compile "$LINENO"; then :
49399
49400else
49401  supports=no
49402fi
49403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49404  ac_ext=cpp
49405ac_cpp='$CXXCPP $CPPFLAGS'
49406ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49407ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49408ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49409
49410  CXXFLAGS="$saved_cxxflags"
49411
49412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49413$as_echo "$supports" >&6; }
49414  if test "x$supports" = "xyes" ; then
49415    :
49416    CXX_COMP_SUPPORTS="yes"
49417  else
49418    :
49419    CXX_COMP_SUPPORTS="no"
49420  fi
49421
49422
49423
49424
49425
49426
49427
49428
49429
49430
49431
49432
49433
49434  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49435$as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49436  supports=no
49437  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49438
49439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49440$as_echo "$supports" >&6; }
49441  if test "x$supports" = "xyes" ; then
49442    :
49443
49444  else
49445    :
49446    STACK_PROTECTOR_CFLAG=""
49447  fi
49448
49449
49450
49451
49452
49453
49454
49455      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49456      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49457      if test "x$STACK_PROTECTOR_CFLAG" != x; then
49458        JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49459      fi
49460      ;;
49461    esac
49462  fi
49463
49464  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49465    if test "x$DEBUG_LEVEL" != xrelease; then
49466      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
49467        JVM_CFLAGS="$JVM_CFLAGS -homeparams"
49468      fi
49469    fi
49470  fi
49471
49472  # Optimization levels
49473  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49474    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
49475
49476    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
49477      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
49478      C_O_FLAG_HIGHEST_JVM="-xO4"
49479      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
49480      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
49481      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
49482      C_O_FLAG_DEBUG="-xregs=no%frameptr"
49483      C_O_FLAG_DEBUG_JVM=""
49484      C_O_FLAG_NONE="-xregs=no%frameptr"
49485      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49486      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
49487      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
49488      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
49489      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
49490      CXX_O_FLAG_DEBUG_JVM=""
49491      CXX_O_FLAG_NONE="-xregs=no%frameptr"
49492      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
49493        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
49494        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
49495      fi
49496    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49497      C_O_FLAG_HIGHEST_JVM="-xO4"
49498      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
49499      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49500      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49501      C_O_FLAG_DEBUG=""
49502      C_O_FLAG_DEBUG_JVM=""
49503      C_O_FLAG_NONE=""
49504      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49505      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
49506      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49507      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49508      CXX_O_FLAG_DEBUG=""
49509      CXX_O_FLAG_DEBUG_JVM=""
49510      CXX_O_FLAG_NONE=""
49511    fi
49512  else
49513    # The remaining toolchains share opt flags between CC and CXX;
49514    # setup for C and duplicate afterwards.
49515    if test "x$TOOLCHAIN_TYPE" = xgcc; then
49516      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49517        # On MacOSX we optimize for size, something
49518        # we should do for all platforms?
49519        C_O_FLAG_HIGHEST_JVM="-Os"
49520        C_O_FLAG_HIGHEST="-Os"
49521        C_O_FLAG_HI="-Os"
49522        C_O_FLAG_NORM="-Os"
49523        C_O_FLAG_SIZE="-Os"
49524      else
49525        C_O_FLAG_HIGHEST_JVM="-O3"
49526        C_O_FLAG_HIGHEST="-O3"
49527        C_O_FLAG_HI="-O3"
49528        C_O_FLAG_NORM="-O2"
49529        C_O_FLAG_SIZE="-Os"
49530      fi
49531      C_O_FLAG_DEBUG="-O0"
49532      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49533        C_O_FLAG_DEBUG_JVM=""
49534      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49535        C_O_FLAG_DEBUG_JVM="-O0"
49536      fi
49537      C_O_FLAG_NONE="-O0"
49538    elif test "x$TOOLCHAIN_TYPE" = xclang; then
49539      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49540        # On MacOSX we optimize for size, something
49541        # we should do for all platforms?
49542        C_O_FLAG_HIGHEST_JVM="-Os"
49543        C_O_FLAG_HIGHEST="-Os"
49544        C_O_FLAG_HI="-Os"
49545        C_O_FLAG_NORM="-Os"
49546        C_O_FLAG_SIZE="-Os"
49547      else
49548        C_O_FLAG_HIGHEST_JVM="-O3"
49549        C_O_FLAG_HIGHEST="-O3"
49550        C_O_FLAG_HI="-O3"
49551        C_O_FLAG_NORM="-O2"
49552        C_O_FLAG_SIZE="-Os"
49553      fi
49554      C_O_FLAG_DEBUG="-O0"
49555      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49556        C_O_FLAG_DEBUG_JVM=""
49557      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49558        C_O_FLAG_DEBUG_JVM="-O0"
49559      fi
49560      C_O_FLAG_NONE="-O0"
49561    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49562      C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
49563      C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
49564      C_O_FLAG_HI="-O3 -qinline -qinlglue"
49565      C_O_FLAG_NORM="-O2"
49566      C_O_FLAG_DEBUG="-qnoopt"
49567      # FIXME: Value below not verified.
49568      C_O_FLAG_DEBUG_JVM=""
49569      C_O_FLAG_NONE="-qnoopt"
49570    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49571      C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
49572      C_O_FLAG_HIGHEST="-O2"
49573      C_O_FLAG_HI="-O1"
49574      C_O_FLAG_NORM="-O1"
49575      C_O_FLAG_DEBUG="-Od"
49576      C_O_FLAG_DEBUG_JVM=""
49577      C_O_FLAG_NONE="-Od"
49578      C_O_FLAG_SIZE="-Os"
49579    fi
49580    CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
49581    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
49582    CXX_O_FLAG_HI="$C_O_FLAG_HI"
49583    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
49584    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
49585    CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
49586    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
49587    CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
49588  fi
49589
49590  # Adjust optimization flags according to debug level.
49591  case $DEBUG_LEVEL in
49592    release )
49593      # no adjustment
49594      ;;
49595    fastdebug )
49596      # Not quite so much optimization
49597      C_O_FLAG_HI="$C_O_FLAG_NORM"
49598      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
49599      ;;
49600    slowdebug )
49601      # Disable optimization
49602      C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
49603      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
49604      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
49605      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
49606      C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
49607      CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
49608      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
49609      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
49610      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
49611      CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
49612      ;;
49613  esac
49614
49615
49616
49617
49618
49619
49620
49621
49622
49623
49624
49625
49626
49627
49628
49629
49630
49631
49632
49633  # Special extras...
49634  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49635    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49636      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49637      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49638    fi
49639    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49640    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49641  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49642    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49643    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49644  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
49645    CXXSTD_CXXFLAG="-std=gnu++98"
49646
49647
49648
49649
49650
49651
49652
49653
49654
49655
49656
49657
49658
49659
49660
49661
49662
49663
49664
49665
49666
49667
49668
49669
49670
49671
49672
49673
49674
49675
49676
49677
49678
49679
49680
49681
49682
49683
49684
49685
49686
49687
49688    # Execute function body
49689
49690  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
49691$as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
49692  supports=yes
49693
49694  saved_cxxflags="$CXXFLAGS"
49695  CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
49696  ac_ext=cpp
49697ac_cpp='$CXXCPP $CPPFLAGS'
49698ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49699ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49700ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49701
49702  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49703/* end confdefs.h.  */
49704int i;
49705_ACEOF
49706if ac_fn_cxx_try_compile "$LINENO"; then :
49707
49708else
49709  supports=no
49710fi
49711rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49712  ac_ext=cpp
49713ac_cpp='$CXXCPP $CPPFLAGS'
49714ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49715ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49716ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49717
49718  CXXFLAGS="$saved_cxxflags"
49719
49720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49721$as_echo "$supports" >&6; }
49722  if test "x$supports" = "xyes" ; then
49723    :
49724
49725  else
49726    :
49727    CXXSTD_CXXFLAG=""
49728  fi
49729
49730
49731
49732
49733
49734
49735
49736
49737
49738
49739
49740
49741    CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
49742    JVM_CFLAGS="${JVM_CFLAGS} ${CXXSTD_CXXFLAG}"
49743
49744  fi
49745  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49746    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49747    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49748  fi
49749
49750  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49751    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49752    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49753  fi
49754
49755  CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
49756  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
49757  LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
49758
49759  ###############################################################################
49760  #
49761  # Now setup the CFLAGS and LDFLAGS for the JDK build.
49762  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
49763  #
49764
49765  # Setup compiler/platform specific flags into
49766  #    CFLAGS_JDK    - C Compiler flags
49767  #    CXXFLAGS_JDK  - C++ Compiler flags
49768  #    COMMON_CCXXFLAGS_JDK - common to C and C++
49769  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49770    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49771    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
49772    JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
49773    if test "x$OPENJDK_TARGET_CPU" = xx86; then
49774      # Force compatibility with i586 on 32 bit intel platforms.
49775      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49776      JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49777    fi
49778    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49779        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49780    case $OPENJDK_TARGET_CPU_ARCH in
49781      arm )
49782        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49783        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49784        ;;
49785      ppc )
49786        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49787        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49788        ;;
49789      s390 )
49790        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
49791        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49792        ;;
49793      * )
49794        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49795        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49796        ;;
49797    esac
49798
49799
49800
49801
49802
49803
49804
49805
49806
49807
49808
49809
49810
49811
49812
49813
49814
49815
49816
49817
49818
49819
49820
49821
49822
49823
49824
49825
49826
49827
49828
49829
49830
49831
49832
49833
49834
49835
49836
49837
49838
49839
49840
49841
49842
49843
49844
49845
49846
49847
49848
49849
49850
49851
49852    # Execute function body
49853
49854  # Need to assign to a variable since m4 is blocked from modifying parts in [].
49855  REFERENCE_VERSION=6
49856
49857  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
49858    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
49859  fi
49860
49861  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
49862    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
49863  fi
49864
49865  # Version comparison method inspired by http://stackoverflow.com/a/24067243
49866  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
49867
49868  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
49869    :
49870
49871  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
49872  # runs afoul of the more aggressive versions of these optimisations.
49873  # Notably, value range propagation now assumes that the this pointer of C++
49874  # member functions is non-null.
49875  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
49876        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
49877        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
49878$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
49879  CFLAGS_JDK="$CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
49880  JVM_CFLAGS="$JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
49881
49882  else
49883    :
49884
49885  fi
49886
49887
49888
49889
49890
49891
49892
49893
49894
49895
49896
49897
49898
49899
49900  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49901    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49902
49903    # Restrict the debug information created by Clang to avoid
49904    # too big object files and speed the build up a little bit
49905    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
49906    JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
49907    if test "x$OPENJDK_TARGET_OS" = xlinux; then
49908      if test "x$OPENJDK_TARGET_CPU" = xx86; then
49909        # Force compatibility with i586 on 32 bit intel platforms.
49910        COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49911        JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49912      fi
49913      JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
49914      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49915          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49916      case $OPENJDK_TARGET_CPU_ARCH in
49917        ppc )
49918          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49919          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49920          ;;
49921        * )
49922          COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49923          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49924          ;;
49925      esac
49926    fi
49927  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49928    JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
49929    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
49930    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
49931      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
49932    fi
49933
49934    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
49935    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
49936  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49937    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
49938    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
49939    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
49940  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49941    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
49942        -MD -Zc:wchar_t- -W3 -wd4800 \
49943        -DWIN32_LEAN_AND_MEAN \
49944        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
49945        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
49946        -DWIN32 -DIAL"
49947    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
49948      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
49949    else
49950      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
49951    fi
49952    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
49953    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
49954    # studio.
49955    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
49956      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
49957      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
49958      JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
49959    fi
49960  fi
49961
49962  ###############################################################################
49963
49964  # Adjust flags according to debug level.
49965  case $DEBUG_LEVEL in
49966    fastdebug | slowdebug )
49967      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
49968      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
49969      ;;
49970    release )
49971      ;;
49972    * )
49973      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
49974      ;;
49975  esac
49976
49977  # Set some common defines. These works for all compilers, but assume
49978  # -D is universally accepted.
49979
49980  # Setup endianness
49981  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
49982    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
49983    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
49984    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
49985    #   Note: -Dmacro         is the same as    #define macro 1
49986    #         -Dmacro=        is the same as    #define macro
49987    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49988      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
49989    else
49990      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
49991    fi
49992  else
49993    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
49994    # are defined in the system?
49995    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49996      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
49997    else
49998      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
49999    fi
50000  fi
50001
50002  # Setup target OS define. Use OS target name but in upper case.
50003  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50004  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
50005
50006  # Setup target CPU
50007  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50008      $OPENJDK_TARGET_ADD_LP64 \
50009      -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
50010
50011  # Setup debug/release defines
50012  if test "x$DEBUG_LEVEL" = xrelease; then
50013    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
50014    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50015      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
50016    fi
50017  else
50018    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
50019  fi
50020
50021  # Set some additional per-OS defines.
50022  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50023    JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
50024    JVM_CFLAGS="$JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
50025        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50026  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50027    JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
50028    JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
50029        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
50030  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50031    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50032    JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
50033    JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50034    JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50035        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50036        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50037        -fno-omit-frame-pointer"
50038  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50039    JVM_CFLAGS="$JVM_CFLAGS -DAIX"
50040    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50041    JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced \
50042        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50043        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50044  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50045    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50046  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50047    JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50048    JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
50049  fi
50050
50051  # Set some additional per-CPU defines.
50052  if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
50053    JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
50054  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50055    JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
50056  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
50057    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50058      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50059      # fixes `relocation truncated to fit' error for gcc 4.1.
50060      JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
50061      # Use ppc64 instructions, but schedule for power5
50062      JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50063    elif test "x$OPENJDK_TARGET_OS" = xaix; then
50064      JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
50065    fi
50066  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
50067    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50068      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50069      # Little endian machine uses ELFv2 ABI.
50070      JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
50071      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50072      JVM_CFLAGS="$JVM_CFLAGS -mcpu=power8 -mtune=power8"
50073    fi
50074  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
50075    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50076      JVM_CFLAGS="$JVM_CFLAGS -mbackchain -march=z10"
50077    fi
50078  fi
50079
50080  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50081    JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50082  fi
50083
50084  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50085    if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
50086      # Solaris does not have _LP64=1 in the old build.
50087      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50088      JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
50089    fi
50090  fi
50091
50092  # Set JVM_CFLAGS warning handling
50093  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50094    JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50095        -Wunused-value -Woverloaded-virtual"
50096
50097    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50098
50099
50100
50101
50102
50103
50104
50105
50106
50107
50108
50109
50110
50111
50112
50113
50114
50115
50116
50117
50118
50119
50120
50121
50122
50123
50124
50125
50126
50127
50128
50129
50130
50131
50132
50133
50134
50135
50136
50137
50138
50139
50140
50141
50142
50143
50144
50145
50146
50147
50148
50149
50150
50151
50152    # Execute function body
50153
50154  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50155  REFERENCE_VERSION=4.8
50156
50157  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
50158    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
50159  fi
50160
50161  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50162    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
50163  fi
50164
50165  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50166  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
50167
50168  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50169    :
50170
50171            # These flags either do not work or give spurious warnings prior to gcc 4.8.
50172            JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
50173
50174
50175  else
50176    :
50177
50178  fi
50179
50180
50181
50182
50183
50184
50185
50186
50187
50188
50189
50190
50191
50192
50193    fi
50194    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
50195      # Non-zero builds have stricter warnings
50196      JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
50197    else
50198      if test "x$TOOLCHAIN_TYPE" = xclang; then
50199        # Some versions of llvm do not like -Wundef
50200        JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
50201      fi
50202    fi
50203  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50204    JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
50205        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
50206  fi
50207
50208  # Additional macosx handling
50209  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50210    # Setting these parameters makes it an error to link to macosx APIs that are
50211    # newer than the given OS version and makes the linked binaries compatible
50212    # even if built on a newer version of the OS.
50213    # The expected format is X.Y.Z
50214    MACOSX_VERSION_MIN=10.7.0
50215
50216
50217    # The macro takes the version with no dots, ex: 1070
50218    # Let the flags variables get resolved in make for easier override on make
50219    # command line.
50220    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50221    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50222  fi
50223
50224  # Setup some hard coded includes
50225  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50226      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
50227      -I${JDK_TOPDIR}/src/java.base/share/native/include \
50228      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
50229      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
50230      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
50231      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
50232
50233  # The shared libraries are compiled using the picflag.
50234  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50235      $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
50236  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50237      $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
50238
50239  # Executable flags
50240  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
50241  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
50242
50243
50244
50245
50246
50247
50248  # Setup LDFLAGS et al.
50249  #
50250
50251  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50252    LDFLAGS_MICROSOFT="-nologo -opt:ref"
50253    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
50254    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
50255    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50256      LDFLAGS_SAFESH="-safeseh"
50257      LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
50258      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
50259      # NOTE: Old build added -machine. Probably not needed.
50260      JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
50261    else
50262      JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
50263    fi
50264  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50265      JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
50266      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50267        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
50268        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50269    fi
50270  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50271    # If this is a --hash-style=gnu system, use --hash-style=both, why?
50272    # We have previously set HAS_GNU_HASH if this is the case
50273    if test -n "$HAS_GNU_HASH"; then
50274      LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
50275      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
50276      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
50277    fi
50278      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50279        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50280    fi
50281    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50282      # And since we now know that the linker is gnu, then add -z defs, to forbid
50283      # undefined symbols in object files.
50284      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
50285      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
50286      JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
50287      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
50288      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
50289      if test "x$OPENJDK_TARGET_CPU" = xx86; then
50290        JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
50291      fi
50292      case $DEBUG_LEVEL in
50293        release )
50294          # tell linker to optimize libraries.
50295          # Should this be supplied to the OSS linker as well?
50296          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
50297          LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
50298          JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
50299          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50300            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50301          fi
50302          ;;
50303        slowdebug )
50304          # Hotspot always let the linker optimize
50305          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50306          if test "x$HAS_LINKER_NOW" = "xtrue"; then
50307            # do relocations at load
50308            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
50309            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
50310            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
50311          fi
50312          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50313            # mark relocations read only
50314            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50315            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50316            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50317          fi
50318          ;;
50319        fastdebug )
50320          # Hotspot always let the linker optimize
50321          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50322          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50323            # mark relocations read only
50324            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50325            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50326            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50327          fi
50328          ;;
50329        * )
50330          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50331          ;;
50332        esac
50333    fi
50334  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50335    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
50336    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
50337    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
50338    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
50339    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
50340    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50341      JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
50342    fi
50343  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50344    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
50345    LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
50346    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
50347  fi
50348
50349  # Customize LDFLAGS for executables
50350
50351  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
50352
50353  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50354    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
50355      LDFLAGS_STACK_SIZE=1048576
50356    else
50357      LDFLAGS_STACK_SIZE=327680
50358    fi
50359    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
50360  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50361    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
50362  fi
50363
50364  LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
50365
50366  # Customize LDFLAGS for libs
50367  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
50368
50369  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
50370  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50371    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50372        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
50373    JDKLIB_LIBS=""
50374  else
50375    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50376        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)"
50377
50378    if test "xTARGET" = "xTARGET"; then
50379    # On some platforms (mac) the linker warns about non existing -L dirs.
50380    # Add server first if available. Linking aginst client does not always produce the same results.
50381      # Only add client/minimal dir if client/minimal is being built.
50382    # Default to server for other variants.
50383      if   [[ " $JVM_VARIANTS " =~ " server " ]]  ; then
50384        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50385      elif   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
50386        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/client"
50387      elif   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
50388        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/minimal"
50389    else
50390        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50391    fi
50392    elif test "xTARGET" = "xBUILD"; then
50393      # When building a buildjdk, it's always only the server variant
50394      JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50395          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50396    fi
50397
50398    JDKLIB_LIBS="-ljava -ljvm"
50399    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50400      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
50401    fi
50402
50403  fi
50404
50405LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${JAVA_BASE_LDFLAGS}"
50406
50407  # Set JVM_LIBS (per os)
50408  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50409    JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
50410  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50411    # FIXME: This hard-coded path is not really proper.
50412    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50413      SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
50414    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50415      SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
50416    fi
50417    JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
50418        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
50419  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50420    JVM_LIBS="$JVM_LIBS -lm"
50421  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50422    JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
50423  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50424    JVM_LIBS="$JVM_LIBS -lm"
50425  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50426    JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
50427        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
50428        wsock32.lib winmm.lib version.lib psapi.lib"
50429    fi
50430
50431  # Set JVM_ASFLAGS
50432  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50433    if test "x$OPENJDK_TARGET_CPU" = xx86; then
50434      JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
50435    fi
50436  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50437    JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
50438  fi
50439
50440  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
50441
50442
50443
50444
50445
50446
50447
50448
50449
50450
50451
50452
50453
50454
50455
50456  # Special extras...
50457  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50458    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
50459      OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50460      OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50461    fi
50462    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50463    OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50464  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50465    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50466    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50467  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50468    OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
50469
50470
50471
50472
50473
50474
50475
50476
50477
50478
50479
50480
50481
50482
50483
50484
50485
50486
50487
50488
50489
50490
50491
50492
50493
50494
50495
50496
50497
50498
50499
50500
50501
50502
50503
50504
50505
50506
50507
50508
50509
50510
50511    # Execute function body
50512
50513  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
50514$as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
50515  supports=yes
50516
50517  saved_cxxflags="$CXXFLAGS"
50518  CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
50519  ac_ext=cpp
50520ac_cpp='$CXXCPP $CPPFLAGS'
50521ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50522ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50523ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50524
50525  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50526/* end confdefs.h.  */
50527int i;
50528_ACEOF
50529if ac_fn_cxx_try_compile "$LINENO"; then :
50530
50531else
50532  supports=no
50533fi
50534rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50535  ac_ext=cpp
50536ac_cpp='$CXXCPP $CPPFLAGS'
50537ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50538ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50539ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50540
50541  CXXFLAGS="$saved_cxxflags"
50542
50543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50544$as_echo "$supports" >&6; }
50545  if test "x$supports" = "xyes" ; then
50546    :
50547
50548  else
50549    :
50550    OPENJDK_BUILD_CXXSTD_CXXFLAG=""
50551  fi
50552
50553
50554
50555
50556
50557
50558
50559
50560
50561
50562
50563
50564    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50565    OPENJDK_BUILD_JVM_CFLAGS="${OPENJDK_BUILD_JVM_CFLAGS} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50566
50567  fi
50568  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50569    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50570    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50571  fi
50572
50573  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50574    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50575    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50576  fi
50577
50578  OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
50579  OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
50580  OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
50581
50582  ###############################################################################
50583  #
50584  # Now setup the CFLAGS and LDFLAGS for the JDK build.
50585  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
50586  #
50587
50588  # Setup compiler/platform specific flags into
50589  #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
50590  #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
50591  #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
50592  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50593    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50594    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
50595    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
50596    if test "x$OPENJDK_BUILD_CPU" = xx86; then
50597      # Force compatibility with i586 on 32 bit intel platforms.
50598      OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50599      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50600    fi
50601    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50602        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50603    case $OPENJDK_BUILD_CPU_ARCH in
50604      arm )
50605        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50606        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50607        ;;
50608      ppc )
50609        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50610        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50611        ;;
50612      s390 )
50613        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
50614        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50615        ;;
50616      * )
50617        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50618        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50619        ;;
50620    esac
50621
50622
50623
50624
50625
50626
50627
50628
50629
50630
50631
50632
50633
50634
50635
50636
50637
50638
50639
50640
50641
50642
50643
50644
50645
50646
50647
50648
50649
50650
50651
50652
50653
50654
50655
50656
50657
50658
50659
50660
50661
50662
50663
50664
50665
50666
50667
50668
50669
50670
50671
50672
50673
50674
50675    # Execute function body
50676
50677  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50678  REFERENCE_VERSION=6
50679
50680  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
50681    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
50682  fi
50683
50684  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50685    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50686  fi
50687
50688  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50689  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
50690
50691  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50692    :
50693
50694  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
50695  # runs afoul of the more aggressive versions of these optimisations.
50696  # Notably, value range propagation now assumes that the this pointer of C++
50697  # member functions is non-null.
50698  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
50699        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
50700        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
50701$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
50702  OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50703  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50704
50705  else
50706    :
50707
50708  fi
50709
50710
50711
50712
50713
50714
50715
50716
50717
50718
50719
50720
50721
50722
50723  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50724    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50725
50726    # Restrict the debug information created by Clang to avoid
50727    # too big object files and speed the build up a little bit
50728    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50729    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
50730    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50731      if test "x$OPENJDK_BUILD_CPU" = xx86; then
50732        # Force compatibility with i586 on 32 bit intel platforms.
50733        OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50734        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50735      fi
50736      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
50737      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50738          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50739      case $OPENJDK_BUILD_CPU_ARCH in
50740        ppc )
50741          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50742          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50743          ;;
50744        * )
50745          OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50746          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50747          ;;
50748      esac
50749    fi
50750  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50751    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
50752    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50753    if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
50754      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
50755    fi
50756
50757    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50758    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50759  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50760    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50761    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50762    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50763  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50764    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50765        -MD -Zc:wchar_t- -W3 -wd4800 \
50766        -DWIN32_LEAN_AND_MEAN \
50767        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50768        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50769        -DWIN32 -DIAL"
50770    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
50771      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50772    else
50773      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50774    fi
50775    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50776    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50777    # studio.
50778    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50779      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50780      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50781      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50782    fi
50783  fi
50784
50785  ###############################################################################
50786
50787  # Adjust flags according to debug level.
50788  case $DEBUG_LEVEL in
50789    fastdebug | slowdebug )
50790      OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50791      OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50792      ;;
50793    release )
50794      ;;
50795    * )
50796      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50797      ;;
50798  esac
50799
50800  # Set some common defines. These works for all compilers, but assume
50801  # -D is universally accepted.
50802
50803  # Setup endianness
50804  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50805    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50806    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50807    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50808    #   Note: -Dmacro         is the same as    #define macro 1
50809    #         -Dmacro=        is the same as    #define macro
50810    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50811      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50812    else
50813      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50814    fi
50815  else
50816    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50817    # are defined in the system?
50818    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50819      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50820    else
50821      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50822    fi
50823  fi
50824
50825  # Setup target OS define. Use OS target name but in upper case.
50826  OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50827  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
50828
50829  # Setup target CPU
50830  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50831      $OPENJDK_BUILD_ADD_LP64 \
50832      -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
50833
50834  # Setup debug/release defines
50835  if test "x$DEBUG_LEVEL" = xrelease; then
50836    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
50837    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50838      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
50839    fi
50840  else
50841    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
50842  fi
50843
50844  # Set some additional per-OS defines.
50845  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50846    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
50847    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
50848        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50849  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
50850    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
50851    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
50852        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
50853  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
50854    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50855    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
50856    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50857    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50858        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50859        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50860        -fno-omit-frame-pointer"
50861  elif test "x$OPENJDK_BUILD_OS" = xaix; then
50862    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
50863    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50864    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced \
50865        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50866        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50867  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
50868    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50869  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
50870    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50871    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
50872  fi
50873
50874  # Set some additional per-CPU defines.
50875  if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
50876    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
50877  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
50878    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
50879  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
50880    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50881      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50882      # fixes `relocation truncated to fit' error for gcc 4.1.
50883      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
50884      # Use ppc64 instructions, but schedule for power5
50885      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50886    elif test "x$OPENJDK_BUILD_OS" = xaix; then
50887      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
50888    fi
50889  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
50890    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50891      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50892      # Little endian machine uses ELFv2 ABI.
50893      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
50894      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50895      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power8 -mtune=power8"
50896    fi
50897  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
50898    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50899      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mbackchain -march=z10"
50900    fi
50901  fi
50902
50903  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50904    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50905  fi
50906
50907  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
50908    if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
50909      # Solaris does not have _LP64=1 in the old build.
50910      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50911      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
50912    fi
50913  fi
50914
50915  # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
50916  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50917    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50918        -Wunused-value -Woverloaded-virtual"
50919
50920    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50921
50922
50923
50924
50925
50926
50927
50928
50929
50930
50931
50932
50933
50934
50935
50936
50937
50938
50939
50940
50941
50942
50943
50944
50945
50946
50947
50948
50949
50950
50951
50952
50953
50954
50955
50956
50957
50958
50959
50960
50961
50962
50963
50964
50965
50966
50967
50968
50969
50970
50971
50972
50973
50974
50975    # Execute function body
50976
50977  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50978  REFERENCE_VERSION=4.8
50979
50980  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
50981    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
50982  fi
50983
50984  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50985    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
50986  fi
50987
50988  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50989  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
50990
50991  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50992    :
50993
50994            # These flags either do not work or give spurious warnings prior to gcc 4.8.
50995            OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
50996
50997
50998  else
50999    :
51000
51001  fi
51002
51003
51004
51005
51006
51007
51008
51009
51010
51011
51012
51013
51014
51015
51016    fi
51017    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
51018      # Non-zero builds have stricter warnings
51019      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51020    else
51021      if test "x$TOOLCHAIN_TYPE" = xclang; then
51022        # Some versions of llvm do not like -Wundef
51023        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
51024      fi
51025    fi
51026  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51027    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51028        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51029  fi
51030
51031  # Additional macosx handling
51032  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51033    # Setting these parameters makes it an error to link to macosx APIs that are
51034    # newer than the given OS version and makes the linked binaries compatible
51035    # even if built on a newer version of the OS.
51036    # The expected format is X.Y.Z
51037    MACOSX_VERSION_MIN=10.7.0
51038
51039
51040    # The macro takes the version with no dots, ex: 1070
51041    # Let the flags variables get resolved in make for easier override on make
51042    # command line.
51043    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)"
51044    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51045  fi
51046
51047  # Setup some hard coded includes
51048  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51049      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
51050      -I${JDK_TOPDIR}/src/java.base/share/native/include \
51051      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
51052      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
51053      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51054      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
51055
51056  # The shared libraries are compiled using the picflag.
51057  OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51058      $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
51059  OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51060      $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
51061
51062  # Executable flags
51063  OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
51064  OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
51065
51066
51067
51068
51069
51070
51071  # Setup LDFLAGS et al.
51072  #
51073
51074  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51075    LDFLAGS_MICROSOFT="-nologo -opt:ref"
51076    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51077    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51078    if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
51079      LDFLAGS_SAFESH="-safeseh"
51080      OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
51081      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
51082      # NOTE: Old build added -machine. Probably not needed.
51083      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
51084    else
51085      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
51086    fi
51087  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51088      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51089      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51090        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51091        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51092    fi
51093  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51094    # If this is a --hash-style=gnu system, use --hash-style=both, why?
51095    # We have previously set HAS_GNU_HASH if this is the case
51096    if test -n "$HAS_GNU_HASH"; then
51097      OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51098      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51099      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51100    fi
51101      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51102        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51103    fi
51104    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51105      # And since we now know that the linker is gnu, then add -z defs, to forbid
51106      # undefined symbols in object files.
51107      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51108      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51109      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51110      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51111      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51112      if test "x$OPENJDK_BUILD_CPU" = xx86; then
51113        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
51114      fi
51115      case $DEBUG_LEVEL in
51116        release )
51117          # tell linker to optimize libraries.
51118          # Should this be supplied to the OSS linker as well?
51119          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51120          OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51121          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51122          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51123            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51124          fi
51125          ;;
51126        slowdebug )
51127          # Hotspot always let the linker optimize
51128          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51129          if test "x$HAS_LINKER_NOW" = "xtrue"; then
51130            # do relocations at load
51131            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
51132            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51133            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
51134          fi
51135          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51136            # mark relocations read only
51137            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51138            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51139            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51140          fi
51141          ;;
51142        fastdebug )
51143          # Hotspot always let the linker optimize
51144          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51145          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51146            # mark relocations read only
51147            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51148            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51149            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51150          fi
51151          ;;
51152        * )
51153          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51154          ;;
51155        esac
51156    fi
51157  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51158    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
51159    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
51160    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
51161    OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
51162    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
51163    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
51164      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
51165    fi
51166  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51167    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
51168    OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
51169    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
51170  fi
51171
51172  # Customize LDFLAGS for executables
51173
51174  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
51175
51176  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51177    if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
51178      LDFLAGS_STACK_SIZE=1048576
51179    else
51180      LDFLAGS_STACK_SIZE=327680
51181    fi
51182    OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
51183  elif test "x$OPENJDK_BUILD_OS" = xlinux; then
51184    OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
51185  fi
51186
51187  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51188
51189  # Customize LDFLAGS for libs
51190  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
51191
51192  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
51193  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51194    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51195        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
51196    OPENJDK_BUILD_JDKLIB_LIBS=""
51197  else
51198    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51199        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)"
51200
51201    if test "xBUILD" = "xTARGET"; then
51202    # On some platforms (mac) the linker warns about non existing -L dirs.
51203    # Add server first if available. Linking aginst client does not always produce the same results.
51204      # Only add client/minimal dir if client/minimal is being built.
51205    # Default to server for other variants.
51206      if   [[ " $JVM_VARIANTS " =~ " server " ]]  ; then
51207        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51208      elif   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
51209        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/client"
51210      elif   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
51211        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/minimal"
51212    else
51213        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51214    fi
51215    elif test "xBUILD" = "xBUILD"; then
51216      # When building a buildjdk, it's always only the server variant
51217      OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51218          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51219    fi
51220
51221    OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
51222    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51223      OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
51224    fi
51225
51226  fi
51227
51228OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_JAVA_BASE_LDFLAGS}"
51229
51230  # Set OPENJDK_BUILD_JVM_LIBS (per os)
51231  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51232    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
51233  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51234    # FIXME: This hard-coded path is not really proper.
51235    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
51236      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
51237    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51238      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
51239    fi
51240    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
51241        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
51242  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51243    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51244  elif test "x$OPENJDK_BUILD_OS" = xaix; then
51245    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
51246  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51247    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51248  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51249    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
51250        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
51251        wsock32.lib winmm.lib version.lib psapi.lib"
51252    fi
51253
51254  # Set OPENJDK_BUILD_JVM_ASFLAGS
51255  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51256    if test "x$OPENJDK_BUILD_CPU" = xx86; then
51257      OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
51258    fi
51259  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51260    OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
51261  fi
51262
51263  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51264
51265
51266
51267
51268
51269
51270
51271
51272
51273
51274
51275
51276
51277
51278
51279  # Tests are only ever compiled for TARGET
51280  # Flags for compiling test libraries
51281  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51282  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51283
51284  # Flags for compiling test executables
51285  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
51286  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
51287
51288
51289
51290
51291
51292
51293  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
51294  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE $JAVA_BASE_LDFLAGS"
51295
51296
51297
51298
51299
51300
51301  # Some Zero and Shark settings.
51302  # ZERO_ARCHFLAG tells the compiler which mode to build for
51303  case "${OPENJDK_TARGET_CPU}" in
51304    s390)
51305      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
51306      ;;
51307    *)
51308      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51309  esac
51310
51311
51312
51313
51314
51315
51316
51317
51318
51319
51320
51321
51322
51323
51324
51325
51326
51327
51328
51329
51330
51331
51332
51333
51334
51335
51336
51337
51338
51339
51340
51341
51342
51343
51344
51345
51346
51347
51348
51349
51350
51351
51352    # Execute function body
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
51391
51392
51393
51394
51395
51396
51397
51398
51399
51400
51401    # Execute function body
51402
51403  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$ZERO_ARCHFLAG\"" >&5
51404$as_echo_n "checking if the C compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51405  supports=yes
51406
51407  saved_cflags="$CFLAGS"
51408  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
51409  ac_ext=c
51410ac_cpp='$CPP $CPPFLAGS'
51411ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51412ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51413ac_compiler_gnu=$ac_cv_c_compiler_gnu
51414
51415  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51416/* end confdefs.h.  */
51417int i;
51418_ACEOF
51419if ac_fn_c_try_compile "$LINENO"; then :
51420
51421else
51422  supports=no
51423fi
51424rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51425  ac_ext=cpp
51426ac_cpp='$CXXCPP $CPPFLAGS'
51427ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51428ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51429ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51430
51431  CFLAGS="$saved_cflags"
51432
51433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51434$as_echo "$supports" >&6; }
51435  if test "x$supports" = "xyes" ; then
51436    :
51437    C_COMP_SUPPORTS="yes"
51438  else
51439    :
51440    C_COMP_SUPPORTS="no"
51441  fi
51442
51443
51444
51445
51446
51447
51448
51449
51450
51451
51452
51453
51454
51455
51456
51457
51458
51459
51460
51461
51462
51463
51464
51465
51466
51467
51468
51469
51470
51471
51472
51473
51474
51475
51476
51477
51478
51479
51480
51481
51482
51483
51484
51485
51486
51487
51488
51489
51490
51491
51492
51493
51494
51495
51496
51497
51498
51499
51500
51501    # Execute function body
51502
51503  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"" >&5
51504$as_echo_n "checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51505  supports=yes
51506
51507  saved_cxxflags="$CXXFLAGS"
51508  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
51509  ac_ext=cpp
51510ac_cpp='$CXXCPP $CPPFLAGS'
51511ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51512ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51513ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51514
51515  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51516/* end confdefs.h.  */
51517int i;
51518_ACEOF
51519if ac_fn_cxx_try_compile "$LINENO"; then :
51520
51521else
51522  supports=no
51523fi
51524rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51525  ac_ext=cpp
51526ac_cpp='$CXXCPP $CPPFLAGS'
51527ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51528ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51529ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51530
51531  CXXFLAGS="$saved_cxxflags"
51532
51533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51534$as_echo "$supports" >&6; }
51535  if test "x$supports" = "xyes" ; then
51536    :
51537    CXX_COMP_SUPPORTS="yes"
51538  else
51539    :
51540    CXX_COMP_SUPPORTS="no"
51541  fi
51542
51543
51544
51545
51546
51547
51548
51549
51550
51551
51552
51553
51554
51555  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$ZERO_ARCHFLAG\"" >&5
51556$as_echo_n "checking if both compilers support \"$ZERO_ARCHFLAG\"... " >&6; }
51557  supports=no
51558  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51559
51560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51561$as_echo "$supports" >&6; }
51562  if test "x$supports" = "xyes" ; then
51563    :
51564
51565  else
51566    :
51567    ZERO_ARCHFLAG=""
51568  fi
51569
51570
51571
51572
51573
51574
51575
51576
51577  # Check that the compiler supports -mX (or -qX on AIX) flags
51578  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
51579
51580
51581
51582
51583
51584
51585
51586
51587
51588
51589
51590
51591
51592
51593
51594
51595
51596
51597
51598
51599
51600
51601
51602
51603
51604
51605
51606
51607
51608
51609
51610
51611
51612
51613
51614
51615
51616
51617
51618
51619
51620
51621
51622
51623
51624
51625
51626    # Execute function body
51627
51628
51629
51630
51631
51632
51633
51634
51635
51636
51637
51638
51639
51640
51641
51642
51643
51644
51645
51646
51647
51648
51649
51650
51651
51652
51653
51654
51655
51656
51657
51658
51659
51660
51661
51662
51663
51664
51665
51666
51667
51668
51669
51670
51671
51672
51673
51674
51675    # Execute function body
51676
51677  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51678$as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51679  supports=yes
51680
51681  saved_cflags="$CFLAGS"
51682  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51683  ac_ext=c
51684ac_cpp='$CPP $CPPFLAGS'
51685ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51686ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51687ac_compiler_gnu=$ac_cv_c_compiler_gnu
51688
51689  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51690/* end confdefs.h.  */
51691int i;
51692_ACEOF
51693if ac_fn_c_try_compile "$LINENO"; then :
51694
51695else
51696  supports=no
51697fi
51698rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51699  ac_ext=cpp
51700ac_cpp='$CXXCPP $CPPFLAGS'
51701ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51702ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51703ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51704
51705  CFLAGS="$saved_cflags"
51706
51707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51708$as_echo "$supports" >&6; }
51709  if test "x$supports" = "xyes" ; then
51710    :
51711    C_COMP_SUPPORTS="yes"
51712  else
51713    :
51714    C_COMP_SUPPORTS="no"
51715  fi
51716
51717
51718
51719
51720
51721
51722
51723
51724
51725
51726
51727
51728
51729
51730
51731
51732
51733
51734
51735
51736
51737
51738
51739
51740
51741
51742
51743
51744
51745
51746
51747
51748
51749
51750
51751
51752
51753
51754
51755
51756
51757
51758
51759
51760
51761
51762
51763
51764
51765
51766
51767
51768
51769
51770
51771
51772
51773
51774
51775    # Execute function body
51776
51777  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51778$as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51779  supports=yes
51780
51781  saved_cxxflags="$CXXFLAGS"
51782  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51783  ac_ext=cpp
51784ac_cpp='$CXXCPP $CPPFLAGS'
51785ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51786ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51787ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51788
51789  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51790/* end confdefs.h.  */
51791int i;
51792_ACEOF
51793if ac_fn_cxx_try_compile "$LINENO"; then :
51794
51795else
51796  supports=no
51797fi
51798rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51799  ac_ext=cpp
51800ac_cpp='$CXXCPP $CPPFLAGS'
51801ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51802ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51803ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51804
51805  CXXFLAGS="$saved_cxxflags"
51806
51807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51808$as_echo "$supports" >&6; }
51809  if test "x$supports" = "xyes" ; then
51810    :
51811    CXX_COMP_SUPPORTS="yes"
51812  else
51813    :
51814    CXX_COMP_SUPPORTS="no"
51815  fi
51816
51817
51818
51819
51820
51821
51822
51823
51824
51825
51826
51827
51828
51829  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51830$as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51831  supports=no
51832  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51833
51834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51835$as_echo "$supports" >&6; }
51836  if test "x$supports" = "xyes" ; then
51837    :
51838    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
51839  else
51840    :
51841    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
51842  fi
51843
51844
51845
51846
51847
51848
51849
51850
51851  # Check whether --enable-warnings-as-errors was given.
51852if test "${enable_warnings_as_errors+set}" = set; then :
51853  enableval=$enable_warnings_as_errors;
51854fi
51855
51856
51857  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
51858$as_echo_n "checking if native warnings are errors... " >&6; }
51859  if test "x$enable_warnings_as_errors" = "xyes"; then
51860    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitly set)" >&5
51861$as_echo "yes (explicitly set)" >&6; }
51862    WARNINGS_AS_ERRORS=true
51863  elif test "x$enable_warnings_as_errors" = "xno"; then
51864    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51865$as_echo "no" >&6; }
51866    WARNINGS_AS_ERRORS=false
51867  elif test "x$enable_warnings_as_errors" = "x"; then
51868    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
51869$as_echo "yes (default)" >&6; }
51870    WARNINGS_AS_ERRORS=true
51871  else
51872    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
51873  fi
51874
51875  if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
51876    # Set legacy hotspot variable
51877    HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
51878  else
51879    HOTSPOT_SET_WARNINGS_AS_ERRORS=""
51880  fi
51881
51882
51883
51884
51885  case "${TOOLCHAIN_TYPE}" in
51886    microsoft)
51887      DISABLE_WARNING_PREFIX="-wd"
51888      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
51889      ;;
51890    solstudio)
51891      DISABLE_WARNING_PREFIX="-erroff="
51892      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
51893      ;;
51894    gcc)
51895      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
51896
51897
51898
51899
51900
51901
51902
51903
51904
51905
51906
51907
51908
51909
51910
51911
51912
51913
51914
51915
51916
51917
51918
51919
51920
51921
51922
51923
51924
51925
51926
51927
51928
51929
51930
51931
51932
51933
51934
51935
51936
51937
51938
51939
51940
51941
51942
51943    # Execute function body
51944
51945
51946
51947
51948
51949
51950
51951
51952
51953
51954
51955
51956
51957
51958
51959
51960
51961
51962
51963
51964
51965
51966
51967
51968
51969
51970
51971
51972
51973
51974
51975
51976
51977
51978
51979
51980
51981
51982
51983
51984
51985
51986
51987
51988
51989
51990
51991
51992    # Execute function body
51993
51994  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
51995$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
51996  supports=yes
51997
51998  saved_cflags="$CFLAGS"
51999  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52000  ac_ext=c
52001ac_cpp='$CPP $CPPFLAGS'
52002ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52003ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52004ac_compiler_gnu=$ac_cv_c_compiler_gnu
52005
52006  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52007/* end confdefs.h.  */
52008int i;
52009_ACEOF
52010if ac_fn_c_try_compile "$LINENO"; then :
52011
52012else
52013  supports=no
52014fi
52015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52016  ac_ext=cpp
52017ac_cpp='$CXXCPP $CPPFLAGS'
52018ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52019ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52020ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52021
52022  CFLAGS="$saved_cflags"
52023
52024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52025$as_echo "$supports" >&6; }
52026  if test "x$supports" = "xyes" ; then
52027    :
52028    C_COMP_SUPPORTS="yes"
52029  else
52030    :
52031    C_COMP_SUPPORTS="no"
52032  fi
52033
52034
52035
52036
52037
52038
52039
52040
52041
52042
52043
52044
52045
52046
52047
52048
52049
52050
52051
52052
52053
52054
52055
52056
52057
52058
52059
52060
52061
52062
52063
52064
52065
52066
52067
52068
52069
52070
52071
52072
52073
52074
52075
52076
52077
52078
52079
52080
52081
52082
52083
52084
52085
52086
52087
52088
52089
52090
52091
52092    # Execute function body
52093
52094  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52095$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52096  supports=yes
52097
52098  saved_cxxflags="$CXXFLAGS"
52099  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52100  ac_ext=cpp
52101ac_cpp='$CXXCPP $CPPFLAGS'
52102ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52103ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52104ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52105
52106  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52107/* end confdefs.h.  */
52108int i;
52109_ACEOF
52110if ac_fn_cxx_try_compile "$LINENO"; then :
52111
52112else
52113  supports=no
52114fi
52115rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52116  ac_ext=cpp
52117ac_cpp='$CXXCPP $CPPFLAGS'
52118ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52119ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52120ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52121
52122  CXXFLAGS="$saved_cxxflags"
52123
52124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52125$as_echo "$supports" >&6; }
52126  if test "x$supports" = "xyes" ; then
52127    :
52128    CXX_COMP_SUPPORTS="yes"
52129  else
52130    :
52131    CXX_COMP_SUPPORTS="no"
52132  fi
52133
52134
52135
52136
52137
52138
52139
52140
52141
52142
52143
52144
52145
52146  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52147$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52148  supports=no
52149  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52150
52151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52152$as_echo "$supports" >&6; }
52153  if test "x$supports" = "xyes" ; then
52154    :
52155    GCC_CAN_DISABLE_WARNINGS=true
52156  else
52157    :
52158    GCC_CAN_DISABLE_WARNINGS=false
52159
52160  fi
52161
52162
52163
52164
52165
52166
52167      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52168        DISABLE_WARNING_PREFIX="-Wno-"
52169      else
52170        DISABLE_WARNING_PREFIX=
52171      fi
52172      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52173      # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
52174      # CFLAGS since any target specific flags will likely not work with the
52175      # build compiler
52176      CC_OLD="$CC"
52177      CXX_OLD="$CXX"
52178      CC="$BUILD_CC"
52179      CXX="$BUILD_CXX"
52180      CFLAGS_OLD="$CFLAGS"
52181      CFLAGS=""
52182
52183
52184
52185
52186
52187
52188
52189
52190
52191
52192
52193
52194
52195
52196
52197
52198
52199
52200
52201
52202
52203
52204
52205
52206
52207
52208
52209
52210
52211
52212
52213
52214
52215
52216
52217
52218
52219
52220
52221
52222
52223
52224
52225
52226
52227
52228
52229    # Execute function body
52230
52231
52232
52233
52234
52235
52236
52237
52238
52239
52240
52241
52242
52243
52244
52245
52246
52247
52248
52249
52250
52251
52252
52253
52254
52255
52256
52257
52258
52259
52260
52261
52262
52263
52264
52265
52266
52267
52268
52269
52270
52271
52272
52273
52274
52275
52276
52277
52278    # Execute function body
52279
52280  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52281$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52282  supports=yes
52283
52284  saved_cflags="$CFLAGS"
52285  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52286  ac_ext=c
52287ac_cpp='$CPP $CPPFLAGS'
52288ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52289ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52290ac_compiler_gnu=$ac_cv_c_compiler_gnu
52291
52292  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52293/* end confdefs.h.  */
52294int i;
52295_ACEOF
52296if ac_fn_c_try_compile "$LINENO"; then :
52297
52298else
52299  supports=no
52300fi
52301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52302  ac_ext=cpp
52303ac_cpp='$CXXCPP $CPPFLAGS'
52304ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52305ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52306ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52307
52308  CFLAGS="$saved_cflags"
52309
52310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52311$as_echo "$supports" >&6; }
52312  if test "x$supports" = "xyes" ; then
52313    :
52314    C_COMP_SUPPORTS="yes"
52315  else
52316    :
52317    C_COMP_SUPPORTS="no"
52318  fi
52319
52320
52321
52322
52323
52324
52325
52326
52327
52328
52329
52330
52331
52332
52333
52334
52335
52336
52337
52338
52339
52340
52341
52342
52343
52344
52345
52346
52347
52348
52349
52350
52351
52352
52353
52354
52355
52356
52357
52358
52359
52360
52361
52362
52363
52364
52365
52366
52367
52368
52369
52370
52371
52372
52373
52374
52375
52376
52377
52378    # Execute function body
52379
52380  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52381$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52382  supports=yes
52383
52384  saved_cxxflags="$CXXFLAGS"
52385  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52386  ac_ext=cpp
52387ac_cpp='$CXXCPP $CPPFLAGS'
52388ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52389ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52390ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52391
52392  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52393/* end confdefs.h.  */
52394int i;
52395_ACEOF
52396if ac_fn_cxx_try_compile "$LINENO"; then :
52397
52398else
52399  supports=no
52400fi
52401rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52402  ac_ext=cpp
52403ac_cpp='$CXXCPP $CPPFLAGS'
52404ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52405ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52406ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52407
52408  CXXFLAGS="$saved_cxxflags"
52409
52410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52411$as_echo "$supports" >&6; }
52412  if test "x$supports" = "xyes" ; then
52413    :
52414    CXX_COMP_SUPPORTS="yes"
52415  else
52416    :
52417    CXX_COMP_SUPPORTS="no"
52418  fi
52419
52420
52421
52422
52423
52424
52425
52426
52427
52428
52429
52430
52431
52432  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52433$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52434  supports=no
52435  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52436
52437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52438$as_echo "$supports" >&6; }
52439  if test "x$supports" = "xyes" ; then
52440    :
52441    BUILD_CC_CAN_DISABLE_WARNINGS=true
52442  else
52443    :
52444    BUILD_CC_CAN_DISABLE_WARNINGS=false
52445
52446  fi
52447
52448
52449
52450
52451
52452
52453      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52454        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
52455      else
52456        BUILD_CC_DISABLE_WARNING_PREFIX=
52457      fi
52458      CC="$CC_OLD"
52459      CXX="$CXX_OLD"
52460      CFLAGS="$CFLAGS_OLD"
52461      ;;
52462    clang)
52463      DISABLE_WARNING_PREFIX="-Wno-"
52464      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52465      ;;
52466    xlc)
52467      DISABLE_WARNING_PREFIX="-qsuppress="
52468      CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
52469      ;;
52470  esac
52471
52472
52473
52474
52475
52476# Setup debug symbols (need objcopy from the toolchain for that)
52477
52478  #
52479  # NATIVE_DEBUG_SYMBOLS
52480  # This must be done after the toolchain is setup, since we're looking at objcopy.
52481  #
52482  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
52483$as_echo_n "checking what type of native debug symbols to use... " >&6; }
52484
52485# Check whether --with-native-debug-symbols was given.
52486if test "${with_native_debug_symbols+set}" = set; then :
52487  withval=$with_native_debug_symbols;
52488        if test "x$OPENJDK_TARGET_OS" = xaix; then
52489          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
52490            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
52491          fi
52492        fi
52493
52494else
52495
52496        if test "x$OPENJDK_TARGET_OS" = xaix; then
52497          # AIX doesn't support 'zipped' so use 'internal' as default
52498          with_native_debug_symbols="internal"
52499        else
52500          if test "x$STATIC_BUILD" = xtrue; then
52501            with_native_debug_symbols="none"
52502          else
52503            with_native_debug_symbols="zipped"
52504          fi
52505        fi
52506
52507fi
52508
52509  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
52510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
52511$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
52512
52513  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
52514
52515    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52516      if test "x$OBJCOPY" = x; then
52517        # enabling of enable-debug-symbols and can't find objcopy
52518        # this is an error
52519        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52520      fi
52521    fi
52522
52523    COMPILE_WITH_DEBUG_SYMBOLS=true
52524    COPY_DEBUG_SYMBOLS=true
52525    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
52526  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
52527    COMPILE_WITH_DEBUG_SYMBOLS=false
52528    COPY_DEBUG_SYMBOLS=false
52529    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52530  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
52531    COMPILE_WITH_DEBUG_SYMBOLS=true
52532    COPY_DEBUG_SYMBOLS=false
52533    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52534  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
52535
52536    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52537      if test "x$OBJCOPY" = x; then
52538        # enabling of enable-debug-symbols and can't find objcopy
52539        # this is an error
52540        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52541      fi
52542    fi
52543
52544    COMPILE_WITH_DEBUG_SYMBOLS=true
52545    COPY_DEBUG_SYMBOLS=true
52546    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52547  else
52548    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
52549  fi
52550
52551  # --enable-debug-symbols is deprecated.
52552  # Please use --with-native-debug-symbols=[internal,external,zipped] .
52553
52554  # Check whether --enable-debug-symbols was given.
52555if test "${enable_debug_symbols+set}" = set; then :
52556  enableval=$enable_debug_symbols;
52557fi
52558
52559  if test "x$enable_debug_symbols" != x; then
52560    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
52561$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
52562
52563    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
52564      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
52565$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
52566    fi
52567
52568  fi
52569
52570
52571  # --enable-zip-debug-info is deprecated.
52572  # Please use --with-native-debug-symbols=zipped .
52573
52574  # Check whether --enable-zip-debug-info was given.
52575if test "${enable_zip_debug_info+set}" = set; then :
52576  enableval=$enable_zip_debug_info;
52577fi
52578
52579  if test "x$enable_zip_debug_info" != x; then
52580    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
52581$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
52582
52583    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
52584      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
52585$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
52586    fi
52587
52588  fi
52589
52590
52591
52592
52593
52594
52595
52596  # Check whether --enable-native-coverage was given.
52597if test "${enable_native_coverage+set}" = set; then :
52598  enableval=$enable_native_coverage;
52599fi
52600
52601  GCOV_ENABLED="false"
52602  if test "x$enable_native_coverage" = "xyes"; then
52603    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
52604      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52605$as_echo_n "checking if native coverage is enabled... " >&6; }
52606      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52607$as_echo "yes" >&6; }
52608      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
52609      GCOV_LDFLAGS="-fprofile-arcs"
52610      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
52611      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
52612      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
52613      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
52614      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
52615      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
52616      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
52617      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
52618      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
52619      GCOV_ENABLED="true"
52620    else
52621      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
52622    fi
52623  elif test "x$enable_native_coverage" = "xno"; then
52624    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52625$as_echo_n "checking if native coverage is enabled... " >&6; }
52626    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52627$as_echo "no" >&6; }
52628  elif test "x$enable_native_coverage" != "x"; then
52629    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
52630  fi
52631
52632
52633
52634
52635# Need toolchain to setup dtrace
52636
52637  # Test for dtrace dependencies
52638  # Check whether --enable-dtrace was given.
52639if test "${enable_dtrace+set}" = set; then :
52640  enableval=$enable_dtrace;
52641fi
52642
52643
52644  DTRACE_DEP_MISSING=false
52645
52646  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
52647$as_echo_n "checking for dtrace tool... " >&6; }
52648  if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
52649    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
52650$as_echo "$DTRACE" >&6; }
52651  else
52652    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
52653$as_echo "not found, cannot build dtrace" >&6; }
52654    DTRACE_DEP_MISSING=true
52655  fi
52656
52657  for ac_header in sys/sdt.h
52658do :
52659  ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
52660if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
52661  cat >>confdefs.h <<_ACEOF
52662#define HAVE_SYS_SDT_H 1
52663_ACEOF
52664 DTRACE_HEADERS_OK=yes
52665else
52666  DTRACE_HEADERS_OK=no
52667fi
52668
52669done
52670
52671  if test "x$DTRACE_HEADERS_OK" != "xyes"; then
52672    DTRACE_DEP_MISSING=true
52673  fi
52674
52675  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
52676$as_echo_n "checking if dtrace should be built... " >&6; }
52677  if test "x$enable_dtrace" = "xyes"; then
52678    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52679      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52680$as_echo "no, missing dependencies" >&6; }
52681
52682  # Print a helpful message on how to acquire the necessary build dependency.
52683  # dtrace is the help tag: freetype, cups, alsa etc
52684  MISSING_DEPENDENCY=dtrace
52685
52686  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52687    cygwin_help $MISSING_DEPENDENCY
52688  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52689    msys_help $MISSING_DEPENDENCY
52690  else
52691    PKGHANDLER_COMMAND=
52692
52693    case $PKGHANDLER in
52694      apt-get)
52695        apt_help     $MISSING_DEPENDENCY ;;
52696      yum)
52697        yum_help     $MISSING_DEPENDENCY ;;
52698      port)
52699        port_help    $MISSING_DEPENDENCY ;;
52700      pkgutil)
52701        pkgutil_help $MISSING_DEPENDENCY ;;
52702      pkgadd)
52703        pkgadd_help  $MISSING_DEPENDENCY ;;
52704    esac
52705
52706    if test "x$PKGHANDLER_COMMAND" != x; then
52707      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
52708    fi
52709  fi
52710
52711      as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
52712    else
52713      INCLUDE_DTRACE=true
52714      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52715$as_echo "yes, forced" >&6; }
52716    fi
52717  elif test "x$enable_dtrace" = "xno"; then
52718    INCLUDE_DTRACE=false
52719    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52720$as_echo "no, forced" >&6; }
52721  elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
52722    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52723      INCLUDE_DTRACE=false
52724      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52725$as_echo "no, missing dependencies" >&6; }
52726    else
52727      INCLUDE_DTRACE=true
52728      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
52729$as_echo "yes, dependencies present" >&6; }
52730    fi
52731  else
52732    as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
52733  fi
52734
52735
52736
52737  # The user can in some cases supply additional jvm features. For the custom
52738  # variant, this defines the entire variant.
52739
52740# Check whether --with-jvm-features was given.
52741if test "${with_jvm_features+set}" = set; then :
52742  withval=$with_jvm_features;
52743fi
52744
52745  if test "x$with_jvm_features" != x; then
52746    { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
52747$as_echo_n "checking additional JVM features... " >&6; }
52748    JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
52749    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
52750$as_echo "$JVM_FEATURES" >&6; }
52751  fi
52752
52753  # Verify that dependencies are met for explicitly set features.
52754  if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
52755    as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
52756  fi
52757
52758  if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
52759    as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
52760  fi
52761
52762  if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && ! (  [[ " $JVM_FEATURES " =~ " compiler1 " ]]   ||   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ); then
52763    as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'" "$LINENO" 5
52764  fi
52765
52766  if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
52767    as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
52768  fi
52769
52770  if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
52771    as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
52772  fi
52773
52774  # Turn on additional features based on other parts of configure
52775  if test "x$INCLUDE_DTRACE" = "xtrue"; then
52776    JVM_FEATURES="$JVM_FEATURES dtrace"
52777  else
52778    if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
52779      as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
52780    fi
52781  fi
52782
52783  if test "x$STATIC_BUILD" = "xtrue"; then
52784    JVM_FEATURES="$JVM_FEATURES static-build"
52785  else
52786    if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
52787      as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
52788    fi
52789  fi
52790
52791  if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52792    if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
52793      as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
52794    fi
52795  fi
52796
52797  if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52798    if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
52799      as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
52800    fi
52801  fi
52802
52803  # Only enable jvmci on x86_64, sparcv9 and aarch64.
52804  if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
52805      test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
52806      test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
52807    JVM_FEATURES_jvmci="jvmci"
52808  else
52809    JVM_FEATURES_jvmci=""
52810  fi
52811
52812  # All variants but minimal (and custom) get these features
52813  NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
52814
52815  # Enable features depending on variant.
52816  JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
52817  JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
52818  JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
52819  JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES"
52820  JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
52821  JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
52822  JVM_FEATURES_custom="$JVM_FEATURES"
52823
52824
52825
52826
52827
52828
52829
52830
52831
52832  # Used for verification of Makefiles by check-jvm-feature
52833
52834
52835  # We don't support --with-jvm-interpreter anymore, use zero instead.
52836
52837
52838# Check whether --with-jvm-interpreter was given.
52839if test "${with_jvm_interpreter+set}" = set; then :
52840  withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
52841$as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
52842fi
52843
52844
52845
52846
52847  # Check whether --enable-hotspot-gtest was given.
52848if test "${enable_hotspot_gtest+set}" = set; then :
52849  enableval=$enable_hotspot_gtest;
52850fi
52851
52852
52853  if test -e "$HOTSPOT_TOPDIR/test/native"; then
52854    GTEST_DIR_EXISTS="true"
52855  else
52856    GTEST_DIR_EXISTS="false"
52857  fi
52858
52859  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Hotspot gtest unit tests should be built" >&5
52860$as_echo_n "checking if Hotspot gtest unit tests should be built... " >&6; }
52861  if test "x$enable_hotspot_gtest" = "xyes"; then
52862    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
52863      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52864$as_echo "yes, forced" >&6; }
52865      BUILD_GTEST="true"
52866    else
52867      as_fn_error $? "Cannot build gtest without the test source" "$LINENO" 5
52868    fi
52869  elif test "x$enable_hotspot_gtest" = "xno"; then
52870    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52871$as_echo "no, forced" >&6; }
52872    BUILD_GTEST="false"
52873  elif test "x$enable_hotspot_gtest" = "x"; then
52874    if test "x$GTEST_DIR_EXISTS" = "xtrue" && test "x$OPENJDK_TARGET_OS" != "xaix"; then
52875      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52876$as_echo "yes" >&6; }
52877      BUILD_GTEST="true"
52878    else
52879      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52880$as_echo "no" >&6; }
52881      BUILD_GTEST="false"
52882    fi
52883  else
52884    as_fn_error $? "--enable-gtest must be either yes or no" "$LINENO" 5
52885  fi
52886
52887
52888
52889
52890###############################################################################
52891#
52892# Check dependencies for external and internal libraries.
52893#
52894###############################################################################
52895
52896# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
52897
52898  # When using cygwin or msys, we need a wrapper binary that renames
52899  # /cygdrive/c/ arguments into c:/ arguments and peeks into
52900  # @files and rewrites these too! This wrapper binary is
52901  # called fixpath.
52902  FIXPATH=
52903  if test "x$OPENJDK_BUILD_OS" = xwindows; then
52904    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
52905$as_echo_n "checking if fixpath can be created... " >&6; }
52906    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
52907    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
52908    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
52909    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
52910      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
52911      FIXPATH="$FIXPATH_BIN -c"
52912    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
52913      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
52914      # @ was chosen as separator to minimize risk of other tools messing around with it
52915      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
52916          | tr ' ' '\n' | $GREP '^/./' | $SORT | $UNIQ`
52917      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
52918      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
52919    fi
52920    FIXPATH_SRC_W="$FIXPATH_SRC"
52921    FIXPATH_BIN_W="$FIXPATH_BIN"
52922
52923  unix_path="$FIXPATH_SRC_W"
52924  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52925    windows_path=`$CYGPATH -m "$unix_path"`
52926    FIXPATH_SRC_W="$windows_path"
52927  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52928    windows_path=`cmd //c echo $unix_path`
52929    FIXPATH_SRC_W="$windows_path"
52930  fi
52931
52932
52933  unix_path="$FIXPATH_BIN_W"
52934  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52935    windows_path=`$CYGPATH -m "$unix_path"`
52936    FIXPATH_BIN_W="$windows_path"
52937  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52938    windows_path=`cmd //c echo $unix_path`
52939    FIXPATH_BIN_W="$windows_path"
52940  fi
52941
52942    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
52943    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
52944    cd $FIXPATH_DIR
52945    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
52946    cd $CURDIR
52947
52948    if test ! -x $FIXPATH_BIN; then
52949      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52950$as_echo "no" >&6; }
52951      cat $FIXPATH_DIR/fixpath1.log
52952      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
52953    fi
52954    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52955$as_echo "yes" >&6; }
52956    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
52957$as_echo_n "checking if fixpath.exe works... " >&6; }
52958    cd $FIXPATH_DIR
52959    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
52960        > $FIXPATH_DIR/fixpath2.log 2>&1
52961    cd $CURDIR
52962    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
52963      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52964$as_echo "no" >&6; }
52965      cat $FIXPATH_DIR/fixpath2.log
52966      as_fn_error $? "fixpath did not work!" "$LINENO" 5
52967    fi
52968    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52969$as_echo "yes" >&6; }
52970
52971    FIXPATH_DETACH_FLAG="--detach"
52972  fi
52973
52974
52975
52976
52977
52978
52979  # Check if X11 is needed
52980  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
52981    # No X11 support on windows or macosx
52982    NEEDS_LIB_X11=false
52983  else
52984    # All other instances need X11, even if building headless only, libawt still
52985    # needs X11 headers.
52986    NEEDS_LIB_X11=true
52987  fi
52988
52989  # Check if cups is needed
52990  if test "x$OPENJDK_TARGET_OS" = xwindows; then
52991    # Windows have a separate print system
52992    NEEDS_LIB_CUPS=false
52993  else
52994    NEEDS_LIB_CUPS=true
52995  fi
52996
52997  # A custom hook may have set this already
52998  if test "x$NEEDS_LIB_FREETYPE" = "x"; then
52999    NEEDS_LIB_FREETYPE=true
53000  fi
53001
53002  # Check if alsa is needed
53003  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53004    NEEDS_LIB_ALSA=true
53005  else
53006    NEEDS_LIB_ALSA=false
53007  fi
53008
53009  # Check if ffi is needed
53010  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53011    NEEDS_LIB_FFI=true
53012  else
53013    NEEDS_LIB_FFI=false
53014  fi
53015
53016
53017  # statically link libstdc++ before C++ ABI is stablized on Linux unless
53018  # dynamic build is configured on command line.
53019
53020# Check whether --with-stdc++lib was given.
53021if test "${with_stdc__lib+set}" = set; then :
53022  withval=$with_stdc__lib;
53023        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
53024                && test "x$with_stdc__lib" != xdefault; then
53025          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
53026        fi
53027
53028else
53029  with_stdc__lib=default
53030
53031fi
53032
53033
53034  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53035    # Test if stdc++ can be linked statically.
53036    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
53037$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
53038    STATIC_STDCXX_FLAGS="-static-libstdc++ -static-libgcc"
53039    ac_ext=cpp
53040ac_cpp='$CXXCPP $CPPFLAGS'
53041ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53042ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53043ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53044
53045    OLD_LIBS="$LIBS"
53046    LIBS="$STATIC_STDCXX_FLAGS"
53047    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53048/* end confdefs.h.  */
53049
53050int
53051main ()
53052{
53053return 0;
53054  ;
53055  return 0;
53056}
53057_ACEOF
53058if ac_fn_cxx_try_link "$LINENO"; then :
53059  has_static_libstdcxx=yes
53060else
53061  has_static_libstdcxx=no
53062fi
53063rm -f core conftest.err conftest.$ac_objext \
53064    conftest$ac_exeext conftest.$ac_ext
53065    LIBS="$OLD_LIBS"
53066    ac_ext=cpp
53067ac_cpp='$CXXCPP $CPPFLAGS'
53068ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53069ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53070ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53071
53072    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
53073$as_echo "$has_static_libstdcxx" >&6; }
53074
53075    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
53076      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
53077    fi
53078
53079    # If dynamic was requested, it's available since it would fail above otherwise.
53080    # If dynamic wasn't requested, go with static unless it isn't available.
53081    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
53082$as_echo_n "checking how to link with libstdc++... " >&6; }
53083    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno \
53084        ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53085      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
53086$as_echo "dynamic" >&6; }
53087    else
53088      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
53089      JVM_LDFLAGS="$JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53090      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
53091      # just use the same setting as for the TARGET toolchain.
53092      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53093      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
53094$as_echo "static" >&6; }
53095    fi
53096  fi
53097
53098  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
53099  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
53100    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
53101  fi
53102
53103
53104
53105  # Setup Windows runtime dlls
53106  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
53107
53108
53109# Check whether --with-msvcr-dll was given.
53110if test "${with_msvcr_dll+set}" = set; then :
53111  withval=$with_msvcr_dll;
53112fi
53113
53114
53115  if test "x$with_msvcr_dll" != x; then
53116    # If given explicitly by user, do not probe. If not present, fail directly.
53117
53118  DLL_NAME="$MSVCR_NAME"
53119  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
53120  METHOD="--with-msvcr-dll"
53121  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53122    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53123$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53124
53125    # Need to check if the found msvcr is correct architecture
53126    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53127$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53128    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53129    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53130      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53131      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53132      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53133        CORRECT_MSVCR_ARCH="PE32 executable"
53134      else
53135        CORRECT_MSVCR_ARCH="PE32+ executable"
53136      fi
53137    else
53138      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53139        CORRECT_MSVCR_ARCH=386
53140      else
53141        CORRECT_MSVCR_ARCH=x86-64
53142      fi
53143    fi
53144    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53145      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53146$as_echo "ok" >&6; }
53147      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53148
53149  # Only process if variable expands to non-empty
53150
53151  if test "x$MSVC_DLL" != x; then
53152    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53153
53154  # Input might be given as Windows format, start by converting to
53155  # unix format.
53156  path="$MSVC_DLL"
53157  new_path=`$CYGPATH -u "$path"`
53158
53159  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53160  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53161  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53162  # "foo.exe" is OK but "foo" is an error.
53163  #
53164  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53165  # It is also a way to make sure we got the proper file name for the real test later on.
53166  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53167  if test "x$test_shortpath" = x; then
53168    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53169$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53170    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53171  fi
53172
53173  # Call helper function which possibly converts this using DOS-style short mode.
53174  # If so, the updated path is stored in $new_path.
53175
53176  input_path="$new_path"
53177  # Check if we need to convert this using DOS-style short mode. If the path
53178  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53179  # take no chances and rewrite it.
53180  # Note: m4 eats our [], so we need to use [ and ] instead.
53181  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53182  if test "x$has_forbidden_chars" != x; then
53183    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53184    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53185    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53186    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53187      # Going to short mode and back again did indeed matter. Since short mode is
53188      # case insensitive, let's make it lowercase to improve readability.
53189      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53190      # Now convert it back to Unix-style (cygpath)
53191      input_path=`$CYGPATH -u "$shortmode_path"`
53192      new_path="$input_path"
53193    fi
53194  fi
53195
53196  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53197  if test "x$test_cygdrive_prefix" = x; then
53198    # As a simple fix, exclude /usr/bin since it's not a real path.
53199    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53200      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53201      # a path prefixed by /cygdrive for fixpath to work.
53202      new_path="$CYGWIN_ROOT_PATH$input_path"
53203    fi
53204  fi
53205
53206
53207  if test "x$path" != "x$new_path"; then
53208    MSVC_DLL="$new_path"
53209    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53210$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53211  fi
53212
53213    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53214
53215  path="$MSVC_DLL"
53216  has_colon=`$ECHO $path | $GREP ^.:`
53217  new_path="$path"
53218  if test "x$has_colon" = x; then
53219    # Not in mixed or Windows style, start by that.
53220    new_path=`cmd //c echo $path`
53221  fi
53222
53223
53224  input_path="$new_path"
53225  # Check if we need to convert this using DOS-style short mode. If the path
53226  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53227  # take no chances and rewrite it.
53228  # Note: m4 eats our [], so we need to use [ and ] instead.
53229  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53230  if test "x$has_forbidden_chars" != x; then
53231    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53232    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53233  fi
53234
53235
53236  windows_path="$new_path"
53237  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53238    unix_path=`$CYGPATH -u "$windows_path"`
53239    new_path="$unix_path"
53240  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53241    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53242    new_path="$unix_path"
53243  fi
53244
53245  if test "x$path" != "x$new_path"; then
53246    MSVC_DLL="$new_path"
53247    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53248$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53249  fi
53250
53251  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53252  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53253
53254    else
53255      # We're on a unix platform. Hooray! :)
53256      path="$MSVC_DLL"
53257      has_space=`$ECHO "$path" | $GREP " "`
53258      if test "x$has_space" != x; then
53259        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53260$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53261        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53262      fi
53263
53264      # Use eval to expand a potential ~
53265      eval path="$path"
53266      if test ! -f "$path" && test ! -d "$path"; then
53267        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53268      fi
53269
53270      if test -d "$path"; then
53271        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53272      else
53273        dir="`$DIRNAME "$path"`"
53274        base="`$BASENAME "$path"`"
53275        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53276      fi
53277    fi
53278  fi
53279
53280      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53281$as_echo_n "checking for $DLL_NAME... " >&6; }
53282      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53283$as_echo "$MSVC_DLL" >&6; }
53284    else
53285      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53286$as_echo "incorrect, ignoring" >&6; }
53287      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53288$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53289    fi
53290  fi
53291
53292    if test "x$MSVC_DLL" = x; then
53293      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
53294    fi
53295    MSVCR_DLL="$MSVC_DLL"
53296  elif test "x$DEVKIT_MSVCR_DLL" != x; then
53297
53298  DLL_NAME="$MSVCR_NAME"
53299  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
53300  METHOD="devkit"
53301  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53302    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53303$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53304
53305    # Need to check if the found msvcr is correct architecture
53306    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53307$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53308    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53309    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53310      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53311      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53312      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53313        CORRECT_MSVCR_ARCH="PE32 executable"
53314      else
53315        CORRECT_MSVCR_ARCH="PE32+ executable"
53316      fi
53317    else
53318      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53319        CORRECT_MSVCR_ARCH=386
53320      else
53321        CORRECT_MSVCR_ARCH=x86-64
53322      fi
53323    fi
53324    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53325      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53326$as_echo "ok" >&6; }
53327      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53328
53329  # Only process if variable expands to non-empty
53330
53331  if test "x$MSVC_DLL" != x; then
53332    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53333
53334  # Input might be given as Windows format, start by converting to
53335  # unix format.
53336  path="$MSVC_DLL"
53337  new_path=`$CYGPATH -u "$path"`
53338
53339  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53340  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53341  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53342  # "foo.exe" is OK but "foo" is an error.
53343  #
53344  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53345  # It is also a way to make sure we got the proper file name for the real test later on.
53346  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53347  if test "x$test_shortpath" = x; then
53348    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53349$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53350    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53351  fi
53352
53353  # Call helper function which possibly converts this using DOS-style short mode.
53354  # If so, the updated path is stored in $new_path.
53355
53356  input_path="$new_path"
53357  # Check if we need to convert this using DOS-style short mode. If the path
53358  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53359  # take no chances and rewrite it.
53360  # Note: m4 eats our [], so we need to use [ and ] instead.
53361  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53362  if test "x$has_forbidden_chars" != x; then
53363    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53364    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53365    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53366    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53367      # Going to short mode and back again did indeed matter. Since short mode is
53368      # case insensitive, let's make it lowercase to improve readability.
53369      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53370      # Now convert it back to Unix-style (cygpath)
53371      input_path=`$CYGPATH -u "$shortmode_path"`
53372      new_path="$input_path"
53373    fi
53374  fi
53375
53376  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53377  if test "x$test_cygdrive_prefix" = x; then
53378    # As a simple fix, exclude /usr/bin since it's not a real path.
53379    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53380      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53381      # a path prefixed by /cygdrive for fixpath to work.
53382      new_path="$CYGWIN_ROOT_PATH$input_path"
53383    fi
53384  fi
53385
53386
53387  if test "x$path" != "x$new_path"; then
53388    MSVC_DLL="$new_path"
53389    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53390$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53391  fi
53392
53393    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53394
53395  path="$MSVC_DLL"
53396  has_colon=`$ECHO $path | $GREP ^.:`
53397  new_path="$path"
53398  if test "x$has_colon" = x; then
53399    # Not in mixed or Windows style, start by that.
53400    new_path=`cmd //c echo $path`
53401  fi
53402
53403
53404  input_path="$new_path"
53405  # Check if we need to convert this using DOS-style short mode. If the path
53406  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53407  # take no chances and rewrite it.
53408  # Note: m4 eats our [], so we need to use [ and ] instead.
53409  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53410  if test "x$has_forbidden_chars" != x; then
53411    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53412    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53413  fi
53414
53415
53416  windows_path="$new_path"
53417  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53418    unix_path=`$CYGPATH -u "$windows_path"`
53419    new_path="$unix_path"
53420  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53421    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53422    new_path="$unix_path"
53423  fi
53424
53425  if test "x$path" != "x$new_path"; then
53426    MSVC_DLL="$new_path"
53427    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53428$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53429  fi
53430
53431  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53432  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53433
53434    else
53435      # We're on a unix platform. Hooray! :)
53436      path="$MSVC_DLL"
53437      has_space=`$ECHO "$path" | $GREP " "`
53438      if test "x$has_space" != x; then
53439        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53440$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53441        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53442      fi
53443
53444      # Use eval to expand a potential ~
53445      eval path="$path"
53446      if test ! -f "$path" && test ! -d "$path"; then
53447        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53448      fi
53449
53450      if test -d "$path"; then
53451        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53452      else
53453        dir="`$DIRNAME "$path"`"
53454        base="`$BASENAME "$path"`"
53455        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53456      fi
53457    fi
53458  fi
53459
53460      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53461$as_echo_n "checking for $DLL_NAME... " >&6; }
53462      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53463$as_echo "$MSVC_DLL" >&6; }
53464    else
53465      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53466$as_echo "incorrect, ignoring" >&6; }
53467      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53468$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53469    fi
53470  fi
53471
53472    if test "x$MSVC_DLL" = x; then
53473      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
53474    fi
53475    MSVCR_DLL="$MSVC_DLL"
53476  else
53477
53478  DLL_NAME="${MSVCR_NAME}"
53479  MSVC_DLL=
53480
53481  if test "x$MSVC_DLL" = x; then
53482    # Probe: Using well-known location from Visual Studio 10.0
53483    if test "x$VCINSTALLDIR" != x; then
53484      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
53485
53486  windows_path="$CYGWIN_VC_INSTALL_DIR"
53487  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53488    unix_path=`$CYGPATH -u "$windows_path"`
53489    CYGWIN_VC_INSTALL_DIR="$unix_path"
53490  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53491    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53492    CYGWIN_VC_INSTALL_DIR="$unix_path"
53493  fi
53494
53495      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53496        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53497      else
53498        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53499      fi
53500      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
53501
53502  DLL_NAME="$DLL_NAME"
53503  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53504  METHOD="well-known location in VCINSTALLDIR"
53505  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53506    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53507$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53508
53509    # Need to check if the found msvcr is correct architecture
53510    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53511$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53512    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53513    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53514      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53515      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53516      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53517        CORRECT_MSVCR_ARCH="PE32 executable"
53518      else
53519        CORRECT_MSVCR_ARCH="PE32+ executable"
53520      fi
53521    else
53522      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53523        CORRECT_MSVCR_ARCH=386
53524      else
53525        CORRECT_MSVCR_ARCH=x86-64
53526      fi
53527    fi
53528    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53529      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53530$as_echo "ok" >&6; }
53531      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53532
53533  # Only process if variable expands to non-empty
53534
53535  if test "x$MSVC_DLL" != x; then
53536    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53537
53538  # Input might be given as Windows format, start by converting to
53539  # unix format.
53540  path="$MSVC_DLL"
53541  new_path=`$CYGPATH -u "$path"`
53542
53543  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53544  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53545  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53546  # "foo.exe" is OK but "foo" is an error.
53547  #
53548  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53549  # It is also a way to make sure we got the proper file name for the real test later on.
53550  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53551  if test "x$test_shortpath" = x; then
53552    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53553$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53554    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53555  fi
53556
53557  # Call helper function which possibly converts this using DOS-style short mode.
53558  # If so, the updated path is stored in $new_path.
53559
53560  input_path="$new_path"
53561  # Check if we need to convert this using DOS-style short mode. If the path
53562  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53563  # take no chances and rewrite it.
53564  # Note: m4 eats our [], so we need to use [ and ] instead.
53565  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53566  if test "x$has_forbidden_chars" != x; then
53567    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53568    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53569    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53570    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53571      # Going to short mode and back again did indeed matter. Since short mode is
53572      # case insensitive, let's make it lowercase to improve readability.
53573      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53574      # Now convert it back to Unix-style (cygpath)
53575      input_path=`$CYGPATH -u "$shortmode_path"`
53576      new_path="$input_path"
53577    fi
53578  fi
53579
53580  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53581  if test "x$test_cygdrive_prefix" = x; then
53582    # As a simple fix, exclude /usr/bin since it's not a real path.
53583    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53584      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53585      # a path prefixed by /cygdrive for fixpath to work.
53586      new_path="$CYGWIN_ROOT_PATH$input_path"
53587    fi
53588  fi
53589
53590
53591  if test "x$path" != "x$new_path"; then
53592    MSVC_DLL="$new_path"
53593    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53594$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53595  fi
53596
53597    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53598
53599  path="$MSVC_DLL"
53600  has_colon=`$ECHO $path | $GREP ^.:`
53601  new_path="$path"
53602  if test "x$has_colon" = x; then
53603    # Not in mixed or Windows style, start by that.
53604    new_path=`cmd //c echo $path`
53605  fi
53606
53607
53608  input_path="$new_path"
53609  # Check if we need to convert this using DOS-style short mode. If the path
53610  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53611  # take no chances and rewrite it.
53612  # Note: m4 eats our [], so we need to use [ and ] instead.
53613  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53614  if test "x$has_forbidden_chars" != x; then
53615    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53616    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53617  fi
53618
53619
53620  windows_path="$new_path"
53621  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53622    unix_path=`$CYGPATH -u "$windows_path"`
53623    new_path="$unix_path"
53624  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53625    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53626    new_path="$unix_path"
53627  fi
53628
53629  if test "x$path" != "x$new_path"; then
53630    MSVC_DLL="$new_path"
53631    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53632$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53633  fi
53634
53635  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53636  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53637
53638    else
53639      # We're on a unix platform. Hooray! :)
53640      path="$MSVC_DLL"
53641      has_space=`$ECHO "$path" | $GREP " "`
53642      if test "x$has_space" != x; then
53643        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53644$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53645        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53646      fi
53647
53648      # Use eval to expand a potential ~
53649      eval path="$path"
53650      if test ! -f "$path" && test ! -d "$path"; then
53651        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53652      fi
53653
53654      if test -d "$path"; then
53655        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53656      else
53657        dir="`$DIRNAME "$path"`"
53658        base="`$BASENAME "$path"`"
53659        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53660      fi
53661    fi
53662  fi
53663
53664      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53665$as_echo_n "checking for $DLL_NAME... " >&6; }
53666      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53667$as_echo "$MSVC_DLL" >&6; }
53668    else
53669      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53670$as_echo "incorrect, ignoring" >&6; }
53671      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53672$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53673    fi
53674  fi
53675
53676    fi
53677  fi
53678
53679  if test "x$MSVC_DLL" = x; then
53680    # Probe: Check in the Boot JDK directory.
53681    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
53682
53683  DLL_NAME="$DLL_NAME"
53684  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53685  METHOD="well-known location in Boot JDK"
53686  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53687    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53688$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53689
53690    # Need to check if the found msvcr is correct architecture
53691    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53692$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53693    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53694    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53695      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53696      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53697      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53698        CORRECT_MSVCR_ARCH="PE32 executable"
53699      else
53700        CORRECT_MSVCR_ARCH="PE32+ executable"
53701      fi
53702    else
53703      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53704        CORRECT_MSVCR_ARCH=386
53705      else
53706        CORRECT_MSVCR_ARCH=x86-64
53707      fi
53708    fi
53709    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53710      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53711$as_echo "ok" >&6; }
53712      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53713
53714  # Only process if variable expands to non-empty
53715
53716  if test "x$MSVC_DLL" != x; then
53717    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53718
53719  # Input might be given as Windows format, start by converting to
53720  # unix format.
53721  path="$MSVC_DLL"
53722  new_path=`$CYGPATH -u "$path"`
53723
53724  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53725  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53726  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53727  # "foo.exe" is OK but "foo" is an error.
53728  #
53729  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53730  # It is also a way to make sure we got the proper file name for the real test later on.
53731  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53732  if test "x$test_shortpath" = x; then
53733    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53734$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53735    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53736  fi
53737
53738  # Call helper function which possibly converts this using DOS-style short mode.
53739  # If so, the updated path is stored in $new_path.
53740
53741  input_path="$new_path"
53742  # Check if we need to convert this using DOS-style short mode. If the path
53743  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53744  # take no chances and rewrite it.
53745  # Note: m4 eats our [], so we need to use [ and ] instead.
53746  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53747  if test "x$has_forbidden_chars" != x; then
53748    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53749    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53750    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53751    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53752      # Going to short mode and back again did indeed matter. Since short mode is
53753      # case insensitive, let's make it lowercase to improve readability.
53754      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53755      # Now convert it back to Unix-style (cygpath)
53756      input_path=`$CYGPATH -u "$shortmode_path"`
53757      new_path="$input_path"
53758    fi
53759  fi
53760
53761  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53762  if test "x$test_cygdrive_prefix" = x; then
53763    # As a simple fix, exclude /usr/bin since it's not a real path.
53764    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53765      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53766      # a path prefixed by /cygdrive for fixpath to work.
53767      new_path="$CYGWIN_ROOT_PATH$input_path"
53768    fi
53769  fi
53770
53771
53772  if test "x$path" != "x$new_path"; then
53773    MSVC_DLL="$new_path"
53774    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53775$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53776  fi
53777
53778    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53779
53780  path="$MSVC_DLL"
53781  has_colon=`$ECHO $path | $GREP ^.:`
53782  new_path="$path"
53783  if test "x$has_colon" = x; then
53784    # Not in mixed or Windows style, start by that.
53785    new_path=`cmd //c echo $path`
53786  fi
53787
53788
53789  input_path="$new_path"
53790  # Check if we need to convert this using DOS-style short mode. If the path
53791  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53792  # take no chances and rewrite it.
53793  # Note: m4 eats our [], so we need to use [ and ] instead.
53794  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53795  if test "x$has_forbidden_chars" != x; then
53796    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53797    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53798  fi
53799
53800
53801  windows_path="$new_path"
53802  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53803    unix_path=`$CYGPATH -u "$windows_path"`
53804    new_path="$unix_path"
53805  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53806    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53807    new_path="$unix_path"
53808  fi
53809
53810  if test "x$path" != "x$new_path"; then
53811    MSVC_DLL="$new_path"
53812    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53813$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53814  fi
53815
53816  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53817  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53818
53819    else
53820      # We're on a unix platform. Hooray! :)
53821      path="$MSVC_DLL"
53822      has_space=`$ECHO "$path" | $GREP " "`
53823      if test "x$has_space" != x; then
53824        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53825$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53826        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53827      fi
53828
53829      # Use eval to expand a potential ~
53830      eval path="$path"
53831      if test ! -f "$path" && test ! -d "$path"; then
53832        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53833      fi
53834
53835      if test -d "$path"; then
53836        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53837      else
53838        dir="`$DIRNAME "$path"`"
53839        base="`$BASENAME "$path"`"
53840        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53841      fi
53842    fi
53843  fi
53844
53845      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53846$as_echo_n "checking for $DLL_NAME... " >&6; }
53847      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53848$as_echo "$MSVC_DLL" >&6; }
53849    else
53850      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53851$as_echo "incorrect, ignoring" >&6; }
53852      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53853$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53854    fi
53855  fi
53856
53857  fi
53858
53859  if test "x$MSVC_DLL" = x; then
53860    # Probe: Look in the Windows system32 directory
53861    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
53862
53863  windows_path="$CYGWIN_SYSTEMROOT"
53864  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53865    unix_path=`$CYGPATH -u "$windows_path"`
53866    CYGWIN_SYSTEMROOT="$unix_path"
53867  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53868    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53869    CYGWIN_SYSTEMROOT="$unix_path"
53870  fi
53871
53872    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
53873
53874  DLL_NAME="$DLL_NAME"
53875  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53876  METHOD="well-known location in SYSTEMROOT"
53877  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53878    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53879$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53880
53881    # Need to check if the found msvcr is correct architecture
53882    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53883$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53884    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53885    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53886      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53887      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53888      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53889        CORRECT_MSVCR_ARCH="PE32 executable"
53890      else
53891        CORRECT_MSVCR_ARCH="PE32+ executable"
53892      fi
53893    else
53894      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53895        CORRECT_MSVCR_ARCH=386
53896      else
53897        CORRECT_MSVCR_ARCH=x86-64
53898      fi
53899    fi
53900    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53901      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53902$as_echo "ok" >&6; }
53903      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53904
53905  # Only process if variable expands to non-empty
53906
53907  if test "x$MSVC_DLL" != x; then
53908    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53909
53910  # Input might be given as Windows format, start by converting to
53911  # unix format.
53912  path="$MSVC_DLL"
53913  new_path=`$CYGPATH -u "$path"`
53914
53915  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53916  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53917  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53918  # "foo.exe" is OK but "foo" is an error.
53919  #
53920  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53921  # It is also a way to make sure we got the proper file name for the real test later on.
53922  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53923  if test "x$test_shortpath" = x; then
53924    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53925$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53926    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53927  fi
53928
53929  # Call helper function which possibly converts this using DOS-style short mode.
53930  # If so, the updated path is stored in $new_path.
53931
53932  input_path="$new_path"
53933  # Check if we need to convert this using DOS-style short mode. If the path
53934  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53935  # take no chances and rewrite it.
53936  # Note: m4 eats our [], so we need to use [ and ] instead.
53937  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53938  if test "x$has_forbidden_chars" != x; then
53939    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53940    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53941    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53942    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53943      # Going to short mode and back again did indeed matter. Since short mode is
53944      # case insensitive, let's make it lowercase to improve readability.
53945      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53946      # Now convert it back to Unix-style (cygpath)
53947      input_path=`$CYGPATH -u "$shortmode_path"`
53948      new_path="$input_path"
53949    fi
53950  fi
53951
53952  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53953  if test "x$test_cygdrive_prefix" = x; then
53954    # As a simple fix, exclude /usr/bin since it's not a real path.
53955    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53956      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53957      # a path prefixed by /cygdrive for fixpath to work.
53958      new_path="$CYGWIN_ROOT_PATH$input_path"
53959    fi
53960  fi
53961
53962
53963  if test "x$path" != "x$new_path"; then
53964    MSVC_DLL="$new_path"
53965    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53966$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53967  fi
53968
53969    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53970
53971  path="$MSVC_DLL"
53972  has_colon=`$ECHO $path | $GREP ^.:`
53973  new_path="$path"
53974  if test "x$has_colon" = x; then
53975    # Not in mixed or Windows style, start by that.
53976    new_path=`cmd //c echo $path`
53977  fi
53978
53979
53980  input_path="$new_path"
53981  # Check if we need to convert this using DOS-style short mode. If the path
53982  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53983  # take no chances and rewrite it.
53984  # Note: m4 eats our [], so we need to use [ and ] instead.
53985  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53986  if test "x$has_forbidden_chars" != x; then
53987    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53988    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53989  fi
53990
53991
53992  windows_path="$new_path"
53993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53994    unix_path=`$CYGPATH -u "$windows_path"`
53995    new_path="$unix_path"
53996  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53997    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53998    new_path="$unix_path"
53999  fi
54000
54001  if test "x$path" != "x$new_path"; then
54002    MSVC_DLL="$new_path"
54003    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54004$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54005  fi
54006
54007  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54008  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54009
54010    else
54011      # We're on a unix platform. Hooray! :)
54012      path="$MSVC_DLL"
54013      has_space=`$ECHO "$path" | $GREP " "`
54014      if test "x$has_space" != x; then
54015        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54016$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54017        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54018      fi
54019
54020      # Use eval to expand a potential ~
54021      eval path="$path"
54022      if test ! -f "$path" && test ! -d "$path"; then
54023        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54024      fi
54025
54026      if test -d "$path"; then
54027        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54028      else
54029        dir="`$DIRNAME "$path"`"
54030        base="`$BASENAME "$path"`"
54031        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54032      fi
54033    fi
54034  fi
54035
54036      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54037$as_echo_n "checking for $DLL_NAME... " >&6; }
54038      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54039$as_echo "$MSVC_DLL" >&6; }
54040    else
54041      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54042$as_echo "incorrect, ignoring" >&6; }
54043      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54044$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54045    fi
54046  fi
54047
54048  fi
54049
54050  if test "x$MSVC_DLL" = x; then
54051    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
54052    if test "x$VS100COMNTOOLS" != x; then
54053      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
54054
54055  windows_path="$CYGWIN_VS_TOOLS_DIR"
54056  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54057    unix_path=`$CYGPATH -u "$windows_path"`
54058    CYGWIN_VS_TOOLS_DIR="$unix_path"
54059  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54060    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54061    CYGWIN_VS_TOOLS_DIR="$unix_path"
54062  fi
54063
54064      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54065        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54066	    | $GREP -i /x64/ | $HEAD --lines 1`
54067      else
54068        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54069	    | $GREP -i /x86/ | $HEAD --lines 1`
54070      fi
54071
54072  DLL_NAME="$DLL_NAME"
54073  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54074  METHOD="search of VS100COMNTOOLS"
54075  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54076    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54077$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54078
54079    # Need to check if the found msvcr is correct architecture
54080    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54081$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54082    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54083    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54084      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54085      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54086      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54087        CORRECT_MSVCR_ARCH="PE32 executable"
54088      else
54089        CORRECT_MSVCR_ARCH="PE32+ executable"
54090      fi
54091    else
54092      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54093        CORRECT_MSVCR_ARCH=386
54094      else
54095        CORRECT_MSVCR_ARCH=x86-64
54096      fi
54097    fi
54098    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54099      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54100$as_echo "ok" >&6; }
54101      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54102
54103  # Only process if variable expands to non-empty
54104
54105  if test "x$MSVC_DLL" != x; then
54106    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54107
54108  # Input might be given as Windows format, start by converting to
54109  # unix format.
54110  path="$MSVC_DLL"
54111  new_path=`$CYGPATH -u "$path"`
54112
54113  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54114  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54115  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54116  # "foo.exe" is OK but "foo" is an error.
54117  #
54118  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54119  # It is also a way to make sure we got the proper file name for the real test later on.
54120  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54121  if test "x$test_shortpath" = x; then
54122    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54123$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54124    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54125  fi
54126
54127  # Call helper function which possibly converts this using DOS-style short mode.
54128  # If so, the updated path is stored in $new_path.
54129
54130  input_path="$new_path"
54131  # Check if we need to convert this using DOS-style short mode. If the path
54132  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54133  # take no chances and rewrite it.
54134  # Note: m4 eats our [], so we need to use [ and ] instead.
54135  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54136  if test "x$has_forbidden_chars" != x; then
54137    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54138    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54139    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54140    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54141      # Going to short mode and back again did indeed matter. Since short mode is
54142      # case insensitive, let's make it lowercase to improve readability.
54143      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54144      # Now convert it back to Unix-style (cygpath)
54145      input_path=`$CYGPATH -u "$shortmode_path"`
54146      new_path="$input_path"
54147    fi
54148  fi
54149
54150  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54151  if test "x$test_cygdrive_prefix" = x; then
54152    # As a simple fix, exclude /usr/bin since it's not a real path.
54153    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54154      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54155      # a path prefixed by /cygdrive for fixpath to work.
54156      new_path="$CYGWIN_ROOT_PATH$input_path"
54157    fi
54158  fi
54159
54160
54161  if test "x$path" != "x$new_path"; then
54162    MSVC_DLL="$new_path"
54163    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54164$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54165  fi
54166
54167    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54168
54169  path="$MSVC_DLL"
54170  has_colon=`$ECHO $path | $GREP ^.:`
54171  new_path="$path"
54172  if test "x$has_colon" = x; then
54173    # Not in mixed or Windows style, start by that.
54174    new_path=`cmd //c echo $path`
54175  fi
54176
54177
54178  input_path="$new_path"
54179  # Check if we need to convert this using DOS-style short mode. If the path
54180  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54181  # take no chances and rewrite it.
54182  # Note: m4 eats our [], so we need to use [ and ] instead.
54183  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54184  if test "x$has_forbidden_chars" != x; then
54185    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54186    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54187  fi
54188
54189
54190  windows_path="$new_path"
54191  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54192    unix_path=`$CYGPATH -u "$windows_path"`
54193    new_path="$unix_path"
54194  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54195    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54196    new_path="$unix_path"
54197  fi
54198
54199  if test "x$path" != "x$new_path"; then
54200    MSVC_DLL="$new_path"
54201    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54202$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54203  fi
54204
54205  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54206  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54207
54208    else
54209      # We're on a unix platform. Hooray! :)
54210      path="$MSVC_DLL"
54211      has_space=`$ECHO "$path" | $GREP " "`
54212      if test "x$has_space" != x; then
54213        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54214$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54215        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54216      fi
54217
54218      # Use eval to expand a potential ~
54219      eval path="$path"
54220      if test ! -f "$path" && test ! -d "$path"; then
54221        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54222      fi
54223
54224      if test -d "$path"; then
54225        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54226      else
54227        dir="`$DIRNAME "$path"`"
54228        base="`$BASENAME "$path"`"
54229        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54230      fi
54231    fi
54232  fi
54233
54234      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54235$as_echo_n "checking for $DLL_NAME... " >&6; }
54236      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54237$as_echo "$MSVC_DLL" >&6; }
54238    else
54239      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54240$as_echo "incorrect, ignoring" >&6; }
54241      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54242$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54243    fi
54244  fi
54245
54246    fi
54247  fi
54248
54249  if test "x$MSVC_DLL" = x; then
54250    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
54251    # (This was the original behaviour; kept since it might turn something up)
54252    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
54253      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54254        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54255	    | $GREP x64 | $HEAD --lines 1`
54256      else
54257        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54258	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
54259        if test "x$POSSIBLE_MSVC_DLL" = x; then
54260          # We're grasping at straws now...
54261          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54262	      | $HEAD --lines 1`
54263        fi
54264      fi
54265
54266
54267  DLL_NAME="$DLL_NAME"
54268  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54269  METHOD="search of VCINSTALLDIR"
54270  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54271    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54272$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54273
54274    # Need to check if the found msvcr is correct architecture
54275    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54276$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54277    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54278    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54279      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54280      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54281      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54282        CORRECT_MSVCR_ARCH="PE32 executable"
54283      else
54284        CORRECT_MSVCR_ARCH="PE32+ executable"
54285      fi
54286    else
54287      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54288        CORRECT_MSVCR_ARCH=386
54289      else
54290        CORRECT_MSVCR_ARCH=x86-64
54291      fi
54292    fi
54293    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54294      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54295$as_echo "ok" >&6; }
54296      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54297
54298  # Only process if variable expands to non-empty
54299
54300  if test "x$MSVC_DLL" != x; then
54301    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54302
54303  # Input might be given as Windows format, start by converting to
54304  # unix format.
54305  path="$MSVC_DLL"
54306  new_path=`$CYGPATH -u "$path"`
54307
54308  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54309  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54310  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54311  # "foo.exe" is OK but "foo" is an error.
54312  #
54313  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54314  # It is also a way to make sure we got the proper file name for the real test later on.
54315  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54316  if test "x$test_shortpath" = x; then
54317    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54318$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54319    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54320  fi
54321
54322  # Call helper function which possibly converts this using DOS-style short mode.
54323  # If so, the updated path is stored in $new_path.
54324
54325  input_path="$new_path"
54326  # Check if we need to convert this using DOS-style short mode. If the path
54327  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54328  # take no chances and rewrite it.
54329  # Note: m4 eats our [], so we need to use [ and ] instead.
54330  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54331  if test "x$has_forbidden_chars" != x; then
54332    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54333    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54334    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54335    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54336      # Going to short mode and back again did indeed matter. Since short mode is
54337      # case insensitive, let's make it lowercase to improve readability.
54338      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54339      # Now convert it back to Unix-style (cygpath)
54340      input_path=`$CYGPATH -u "$shortmode_path"`
54341      new_path="$input_path"
54342    fi
54343  fi
54344
54345  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54346  if test "x$test_cygdrive_prefix" = x; then
54347    # As a simple fix, exclude /usr/bin since it's not a real path.
54348    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54349      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54350      # a path prefixed by /cygdrive for fixpath to work.
54351      new_path="$CYGWIN_ROOT_PATH$input_path"
54352    fi
54353  fi
54354
54355
54356  if test "x$path" != "x$new_path"; then
54357    MSVC_DLL="$new_path"
54358    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54359$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54360  fi
54361
54362    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54363
54364  path="$MSVC_DLL"
54365  has_colon=`$ECHO $path | $GREP ^.:`
54366  new_path="$path"
54367  if test "x$has_colon" = x; then
54368    # Not in mixed or Windows style, start by that.
54369    new_path=`cmd //c echo $path`
54370  fi
54371
54372
54373  input_path="$new_path"
54374  # Check if we need to convert this using DOS-style short mode. If the path
54375  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54376  # take no chances and rewrite it.
54377  # Note: m4 eats our [], so we need to use [ and ] instead.
54378  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54379  if test "x$has_forbidden_chars" != x; then
54380    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54381    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54382  fi
54383
54384
54385  windows_path="$new_path"
54386  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54387    unix_path=`$CYGPATH -u "$windows_path"`
54388    new_path="$unix_path"
54389  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54390    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54391    new_path="$unix_path"
54392  fi
54393
54394  if test "x$path" != "x$new_path"; then
54395    MSVC_DLL="$new_path"
54396    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54397$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54398  fi
54399
54400  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54401  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54402
54403    else
54404      # We're on a unix platform. Hooray! :)
54405      path="$MSVC_DLL"
54406      has_space=`$ECHO "$path" | $GREP " "`
54407      if test "x$has_space" != x; then
54408        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54409$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54410        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54411      fi
54412
54413      # Use eval to expand a potential ~
54414      eval path="$path"
54415      if test ! -f "$path" && test ! -d "$path"; then
54416        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54417      fi
54418
54419      if test -d "$path"; then
54420        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54421      else
54422        dir="`$DIRNAME "$path"`"
54423        base="`$BASENAME "$path"`"
54424        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54425      fi
54426    fi
54427  fi
54428
54429      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54430$as_echo_n "checking for $DLL_NAME... " >&6; }
54431      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54432$as_echo "$MSVC_DLL" >&6; }
54433    else
54434      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54435$as_echo "incorrect, ignoring" >&6; }
54436      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54437$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54438    fi
54439  fi
54440
54441    fi
54442  fi
54443
54444  if test "x$MSVC_DLL" = x; then
54445    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54446$as_echo_n "checking for $DLL_NAME... " >&6; }
54447    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54448$as_echo "no" >&6; }
54449    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
54450  fi
54451
54452    MSVCR_DLL="$MSVC_DLL"
54453  fi
54454
54455
54456
54457# Check whether --with-msvcp-dll was given.
54458if test "${with_msvcp_dll+set}" = set; then :
54459  withval=$with_msvcp_dll;
54460fi
54461
54462
54463  if test "x$MSVCP_NAME" != "x"; then
54464    if test "x$with_msvcp_dll" != x; then
54465      # If given explicitly by user, do not probe. If not present, fail directly.
54466
54467  DLL_NAME="$MSVCP_NAME"
54468  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
54469  METHOD="--with-msvcp-dll"
54470  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54471    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54472$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54473
54474    # Need to check if the found msvcr is correct architecture
54475    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54476$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54477    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54478    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54479      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54480      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54481      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54482        CORRECT_MSVCR_ARCH="PE32 executable"
54483      else
54484        CORRECT_MSVCR_ARCH="PE32+ executable"
54485      fi
54486    else
54487      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54488        CORRECT_MSVCR_ARCH=386
54489      else
54490        CORRECT_MSVCR_ARCH=x86-64
54491      fi
54492    fi
54493    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54494      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54495$as_echo "ok" >&6; }
54496      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54497
54498  # Only process if variable expands to non-empty
54499
54500  if test "x$MSVC_DLL" != x; then
54501    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54502
54503  # Input might be given as Windows format, start by converting to
54504  # unix format.
54505  path="$MSVC_DLL"
54506  new_path=`$CYGPATH -u "$path"`
54507
54508  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54509  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54510  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54511  # "foo.exe" is OK but "foo" is an error.
54512  #
54513  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54514  # It is also a way to make sure we got the proper file name for the real test later on.
54515  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54516  if test "x$test_shortpath" = x; then
54517    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54518$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54519    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54520  fi
54521
54522  # Call helper function which possibly converts this using DOS-style short mode.
54523  # If so, the updated path is stored in $new_path.
54524
54525  input_path="$new_path"
54526  # Check if we need to convert this using DOS-style short mode. If the path
54527  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54528  # take no chances and rewrite it.
54529  # Note: m4 eats our [], so we need to use [ and ] instead.
54530  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54531  if test "x$has_forbidden_chars" != x; then
54532    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54533    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54534    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54535    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54536      # Going to short mode and back again did indeed matter. Since short mode is
54537      # case insensitive, let's make it lowercase to improve readability.
54538      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54539      # Now convert it back to Unix-style (cygpath)
54540      input_path=`$CYGPATH -u "$shortmode_path"`
54541      new_path="$input_path"
54542    fi
54543  fi
54544
54545  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54546  if test "x$test_cygdrive_prefix" = x; then
54547    # As a simple fix, exclude /usr/bin since it's not a real path.
54548    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54549      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54550      # a path prefixed by /cygdrive for fixpath to work.
54551      new_path="$CYGWIN_ROOT_PATH$input_path"
54552    fi
54553  fi
54554
54555
54556  if test "x$path" != "x$new_path"; then
54557    MSVC_DLL="$new_path"
54558    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54559$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54560  fi
54561
54562    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54563
54564  path="$MSVC_DLL"
54565  has_colon=`$ECHO $path | $GREP ^.:`
54566  new_path="$path"
54567  if test "x$has_colon" = x; then
54568    # Not in mixed or Windows style, start by that.
54569    new_path=`cmd //c echo $path`
54570  fi
54571
54572
54573  input_path="$new_path"
54574  # Check if we need to convert this using DOS-style short mode. If the path
54575  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54576  # take no chances and rewrite it.
54577  # Note: m4 eats our [], so we need to use [ and ] instead.
54578  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54579  if test "x$has_forbidden_chars" != x; then
54580    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54581    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54582  fi
54583
54584
54585  windows_path="$new_path"
54586  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54587    unix_path=`$CYGPATH -u "$windows_path"`
54588    new_path="$unix_path"
54589  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54590    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54591    new_path="$unix_path"
54592  fi
54593
54594  if test "x$path" != "x$new_path"; then
54595    MSVC_DLL="$new_path"
54596    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54597$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54598  fi
54599
54600  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54601  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54602
54603    else
54604      # We're on a unix platform. Hooray! :)
54605      path="$MSVC_DLL"
54606      has_space=`$ECHO "$path" | $GREP " "`
54607      if test "x$has_space" != x; then
54608        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54609$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54610        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54611      fi
54612
54613      # Use eval to expand a potential ~
54614      eval path="$path"
54615      if test ! -f "$path" && test ! -d "$path"; then
54616        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54617      fi
54618
54619      if test -d "$path"; then
54620        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54621      else
54622        dir="`$DIRNAME "$path"`"
54623        base="`$BASENAME "$path"`"
54624        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54625      fi
54626    fi
54627  fi
54628
54629      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54630$as_echo_n "checking for $DLL_NAME... " >&6; }
54631      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54632$as_echo "$MSVC_DLL" >&6; }
54633    else
54634      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54635$as_echo "incorrect, ignoring" >&6; }
54636      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54637$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54638    fi
54639  fi
54640
54641      if test "x$MSVC_DLL" = x; then
54642        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
54643      fi
54644      MSVCP_DLL="$MSVC_DLL"
54645    elif test "x$DEVKIT_MSVCP_DLL" != x; then
54646
54647  DLL_NAME="$MSVCP_NAME"
54648  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
54649  METHOD="devkit"
54650  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54651    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54652$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54653
54654    # Need to check if the found msvcr is correct architecture
54655    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54656$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54657    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54658    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54659      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54660      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54661      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54662        CORRECT_MSVCR_ARCH="PE32 executable"
54663      else
54664        CORRECT_MSVCR_ARCH="PE32+ executable"
54665      fi
54666    else
54667      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54668        CORRECT_MSVCR_ARCH=386
54669      else
54670        CORRECT_MSVCR_ARCH=x86-64
54671      fi
54672    fi
54673    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54674      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54675$as_echo "ok" >&6; }
54676      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54677
54678  # Only process if variable expands to non-empty
54679
54680  if test "x$MSVC_DLL" != x; then
54681    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54682
54683  # Input might be given as Windows format, start by converting to
54684  # unix format.
54685  path="$MSVC_DLL"
54686  new_path=`$CYGPATH -u "$path"`
54687
54688  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54689  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54690  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54691  # "foo.exe" is OK but "foo" is an error.
54692  #
54693  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54694  # It is also a way to make sure we got the proper file name for the real test later on.
54695  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54696  if test "x$test_shortpath" = x; then
54697    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54698$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54699    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54700  fi
54701
54702  # Call helper function which possibly converts this using DOS-style short mode.
54703  # If so, the updated path is stored in $new_path.
54704
54705  input_path="$new_path"
54706  # Check if we need to convert this using DOS-style short mode. If the path
54707  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54708  # take no chances and rewrite it.
54709  # Note: m4 eats our [], so we need to use [ and ] instead.
54710  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54711  if test "x$has_forbidden_chars" != x; then
54712    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54713    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54714    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54715    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54716      # Going to short mode and back again did indeed matter. Since short mode is
54717      # case insensitive, let's make it lowercase to improve readability.
54718      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54719      # Now convert it back to Unix-style (cygpath)
54720      input_path=`$CYGPATH -u "$shortmode_path"`
54721      new_path="$input_path"
54722    fi
54723  fi
54724
54725  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54726  if test "x$test_cygdrive_prefix" = x; then
54727    # As a simple fix, exclude /usr/bin since it's not a real path.
54728    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54729      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54730      # a path prefixed by /cygdrive for fixpath to work.
54731      new_path="$CYGWIN_ROOT_PATH$input_path"
54732    fi
54733  fi
54734
54735
54736  if test "x$path" != "x$new_path"; then
54737    MSVC_DLL="$new_path"
54738    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54739$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54740  fi
54741
54742    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54743
54744  path="$MSVC_DLL"
54745  has_colon=`$ECHO $path | $GREP ^.:`
54746  new_path="$path"
54747  if test "x$has_colon" = x; then
54748    # Not in mixed or Windows style, start by that.
54749    new_path=`cmd //c echo $path`
54750  fi
54751
54752
54753  input_path="$new_path"
54754  # Check if we need to convert this using DOS-style short mode. If the path
54755  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54756  # take no chances and rewrite it.
54757  # Note: m4 eats our [], so we need to use [ and ] instead.
54758  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54759  if test "x$has_forbidden_chars" != x; then
54760    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54761    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54762  fi
54763
54764
54765  windows_path="$new_path"
54766  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54767    unix_path=`$CYGPATH -u "$windows_path"`
54768    new_path="$unix_path"
54769  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54770    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54771    new_path="$unix_path"
54772  fi
54773
54774  if test "x$path" != "x$new_path"; then
54775    MSVC_DLL="$new_path"
54776    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54777$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54778  fi
54779
54780  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54781  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54782
54783    else
54784      # We're on a unix platform. Hooray! :)
54785      path="$MSVC_DLL"
54786      has_space=`$ECHO "$path" | $GREP " "`
54787      if test "x$has_space" != x; then
54788        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54789$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54790        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54791      fi
54792
54793      # Use eval to expand a potential ~
54794      eval path="$path"
54795      if test ! -f "$path" && test ! -d "$path"; then
54796        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54797      fi
54798
54799      if test -d "$path"; then
54800        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54801      else
54802        dir="`$DIRNAME "$path"`"
54803        base="`$BASENAME "$path"`"
54804        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54805      fi
54806    fi
54807  fi
54808
54809      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54810$as_echo_n "checking for $DLL_NAME... " >&6; }
54811      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54812$as_echo "$MSVC_DLL" >&6; }
54813    else
54814      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54815$as_echo "incorrect, ignoring" >&6; }
54816      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54817$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54818    fi
54819  fi
54820
54821      if test "x$MSVC_DLL" = x; then
54822        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
54823      fi
54824      MSVCP_DLL="$MSVC_DLL"
54825    else
54826
54827  DLL_NAME="${MSVCP_NAME}"
54828  MSVC_DLL=
54829
54830  if test "x$MSVC_DLL" = x; then
54831    # Probe: Using well-known location from Visual Studio 10.0
54832    if test "x$VCINSTALLDIR" != x; then
54833      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
54834
54835  windows_path="$CYGWIN_VC_INSTALL_DIR"
54836  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54837    unix_path=`$CYGPATH -u "$windows_path"`
54838    CYGWIN_VC_INSTALL_DIR="$unix_path"
54839  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54840    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54841    CYGWIN_VC_INSTALL_DIR="$unix_path"
54842  fi
54843
54844      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54845        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54846      else
54847        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54848      fi
54849      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
54850
54851  DLL_NAME="$DLL_NAME"
54852  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54853  METHOD="well-known location in VCINSTALLDIR"
54854  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54855    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54856$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54857
54858    # Need to check if the found msvcr is correct architecture
54859    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54860$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54861    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54862    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54863      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54864      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54865      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54866        CORRECT_MSVCR_ARCH="PE32 executable"
54867      else
54868        CORRECT_MSVCR_ARCH="PE32+ executable"
54869      fi
54870    else
54871      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54872        CORRECT_MSVCR_ARCH=386
54873      else
54874        CORRECT_MSVCR_ARCH=x86-64
54875      fi
54876    fi
54877    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54878      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54879$as_echo "ok" >&6; }
54880      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54881
54882  # Only process if variable expands to non-empty
54883
54884  if test "x$MSVC_DLL" != x; then
54885    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54886
54887  # Input might be given as Windows format, start by converting to
54888  # unix format.
54889  path="$MSVC_DLL"
54890  new_path=`$CYGPATH -u "$path"`
54891
54892  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54893  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54894  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54895  # "foo.exe" is OK but "foo" is an error.
54896  #
54897  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54898  # It is also a way to make sure we got the proper file name for the real test later on.
54899  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54900  if test "x$test_shortpath" = x; then
54901    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54902$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54903    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54904  fi
54905
54906  # Call helper function which possibly converts this using DOS-style short mode.
54907  # If so, the updated path is stored in $new_path.
54908
54909  input_path="$new_path"
54910  # Check if we need to convert this using DOS-style short mode. If the path
54911  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54912  # take no chances and rewrite it.
54913  # Note: m4 eats our [], so we need to use [ and ] instead.
54914  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54915  if test "x$has_forbidden_chars" != x; then
54916    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54917    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54918    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54919    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54920      # Going to short mode and back again did indeed matter. Since short mode is
54921      # case insensitive, let's make it lowercase to improve readability.
54922      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54923      # Now convert it back to Unix-style (cygpath)
54924      input_path=`$CYGPATH -u "$shortmode_path"`
54925      new_path="$input_path"
54926    fi
54927  fi
54928
54929  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54930  if test "x$test_cygdrive_prefix" = x; then
54931    # As a simple fix, exclude /usr/bin since it's not a real path.
54932    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54933      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54934      # a path prefixed by /cygdrive for fixpath to work.
54935      new_path="$CYGWIN_ROOT_PATH$input_path"
54936    fi
54937  fi
54938
54939
54940  if test "x$path" != "x$new_path"; then
54941    MSVC_DLL="$new_path"
54942    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54943$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54944  fi
54945
54946    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54947
54948  path="$MSVC_DLL"
54949  has_colon=`$ECHO $path | $GREP ^.:`
54950  new_path="$path"
54951  if test "x$has_colon" = x; then
54952    # Not in mixed or Windows style, start by that.
54953    new_path=`cmd //c echo $path`
54954  fi
54955
54956
54957  input_path="$new_path"
54958  # Check if we need to convert this using DOS-style short mode. If the path
54959  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54960  # take no chances and rewrite it.
54961  # Note: m4 eats our [], so we need to use [ and ] instead.
54962  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54963  if test "x$has_forbidden_chars" != x; then
54964    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54965    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54966  fi
54967
54968
54969  windows_path="$new_path"
54970  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54971    unix_path=`$CYGPATH -u "$windows_path"`
54972    new_path="$unix_path"
54973  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54974    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54975    new_path="$unix_path"
54976  fi
54977
54978  if test "x$path" != "x$new_path"; then
54979    MSVC_DLL="$new_path"
54980    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54981$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54982  fi
54983
54984  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54985  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54986
54987    else
54988      # We're on a unix platform. Hooray! :)
54989      path="$MSVC_DLL"
54990      has_space=`$ECHO "$path" | $GREP " "`
54991      if test "x$has_space" != x; then
54992        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54993$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54994        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54995      fi
54996
54997      # Use eval to expand a potential ~
54998      eval path="$path"
54999      if test ! -f "$path" && test ! -d "$path"; then
55000        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55001      fi
55002
55003      if test -d "$path"; then
55004        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55005      else
55006        dir="`$DIRNAME "$path"`"
55007        base="`$BASENAME "$path"`"
55008        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55009      fi
55010    fi
55011  fi
55012
55013      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55014$as_echo_n "checking for $DLL_NAME... " >&6; }
55015      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55016$as_echo "$MSVC_DLL" >&6; }
55017    else
55018      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55019$as_echo "incorrect, ignoring" >&6; }
55020      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55021$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55022    fi
55023  fi
55024
55025    fi
55026  fi
55027
55028  if test "x$MSVC_DLL" = x; then
55029    # Probe: Check in the Boot JDK directory.
55030    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
55031
55032  DLL_NAME="$DLL_NAME"
55033  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55034  METHOD="well-known location in Boot JDK"
55035  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55036    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55037$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55038
55039    # Need to check if the found msvcr is correct architecture
55040    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55041$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55042    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55043    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55044      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55045      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55046      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55047        CORRECT_MSVCR_ARCH="PE32 executable"
55048      else
55049        CORRECT_MSVCR_ARCH="PE32+ executable"
55050      fi
55051    else
55052      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55053        CORRECT_MSVCR_ARCH=386
55054      else
55055        CORRECT_MSVCR_ARCH=x86-64
55056      fi
55057    fi
55058    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55059      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55060$as_echo "ok" >&6; }
55061      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55062
55063  # Only process if variable expands to non-empty
55064
55065  if test "x$MSVC_DLL" != x; then
55066    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55067
55068  # Input might be given as Windows format, start by converting to
55069  # unix format.
55070  path="$MSVC_DLL"
55071  new_path=`$CYGPATH -u "$path"`
55072
55073  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55074  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55075  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55076  # "foo.exe" is OK but "foo" is an error.
55077  #
55078  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55079  # It is also a way to make sure we got the proper file name for the real test later on.
55080  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55081  if test "x$test_shortpath" = x; then
55082    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55083$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55084    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55085  fi
55086
55087  # Call helper function which possibly converts this using DOS-style short mode.
55088  # If so, the updated path is stored in $new_path.
55089
55090  input_path="$new_path"
55091  # Check if we need to convert this using DOS-style short mode. If the path
55092  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55093  # take no chances and rewrite it.
55094  # Note: m4 eats our [], so we need to use [ and ] instead.
55095  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55096  if test "x$has_forbidden_chars" != x; then
55097    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55098    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55099    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55100    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55101      # Going to short mode and back again did indeed matter. Since short mode is
55102      # case insensitive, let's make it lowercase to improve readability.
55103      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55104      # Now convert it back to Unix-style (cygpath)
55105      input_path=`$CYGPATH -u "$shortmode_path"`
55106      new_path="$input_path"
55107    fi
55108  fi
55109
55110  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55111  if test "x$test_cygdrive_prefix" = x; then
55112    # As a simple fix, exclude /usr/bin since it's not a real path.
55113    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55114      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55115      # a path prefixed by /cygdrive for fixpath to work.
55116      new_path="$CYGWIN_ROOT_PATH$input_path"
55117    fi
55118  fi
55119
55120
55121  if test "x$path" != "x$new_path"; then
55122    MSVC_DLL="$new_path"
55123    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55124$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55125  fi
55126
55127    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55128
55129  path="$MSVC_DLL"
55130  has_colon=`$ECHO $path | $GREP ^.:`
55131  new_path="$path"
55132  if test "x$has_colon" = x; then
55133    # Not in mixed or Windows style, start by that.
55134    new_path=`cmd //c echo $path`
55135  fi
55136
55137
55138  input_path="$new_path"
55139  # Check if we need to convert this using DOS-style short mode. If the path
55140  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55141  # take no chances and rewrite it.
55142  # Note: m4 eats our [], so we need to use [ and ] instead.
55143  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55144  if test "x$has_forbidden_chars" != x; then
55145    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55146    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55147  fi
55148
55149
55150  windows_path="$new_path"
55151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55152    unix_path=`$CYGPATH -u "$windows_path"`
55153    new_path="$unix_path"
55154  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55155    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55156    new_path="$unix_path"
55157  fi
55158
55159  if test "x$path" != "x$new_path"; then
55160    MSVC_DLL="$new_path"
55161    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55162$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55163  fi
55164
55165  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55166  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55167
55168    else
55169      # We're on a unix platform. Hooray! :)
55170      path="$MSVC_DLL"
55171      has_space=`$ECHO "$path" | $GREP " "`
55172      if test "x$has_space" != x; then
55173        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55174$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55175        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55176      fi
55177
55178      # Use eval to expand a potential ~
55179      eval path="$path"
55180      if test ! -f "$path" && test ! -d "$path"; then
55181        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55182      fi
55183
55184      if test -d "$path"; then
55185        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55186      else
55187        dir="`$DIRNAME "$path"`"
55188        base="`$BASENAME "$path"`"
55189        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55190      fi
55191    fi
55192  fi
55193
55194      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55195$as_echo_n "checking for $DLL_NAME... " >&6; }
55196      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55197$as_echo "$MSVC_DLL" >&6; }
55198    else
55199      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55200$as_echo "incorrect, ignoring" >&6; }
55201      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55202$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55203    fi
55204  fi
55205
55206  fi
55207
55208  if test "x$MSVC_DLL" = x; then
55209    # Probe: Look in the Windows system32 directory
55210    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
55211
55212  windows_path="$CYGWIN_SYSTEMROOT"
55213  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55214    unix_path=`$CYGPATH -u "$windows_path"`
55215    CYGWIN_SYSTEMROOT="$unix_path"
55216  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55217    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55218    CYGWIN_SYSTEMROOT="$unix_path"
55219  fi
55220
55221    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
55222
55223  DLL_NAME="$DLL_NAME"
55224  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55225  METHOD="well-known location in SYSTEMROOT"
55226  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55227    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55228$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55229
55230    # Need to check if the found msvcr is correct architecture
55231    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55232$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55233    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55234    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55235      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55236      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55237      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55238        CORRECT_MSVCR_ARCH="PE32 executable"
55239      else
55240        CORRECT_MSVCR_ARCH="PE32+ executable"
55241      fi
55242    else
55243      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55244        CORRECT_MSVCR_ARCH=386
55245      else
55246        CORRECT_MSVCR_ARCH=x86-64
55247      fi
55248    fi
55249    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55250      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55251$as_echo "ok" >&6; }
55252      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55253
55254  # Only process if variable expands to non-empty
55255
55256  if test "x$MSVC_DLL" != x; then
55257    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55258
55259  # Input might be given as Windows format, start by converting to
55260  # unix format.
55261  path="$MSVC_DLL"
55262  new_path=`$CYGPATH -u "$path"`
55263
55264  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55265  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55266  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55267  # "foo.exe" is OK but "foo" is an error.
55268  #
55269  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55270  # It is also a way to make sure we got the proper file name for the real test later on.
55271  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55272  if test "x$test_shortpath" = x; then
55273    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55274$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55275    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55276  fi
55277
55278  # Call helper function which possibly converts this using DOS-style short mode.
55279  # If so, the updated path is stored in $new_path.
55280
55281  input_path="$new_path"
55282  # Check if we need to convert this using DOS-style short mode. If the path
55283  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55284  # take no chances and rewrite it.
55285  # Note: m4 eats our [], so we need to use [ and ] instead.
55286  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55287  if test "x$has_forbidden_chars" != x; then
55288    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55289    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55290    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55291    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55292      # Going to short mode and back again did indeed matter. Since short mode is
55293      # case insensitive, let's make it lowercase to improve readability.
55294      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55295      # Now convert it back to Unix-style (cygpath)
55296      input_path=`$CYGPATH -u "$shortmode_path"`
55297      new_path="$input_path"
55298    fi
55299  fi
55300
55301  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55302  if test "x$test_cygdrive_prefix" = x; then
55303    # As a simple fix, exclude /usr/bin since it's not a real path.
55304    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55305      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55306      # a path prefixed by /cygdrive for fixpath to work.
55307      new_path="$CYGWIN_ROOT_PATH$input_path"
55308    fi
55309  fi
55310
55311
55312  if test "x$path" != "x$new_path"; then
55313    MSVC_DLL="$new_path"
55314    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55315$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55316  fi
55317
55318    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55319
55320  path="$MSVC_DLL"
55321  has_colon=`$ECHO $path | $GREP ^.:`
55322  new_path="$path"
55323  if test "x$has_colon" = x; then
55324    # Not in mixed or Windows style, start by that.
55325    new_path=`cmd //c echo $path`
55326  fi
55327
55328
55329  input_path="$new_path"
55330  # Check if we need to convert this using DOS-style short mode. If the path
55331  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55332  # take no chances and rewrite it.
55333  # Note: m4 eats our [], so we need to use [ and ] instead.
55334  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55335  if test "x$has_forbidden_chars" != x; then
55336    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55337    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55338  fi
55339
55340
55341  windows_path="$new_path"
55342  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55343    unix_path=`$CYGPATH -u "$windows_path"`
55344    new_path="$unix_path"
55345  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55346    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55347    new_path="$unix_path"
55348  fi
55349
55350  if test "x$path" != "x$new_path"; then
55351    MSVC_DLL="$new_path"
55352    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55353$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55354  fi
55355
55356  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55357  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55358
55359    else
55360      # We're on a unix platform. Hooray! :)
55361      path="$MSVC_DLL"
55362      has_space=`$ECHO "$path" | $GREP " "`
55363      if test "x$has_space" != x; then
55364        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55365$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55366        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55367      fi
55368
55369      # Use eval to expand a potential ~
55370      eval path="$path"
55371      if test ! -f "$path" && test ! -d "$path"; then
55372        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55373      fi
55374
55375      if test -d "$path"; then
55376        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55377      else
55378        dir="`$DIRNAME "$path"`"
55379        base="`$BASENAME "$path"`"
55380        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55381      fi
55382    fi
55383  fi
55384
55385      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55386$as_echo_n "checking for $DLL_NAME... " >&6; }
55387      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55388$as_echo "$MSVC_DLL" >&6; }
55389    else
55390      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55391$as_echo "incorrect, ignoring" >&6; }
55392      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55393$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55394    fi
55395  fi
55396
55397  fi
55398
55399  if test "x$MSVC_DLL" = x; then
55400    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
55401    if test "x$VS100COMNTOOLS" != x; then
55402      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
55403
55404  windows_path="$CYGWIN_VS_TOOLS_DIR"
55405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55406    unix_path=`$CYGPATH -u "$windows_path"`
55407    CYGWIN_VS_TOOLS_DIR="$unix_path"
55408  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55409    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55410    CYGWIN_VS_TOOLS_DIR="$unix_path"
55411  fi
55412
55413      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55414        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55415	    | $GREP -i /x64/ | $HEAD --lines 1`
55416      else
55417        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55418	    | $GREP -i /x86/ | $HEAD --lines 1`
55419      fi
55420
55421  DLL_NAME="$DLL_NAME"
55422  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55423  METHOD="search of VS100COMNTOOLS"
55424  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55425    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55426$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55427
55428    # Need to check if the found msvcr is correct architecture
55429    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55430$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55431    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55432    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55433      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55434      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55435      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55436        CORRECT_MSVCR_ARCH="PE32 executable"
55437      else
55438        CORRECT_MSVCR_ARCH="PE32+ executable"
55439      fi
55440    else
55441      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55442        CORRECT_MSVCR_ARCH=386
55443      else
55444        CORRECT_MSVCR_ARCH=x86-64
55445      fi
55446    fi
55447    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55448      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55449$as_echo "ok" >&6; }
55450      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55451
55452  # Only process if variable expands to non-empty
55453
55454  if test "x$MSVC_DLL" != x; then
55455    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55456
55457  # Input might be given as Windows format, start by converting to
55458  # unix format.
55459  path="$MSVC_DLL"
55460  new_path=`$CYGPATH -u "$path"`
55461
55462  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55463  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55464  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55465  # "foo.exe" is OK but "foo" is an error.
55466  #
55467  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55468  # It is also a way to make sure we got the proper file name for the real test later on.
55469  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55470  if test "x$test_shortpath" = x; then
55471    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55472$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55473    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55474  fi
55475
55476  # Call helper function which possibly converts this using DOS-style short mode.
55477  # If so, the updated path is stored in $new_path.
55478
55479  input_path="$new_path"
55480  # Check if we need to convert this using DOS-style short mode. If the path
55481  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55482  # take no chances and rewrite it.
55483  # Note: m4 eats our [], so we need to use [ and ] instead.
55484  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55485  if test "x$has_forbidden_chars" != x; then
55486    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55487    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55488    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55489    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55490      # Going to short mode and back again did indeed matter. Since short mode is
55491      # case insensitive, let's make it lowercase to improve readability.
55492      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55493      # Now convert it back to Unix-style (cygpath)
55494      input_path=`$CYGPATH -u "$shortmode_path"`
55495      new_path="$input_path"
55496    fi
55497  fi
55498
55499  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55500  if test "x$test_cygdrive_prefix" = x; then
55501    # As a simple fix, exclude /usr/bin since it's not a real path.
55502    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55503      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55504      # a path prefixed by /cygdrive for fixpath to work.
55505      new_path="$CYGWIN_ROOT_PATH$input_path"
55506    fi
55507  fi
55508
55509
55510  if test "x$path" != "x$new_path"; then
55511    MSVC_DLL="$new_path"
55512    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55513$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55514  fi
55515
55516    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55517
55518  path="$MSVC_DLL"
55519  has_colon=`$ECHO $path | $GREP ^.:`
55520  new_path="$path"
55521  if test "x$has_colon" = x; then
55522    # Not in mixed or Windows style, start by that.
55523    new_path=`cmd //c echo $path`
55524  fi
55525
55526
55527  input_path="$new_path"
55528  # Check if we need to convert this using DOS-style short mode. If the path
55529  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55530  # take no chances and rewrite it.
55531  # Note: m4 eats our [], so we need to use [ and ] instead.
55532  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55533  if test "x$has_forbidden_chars" != x; then
55534    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55535    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55536  fi
55537
55538
55539  windows_path="$new_path"
55540  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55541    unix_path=`$CYGPATH -u "$windows_path"`
55542    new_path="$unix_path"
55543  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55544    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55545    new_path="$unix_path"
55546  fi
55547
55548  if test "x$path" != "x$new_path"; then
55549    MSVC_DLL="$new_path"
55550    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55551$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55552  fi
55553
55554  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55555  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55556
55557    else
55558      # We're on a unix platform. Hooray! :)
55559      path="$MSVC_DLL"
55560      has_space=`$ECHO "$path" | $GREP " "`
55561      if test "x$has_space" != x; then
55562        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55563$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55564        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55565      fi
55566
55567      # Use eval to expand a potential ~
55568      eval path="$path"
55569      if test ! -f "$path" && test ! -d "$path"; then
55570        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55571      fi
55572
55573      if test -d "$path"; then
55574        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55575      else
55576        dir="`$DIRNAME "$path"`"
55577        base="`$BASENAME "$path"`"
55578        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55579      fi
55580    fi
55581  fi
55582
55583      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55584$as_echo_n "checking for $DLL_NAME... " >&6; }
55585      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55586$as_echo "$MSVC_DLL" >&6; }
55587    else
55588      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55589$as_echo "incorrect, ignoring" >&6; }
55590      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55591$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55592    fi
55593  fi
55594
55595    fi
55596  fi
55597
55598  if test "x$MSVC_DLL" = x; then
55599    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
55600    # (This was the original behaviour; kept since it might turn something up)
55601    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
55602      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55603        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55604	    | $GREP x64 | $HEAD --lines 1`
55605      else
55606        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55607	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
55608        if test "x$POSSIBLE_MSVC_DLL" = x; then
55609          # We're grasping at straws now...
55610          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55611	      | $HEAD --lines 1`
55612        fi
55613      fi
55614
55615
55616  DLL_NAME="$DLL_NAME"
55617  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55618  METHOD="search of VCINSTALLDIR"
55619  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55620    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55621$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55622
55623    # Need to check if the found msvcr is correct architecture
55624    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55625$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55626    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55627    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55628      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55629      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55630      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55631        CORRECT_MSVCR_ARCH="PE32 executable"
55632      else
55633        CORRECT_MSVCR_ARCH="PE32+ executable"
55634      fi
55635    else
55636      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55637        CORRECT_MSVCR_ARCH=386
55638      else
55639        CORRECT_MSVCR_ARCH=x86-64
55640      fi
55641    fi
55642    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55643      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55644$as_echo "ok" >&6; }
55645      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55646
55647  # Only process if variable expands to non-empty
55648
55649  if test "x$MSVC_DLL" != x; then
55650    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55651
55652  # Input might be given as Windows format, start by converting to
55653  # unix format.
55654  path="$MSVC_DLL"
55655  new_path=`$CYGPATH -u "$path"`
55656
55657  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55658  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55659  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55660  # "foo.exe" is OK but "foo" is an error.
55661  #
55662  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55663  # It is also a way to make sure we got the proper file name for the real test later on.
55664  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55665  if test "x$test_shortpath" = x; then
55666    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55667$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55668    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55669  fi
55670
55671  # Call helper function which possibly converts this using DOS-style short mode.
55672  # If so, the updated path is stored in $new_path.
55673
55674  input_path="$new_path"
55675  # Check if we need to convert this using DOS-style short mode. If the path
55676  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55677  # take no chances and rewrite it.
55678  # Note: m4 eats our [], so we need to use [ and ] instead.
55679  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55680  if test "x$has_forbidden_chars" != x; then
55681    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55682    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55683    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55684    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55685      # Going to short mode and back again did indeed matter. Since short mode is
55686      # case insensitive, let's make it lowercase to improve readability.
55687      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55688      # Now convert it back to Unix-style (cygpath)
55689      input_path=`$CYGPATH -u "$shortmode_path"`
55690      new_path="$input_path"
55691    fi
55692  fi
55693
55694  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55695  if test "x$test_cygdrive_prefix" = x; then
55696    # As a simple fix, exclude /usr/bin since it's not a real path.
55697    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55698      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55699      # a path prefixed by /cygdrive for fixpath to work.
55700      new_path="$CYGWIN_ROOT_PATH$input_path"
55701    fi
55702  fi
55703
55704
55705  if test "x$path" != "x$new_path"; then
55706    MSVC_DLL="$new_path"
55707    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55708$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55709  fi
55710
55711    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55712
55713  path="$MSVC_DLL"
55714  has_colon=`$ECHO $path | $GREP ^.:`
55715  new_path="$path"
55716  if test "x$has_colon" = x; then
55717    # Not in mixed or Windows style, start by that.
55718    new_path=`cmd //c echo $path`
55719  fi
55720
55721
55722  input_path="$new_path"
55723  # Check if we need to convert this using DOS-style short mode. If the path
55724  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55725  # take no chances and rewrite it.
55726  # Note: m4 eats our [], so we need to use [ and ] instead.
55727  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55728  if test "x$has_forbidden_chars" != x; then
55729    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55730    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55731  fi
55732
55733
55734  windows_path="$new_path"
55735  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55736    unix_path=`$CYGPATH -u "$windows_path"`
55737    new_path="$unix_path"
55738  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55739    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55740    new_path="$unix_path"
55741  fi
55742
55743  if test "x$path" != "x$new_path"; then
55744    MSVC_DLL="$new_path"
55745    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55746$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55747  fi
55748
55749  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55750  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55751
55752    else
55753      # We're on a unix platform. Hooray! :)
55754      path="$MSVC_DLL"
55755      has_space=`$ECHO "$path" | $GREP " "`
55756      if test "x$has_space" != x; then
55757        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55758$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55759        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55760      fi
55761
55762      # Use eval to expand a potential ~
55763      eval path="$path"
55764      if test ! -f "$path" && test ! -d "$path"; then
55765        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55766      fi
55767
55768      if test -d "$path"; then
55769        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55770      else
55771        dir="`$DIRNAME "$path"`"
55772        base="`$BASENAME "$path"`"
55773        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55774      fi
55775    fi
55776  fi
55777
55778      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55779$as_echo_n "checking for $DLL_NAME... " >&6; }
55780      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55781$as_echo "$MSVC_DLL" >&6; }
55782    else
55783      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55784$as_echo "incorrect, ignoring" >&6; }
55785      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55786$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55787    fi
55788  fi
55789
55790    fi
55791  fi
55792
55793  if test "x$MSVC_DLL" = x; then
55794    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55795$as_echo_n "checking for $DLL_NAME... " >&6; }
55796    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55797$as_echo "no" >&6; }
55798    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
55799  fi
55800
55801      MSVCP_DLL="$MSVC_DLL"
55802    fi
55803
55804  fi
55805
55806  fi
55807
55808
55809  if test "x$NEEDS_LIB_X11" = xfalse; then
55810    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
55811      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
55812$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
55813    fi
55814    X_CFLAGS=
55815    X_LIBS=
55816  else
55817
55818    if test "x${with_x}" = xno; then
55819      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
55820    fi
55821
55822    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
55823      # The user has specified a X11 base directory. Use it for includes and
55824      # libraries, unless explicitly overridden.
55825      if test "x$x_includes" = xNONE; then
55826        x_includes="${with_x}/include"
55827      fi
55828      if test "x$x_libraries" = xNONE; then
55829        x_libraries="${with_x}/lib"
55830      fi
55831    else
55832      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
55833      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
55834      # --x-libraries for the sysroot, if that seems to be correct.
55835      if test "x$SYSROOT" != "x"; then
55836        if test "x$x_includes" = xNONE; then
55837          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
55838            x_includes="$SYSROOT/usr/X11R6/include"
55839          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
55840            x_includes="$SYSROOT/usr/include"
55841          fi
55842        fi
55843        if test "x$x_libraries" = xNONE; then
55844          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
55845            x_libraries="$SYSROOT/usr/X11R6/lib"
55846          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55847            x_libraries="$SYSROOT/usr/lib64"
55848          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
55849            x_libraries="$SYSROOT/usr/lib"
55850          fi
55851        fi
55852      fi
55853    fi
55854
55855    # Now let autoconf do it's magic
55856    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
55857$as_echo_n "checking for X... " >&6; }
55858
55859
55860# Check whether --with-x was given.
55861if test "${with_x+set}" = set; then :
55862  withval=$with_x;
55863fi
55864
55865# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
55866if test "x$with_x" = xno; then
55867  # The user explicitly disabled X.
55868  have_x=disabled
55869else
55870  case $x_includes,$x_libraries in #(
55871    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
55872    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
55873  $as_echo_n "(cached) " >&6
55874else
55875  # One or both of the vars are not set, and there is no cached value.
55876ac_x_includes=no ac_x_libraries=no
55877rm -f -r conftest.dir
55878if mkdir conftest.dir; then
55879  cd conftest.dir
55880  cat >Imakefile <<'_ACEOF'
55881incroot:
55882	@echo incroot='${INCROOT}'
55883usrlibdir:
55884	@echo usrlibdir='${USRLIBDIR}'
55885libdir:
55886	@echo libdir='${LIBDIR}'
55887_ACEOF
55888  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
55889    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
55890    for ac_var in incroot usrlibdir libdir; do
55891      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
55892    done
55893    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
55894    for ac_extension in a so sl dylib la dll; do
55895      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
55896	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
55897	ac_im_usrlibdir=$ac_im_libdir; break
55898      fi
55899    done
55900    # Screen out bogus values from the imake configuration.  They are
55901    # bogus both because they are the default anyway, and because
55902    # using them would break gcc on systems where it needs fixed includes.
55903    case $ac_im_incroot in
55904	/usr/include) ac_x_includes= ;;
55905	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
55906    esac
55907    case $ac_im_usrlibdir in
55908	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
55909	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
55910    esac
55911  fi
55912  cd ..
55913  rm -f -r conftest.dir
55914fi
55915
55916# Standard set of common directories for X headers.
55917# Check X11 before X11Rn because it is often a symlink to the current release.
55918ac_x_header_dirs='
55919/usr/X11/include
55920/usr/X11R7/include
55921/usr/X11R6/include
55922/usr/X11R5/include
55923/usr/X11R4/include
55924
55925/usr/include/X11
55926/usr/include/X11R7
55927/usr/include/X11R6
55928/usr/include/X11R5
55929/usr/include/X11R4
55930
55931/usr/local/X11/include
55932/usr/local/X11R7/include
55933/usr/local/X11R6/include
55934/usr/local/X11R5/include
55935/usr/local/X11R4/include
55936
55937/usr/local/include/X11
55938/usr/local/include/X11R7
55939/usr/local/include/X11R6
55940/usr/local/include/X11R5
55941/usr/local/include/X11R4
55942
55943/usr/X386/include
55944/usr/x386/include
55945/usr/XFree86/include/X11
55946
55947/usr/include
55948/usr/local/include
55949/usr/unsupported/include
55950/usr/athena/include
55951/usr/local/x11r5/include
55952/usr/lpp/Xamples/include
55953
55954/usr/openwin/include
55955/usr/openwin/share/include'
55956
55957if test "$ac_x_includes" = no; then
55958  # Guess where to find include files, by looking for Xlib.h.
55959  # First, try using that file with no special directory specified.
55960  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55961/* end confdefs.h.  */
55962#include <X11/Xlib.h>
55963_ACEOF
55964if ac_fn_cxx_try_cpp "$LINENO"; then :
55965  # We can compile using X headers with no special include directory.
55966ac_x_includes=
55967else
55968  for ac_dir in $ac_x_header_dirs; do
55969  if test -r "$ac_dir/X11/Xlib.h"; then
55970    ac_x_includes=$ac_dir
55971    break
55972  fi
55973done
55974fi
55975rm -f conftest.err conftest.i conftest.$ac_ext
55976fi # $ac_x_includes = no
55977
55978if test "$ac_x_libraries" = no; then
55979  # Check for the libraries.
55980  # See if we find them without any special options.
55981  # Don't add to $LIBS permanently.
55982  ac_save_LIBS=$LIBS
55983  LIBS="-lX11 $LIBS"
55984  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55985/* end confdefs.h.  */
55986#include <X11/Xlib.h>
55987int
55988main ()
55989{
55990XrmInitialize ()
55991  ;
55992  return 0;
55993}
55994_ACEOF
55995if ac_fn_cxx_try_link "$LINENO"; then :
55996  LIBS=$ac_save_LIBS
55997# We can link X programs with no special library path.
55998ac_x_libraries=
55999else
56000  LIBS=$ac_save_LIBS
56001for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
56002do
56003  # Don't even attempt the hair of trying to link an X program!
56004  for ac_extension in a so sl dylib la dll; do
56005    if test -r "$ac_dir/libX11.$ac_extension"; then
56006      ac_x_libraries=$ac_dir
56007      break 2
56008    fi
56009  done
56010done
56011fi
56012rm -f core conftest.err conftest.$ac_objext \
56013    conftest$ac_exeext conftest.$ac_ext
56014fi # $ac_x_libraries = no
56015
56016case $ac_x_includes,$ac_x_libraries in #(
56017  no,* | *,no | *\'*)
56018    # Didn't find X, or a directory has "'" in its name.
56019    ac_cv_have_x="have_x=no";; #(
56020  *)
56021    # Record where we found X for the cache.
56022    ac_cv_have_x="have_x=yes\
56023	ac_x_includes='$ac_x_includes'\
56024	ac_x_libraries='$ac_x_libraries'"
56025esac
56026fi
56027;; #(
56028    *) have_x=yes;;
56029  esac
56030  eval "$ac_cv_have_x"
56031fi # $with_x != no
56032
56033if test "$have_x" != yes; then
56034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
56035$as_echo "$have_x" >&6; }
56036  no_x=yes
56037else
56038  # If each of the values was on the command line, it overrides each guess.
56039  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
56040  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
56041  # Update the cache value to reflect the command line values.
56042  ac_cv_have_x="have_x=yes\
56043	ac_x_includes='$x_includes'\
56044	ac_x_libraries='$x_libraries'"
56045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
56046$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
56047fi
56048
56049    if test "$no_x" = yes; then
56050  # Not all programs may use this symbol, but it does not hurt to define it.
56051
56052$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
56053
56054  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
56055else
56056  if test -n "$x_includes"; then
56057    X_CFLAGS="$X_CFLAGS -I$x_includes"
56058  fi
56059
56060  # It would also be nice to do this for all -L options, not just this one.
56061  if test -n "$x_libraries"; then
56062    X_LIBS="$X_LIBS -L$x_libraries"
56063    # For Solaris; some versions of Sun CC require a space after -R and
56064    # others require no space.  Words are not sufficient . . . .
56065    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
56066$as_echo_n "checking whether -R must be followed by a space... " >&6; }
56067    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
56068    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
56069    ac_cxx_werror_flag=yes
56070    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56071/* end confdefs.h.  */
56072
56073int
56074main ()
56075{
56076
56077  ;
56078  return 0;
56079}
56080_ACEOF
56081if ac_fn_cxx_try_link "$LINENO"; then :
56082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56083$as_echo "no" >&6; }
56084       X_LIBS="$X_LIBS -R$x_libraries"
56085else
56086  LIBS="$ac_xsave_LIBS -R $x_libraries"
56087       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56088/* end confdefs.h.  */
56089
56090int
56091main ()
56092{
56093
56094  ;
56095  return 0;
56096}
56097_ACEOF
56098if ac_fn_cxx_try_link "$LINENO"; then :
56099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56100$as_echo "yes" >&6; }
56101	  X_LIBS="$X_LIBS -R $x_libraries"
56102else
56103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
56104$as_echo "neither works" >&6; }
56105fi
56106rm -f core conftest.err conftest.$ac_objext \
56107    conftest$ac_exeext conftest.$ac_ext
56108fi
56109rm -f core conftest.err conftest.$ac_objext \
56110    conftest$ac_exeext conftest.$ac_ext
56111    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
56112    LIBS=$ac_xsave_LIBS
56113  fi
56114
56115  # Check for system-dependent libraries X programs must link with.
56116  # Do this before checking for the system-independent R6 libraries
56117  # (-lICE), since we may need -lsocket or whatever for X linking.
56118
56119  if test "$ISC" = yes; then
56120    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
56121  else
56122    # Martyn Johnson says this is needed for Ultrix, if the X
56123    # libraries were built with DECnet support.  And Karl Berry says
56124    # the Alpha needs dnet_stub (dnet does not exist).
56125    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
56126    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56127/* end confdefs.h.  */
56128
56129/* Override any GCC internal prototype to avoid an error.
56130   Use char because int might match the return type of a GCC
56131   builtin and then its argument prototype would still apply.  */
56132#ifdef __cplusplus
56133extern "C"
56134#endif
56135char XOpenDisplay ();
56136int
56137main ()
56138{
56139return XOpenDisplay ();
56140  ;
56141  return 0;
56142}
56143_ACEOF
56144if ac_fn_cxx_try_link "$LINENO"; then :
56145
56146else
56147  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
56148$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
56149if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
56150  $as_echo_n "(cached) " >&6
56151else
56152  ac_check_lib_save_LIBS=$LIBS
56153LIBS="-ldnet  $LIBS"
56154cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56155/* end confdefs.h.  */
56156
56157/* Override any GCC internal prototype to avoid an error.
56158   Use char because int might match the return type of a GCC
56159   builtin and then its argument prototype would still apply.  */
56160#ifdef __cplusplus
56161extern "C"
56162#endif
56163char dnet_ntoa ();
56164int
56165main ()
56166{
56167return dnet_ntoa ();
56168  ;
56169  return 0;
56170}
56171_ACEOF
56172if ac_fn_cxx_try_link "$LINENO"; then :
56173  ac_cv_lib_dnet_dnet_ntoa=yes
56174else
56175  ac_cv_lib_dnet_dnet_ntoa=no
56176fi
56177rm -f core conftest.err conftest.$ac_objext \
56178    conftest$ac_exeext conftest.$ac_ext
56179LIBS=$ac_check_lib_save_LIBS
56180fi
56181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
56182$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
56183if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
56184  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
56185fi
56186
56187    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
56188      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
56189$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
56190if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
56191  $as_echo_n "(cached) " >&6
56192else
56193  ac_check_lib_save_LIBS=$LIBS
56194LIBS="-ldnet_stub  $LIBS"
56195cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56196/* end confdefs.h.  */
56197
56198/* Override any GCC internal prototype to avoid an error.
56199   Use char because int might match the return type of a GCC
56200   builtin and then its argument prototype would still apply.  */
56201#ifdef __cplusplus
56202extern "C"
56203#endif
56204char dnet_ntoa ();
56205int
56206main ()
56207{
56208return dnet_ntoa ();
56209  ;
56210  return 0;
56211}
56212_ACEOF
56213if ac_fn_cxx_try_link "$LINENO"; then :
56214  ac_cv_lib_dnet_stub_dnet_ntoa=yes
56215else
56216  ac_cv_lib_dnet_stub_dnet_ntoa=no
56217fi
56218rm -f core conftest.err conftest.$ac_objext \
56219    conftest$ac_exeext conftest.$ac_ext
56220LIBS=$ac_check_lib_save_LIBS
56221fi
56222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
56223$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
56224if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
56225  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
56226fi
56227
56228    fi
56229fi
56230rm -f core conftest.err conftest.$ac_objext \
56231    conftest$ac_exeext conftest.$ac_ext
56232    LIBS="$ac_xsave_LIBS"
56233
56234    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
56235    # to get the SysV transport functions.
56236    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
56237    # needs -lnsl.
56238    # The nsl library prevents programs from opening the X display
56239    # on Irix 5.2, according to T.E. Dickey.
56240    # The functions gethostbyname, getservbyname, and inet_addr are
56241    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
56242    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
56243if test "x$ac_cv_func_gethostbyname" = xyes; then :
56244
56245fi
56246
56247    if test $ac_cv_func_gethostbyname = no; then
56248      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
56249$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
56250if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
56251  $as_echo_n "(cached) " >&6
56252else
56253  ac_check_lib_save_LIBS=$LIBS
56254LIBS="-lnsl  $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 gethostbyname ();
56265int
56266main ()
56267{
56268return gethostbyname ();
56269  ;
56270  return 0;
56271}
56272_ACEOF
56273if ac_fn_cxx_try_link "$LINENO"; then :
56274  ac_cv_lib_nsl_gethostbyname=yes
56275else
56276  ac_cv_lib_nsl_gethostbyname=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_nsl_gethostbyname" >&5
56283$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
56284if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
56285  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
56286fi
56287
56288      if test $ac_cv_lib_nsl_gethostbyname = no; then
56289	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
56290$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
56291if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
56292  $as_echo_n "(cached) " >&6
56293else
56294  ac_check_lib_save_LIBS=$LIBS
56295LIBS="-lbsd  $LIBS"
56296cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56297/* end confdefs.h.  */
56298
56299/* Override any GCC internal prototype to avoid an error.
56300   Use char because int might match the return type of a GCC
56301   builtin and then its argument prototype would still apply.  */
56302#ifdef __cplusplus
56303extern "C"
56304#endif
56305char gethostbyname ();
56306int
56307main ()
56308{
56309return gethostbyname ();
56310  ;
56311  return 0;
56312}
56313_ACEOF
56314if ac_fn_cxx_try_link "$LINENO"; then :
56315  ac_cv_lib_bsd_gethostbyname=yes
56316else
56317  ac_cv_lib_bsd_gethostbyname=no
56318fi
56319rm -f core conftest.err conftest.$ac_objext \
56320    conftest$ac_exeext conftest.$ac_ext
56321LIBS=$ac_check_lib_save_LIBS
56322fi
56323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
56324$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
56325if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
56326  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
56327fi
56328
56329      fi
56330    fi
56331
56332    # lieder@skyler.mavd.honeywell.com says without -lsocket,
56333    # socket/setsockopt and other routines are undefined under SCO ODT
56334    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
56335    # on later versions), says Simon Leinen: it contains gethostby*
56336    # variants that don't use the name server (or something).  -lsocket
56337    # must be given before -lnsl if both are needed.  We assume that
56338    # if connect needs -lnsl, so does gethostbyname.
56339    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
56340if test "x$ac_cv_func_connect" = xyes; then :
56341
56342fi
56343
56344    if test $ac_cv_func_connect = no; then
56345      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
56346$as_echo_n "checking for connect in -lsocket... " >&6; }
56347if ${ac_cv_lib_socket_connect+:} false; then :
56348  $as_echo_n "(cached) " >&6
56349else
56350  ac_check_lib_save_LIBS=$LIBS
56351LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
56352cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56353/* end confdefs.h.  */
56354
56355/* Override any GCC internal prototype to avoid an error.
56356   Use char because int might match the return type of a GCC
56357   builtin and then its argument prototype would still apply.  */
56358#ifdef __cplusplus
56359extern "C"
56360#endif
56361char connect ();
56362int
56363main ()
56364{
56365return connect ();
56366  ;
56367  return 0;
56368}
56369_ACEOF
56370if ac_fn_cxx_try_link "$LINENO"; then :
56371  ac_cv_lib_socket_connect=yes
56372else
56373  ac_cv_lib_socket_connect=no
56374fi
56375rm -f core conftest.err conftest.$ac_objext \
56376    conftest$ac_exeext conftest.$ac_ext
56377LIBS=$ac_check_lib_save_LIBS
56378fi
56379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
56380$as_echo "$ac_cv_lib_socket_connect" >&6; }
56381if test "x$ac_cv_lib_socket_connect" = xyes; then :
56382  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
56383fi
56384
56385    fi
56386
56387    # Guillermo Gomez says -lposix is necessary on A/UX.
56388    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
56389if test "x$ac_cv_func_remove" = xyes; then :
56390
56391fi
56392
56393    if test $ac_cv_func_remove = no; then
56394      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
56395$as_echo_n "checking for remove in -lposix... " >&6; }
56396if ${ac_cv_lib_posix_remove+:} false; then :
56397  $as_echo_n "(cached) " >&6
56398else
56399  ac_check_lib_save_LIBS=$LIBS
56400LIBS="-lposix  $LIBS"
56401cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56402/* end confdefs.h.  */
56403
56404/* Override any GCC internal prototype to avoid an error.
56405   Use char because int might match the return type of a GCC
56406   builtin and then its argument prototype would still apply.  */
56407#ifdef __cplusplus
56408extern "C"
56409#endif
56410char remove ();
56411int
56412main ()
56413{
56414return remove ();
56415  ;
56416  return 0;
56417}
56418_ACEOF
56419if ac_fn_cxx_try_link "$LINENO"; then :
56420  ac_cv_lib_posix_remove=yes
56421else
56422  ac_cv_lib_posix_remove=no
56423fi
56424rm -f core conftest.err conftest.$ac_objext \
56425    conftest$ac_exeext conftest.$ac_ext
56426LIBS=$ac_check_lib_save_LIBS
56427fi
56428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
56429$as_echo "$ac_cv_lib_posix_remove" >&6; }
56430if test "x$ac_cv_lib_posix_remove" = xyes; then :
56431  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
56432fi
56433
56434    fi
56435
56436    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
56437    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
56438if test "x$ac_cv_func_shmat" = xyes; then :
56439
56440fi
56441
56442    if test $ac_cv_func_shmat = no; then
56443      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
56444$as_echo_n "checking for shmat in -lipc... " >&6; }
56445if ${ac_cv_lib_ipc_shmat+:} false; then :
56446  $as_echo_n "(cached) " >&6
56447else
56448  ac_check_lib_save_LIBS=$LIBS
56449LIBS="-lipc  $LIBS"
56450cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56451/* end confdefs.h.  */
56452
56453/* Override any GCC internal prototype to avoid an error.
56454   Use char because int might match the return type of a GCC
56455   builtin and then its argument prototype would still apply.  */
56456#ifdef __cplusplus
56457extern "C"
56458#endif
56459char shmat ();
56460int
56461main ()
56462{
56463return shmat ();
56464  ;
56465  return 0;
56466}
56467_ACEOF
56468if ac_fn_cxx_try_link "$LINENO"; then :
56469  ac_cv_lib_ipc_shmat=yes
56470else
56471  ac_cv_lib_ipc_shmat=no
56472fi
56473rm -f core conftest.err conftest.$ac_objext \
56474    conftest$ac_exeext conftest.$ac_ext
56475LIBS=$ac_check_lib_save_LIBS
56476fi
56477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
56478$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
56479if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
56480  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
56481fi
56482
56483    fi
56484  fi
56485
56486  # Check for libraries that X11R6 Xt/Xaw programs need.
56487  ac_save_LDFLAGS=$LDFLAGS
56488  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
56489  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
56490  # check for ICE first), but we must link in the order -lSM -lICE or
56491  # we get undefined symbols.  So assume we have SM if we have ICE.
56492  # These have to be linked with before -lX11, unlike the other
56493  # libraries we check for below, so use a different variable.
56494  # John Interrante, Karl Berry
56495  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
56496$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
56497if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
56498  $as_echo_n "(cached) " >&6
56499else
56500  ac_check_lib_save_LIBS=$LIBS
56501LIBS="-lICE $X_EXTRA_LIBS $LIBS"
56502cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56503/* end confdefs.h.  */
56504
56505/* Override any GCC internal prototype to avoid an error.
56506   Use char because int might match the return type of a GCC
56507   builtin and then its argument prototype would still apply.  */
56508#ifdef __cplusplus
56509extern "C"
56510#endif
56511char IceConnectionNumber ();
56512int
56513main ()
56514{
56515return IceConnectionNumber ();
56516  ;
56517  return 0;
56518}
56519_ACEOF
56520if ac_fn_cxx_try_link "$LINENO"; then :
56521  ac_cv_lib_ICE_IceConnectionNumber=yes
56522else
56523  ac_cv_lib_ICE_IceConnectionNumber=no
56524fi
56525rm -f core conftest.err conftest.$ac_objext \
56526    conftest$ac_exeext conftest.$ac_ext
56527LIBS=$ac_check_lib_save_LIBS
56528fi
56529{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
56530$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
56531if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
56532  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
56533fi
56534
56535  LDFLAGS=$ac_save_LDFLAGS
56536
56537fi
56538
56539
56540    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
56541    # this doesn't make sense so we remove it.
56542    if test "x$COMPILE_TYPE" = xcross; then
56543      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
56544    fi
56545
56546    if test "x$no_x" = xyes; then
56547
56548  # Print a helpful message on how to acquire the necessary build dependency.
56549  # x11 is the help tag: freetype, cups, alsa etc
56550  MISSING_DEPENDENCY=x11
56551
56552  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56553    cygwin_help $MISSING_DEPENDENCY
56554  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56555    msys_help $MISSING_DEPENDENCY
56556  else
56557    PKGHANDLER_COMMAND=
56558
56559    case $PKGHANDLER in
56560      apt-get)
56561        apt_help     $MISSING_DEPENDENCY ;;
56562      yum)
56563        yum_help     $MISSING_DEPENDENCY ;;
56564      port)
56565        port_help    $MISSING_DEPENDENCY ;;
56566      pkgutil)
56567        pkgutil_help $MISSING_DEPENDENCY ;;
56568      pkgadd)
56569        pkgadd_help  $MISSING_DEPENDENCY ;;
56570    esac
56571
56572    if test "x$PKGHANDLER_COMMAND" != x; then
56573      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56574    fi
56575  fi
56576
56577      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
56578    fi
56579
56580    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
56581      OPENWIN_HOME="/usr/openwin"
56582      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
56583      X_LIBS="-L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
56584          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
56585    fi
56586
56587    ac_ext=c
56588ac_cpp='$CPP $CPPFLAGS'
56589ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56590ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56591ac_compiler_gnu=$ac_cv_c_compiler_gnu
56592
56593    OLD_CFLAGS="$CFLAGS"
56594    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
56595
56596    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
56597    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
56598do :
56599  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56600ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
56601          # include <X11/Xlib.h>
56602          # include <X11/Xutil.h>
56603
56604
56605"
56606if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56607  cat >>confdefs.h <<_ACEOF
56608#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56609_ACEOF
56610 X11_HEADERS_OK=yes
56611else
56612  X11_HEADERS_OK=no; break
56613fi
56614
56615done
56616
56617
56618    if test "x$X11_HEADERS_OK" = xno; then
56619
56620  # Print a helpful message on how to acquire the necessary build dependency.
56621  # x11 is the help tag: freetype, cups, alsa etc
56622  MISSING_DEPENDENCY=x11
56623
56624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56625    cygwin_help $MISSING_DEPENDENCY
56626  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56627    msys_help $MISSING_DEPENDENCY
56628  else
56629    PKGHANDLER_COMMAND=
56630
56631    case $PKGHANDLER in
56632      apt-get)
56633        apt_help     $MISSING_DEPENDENCY ;;
56634      yum)
56635        yum_help     $MISSING_DEPENDENCY ;;
56636      port)
56637        port_help    $MISSING_DEPENDENCY ;;
56638      pkgutil)
56639        pkgutil_help $MISSING_DEPENDENCY ;;
56640      pkgadd)
56641        pkgadd_help  $MISSING_DEPENDENCY ;;
56642    esac
56643
56644    if test "x$PKGHANDLER_COMMAND" != x; then
56645      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56646    fi
56647  fi
56648
56649      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
56650    fi
56651
56652    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
56653    # defined in libawt_xawt.
56654    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
56655$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
56656    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56657/* end confdefs.h.  */
56658#include <X11/extensions/Xrender.h>
56659int
56660main ()
56661{
56662XLinearGradient x;
56663  ;
56664  return 0;
56665}
56666_ACEOF
56667if ac_fn_c_try_compile "$LINENO"; then :
56668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56669$as_echo "yes" >&6; }
56670else
56671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56672$as_echo "no" >&6; }
56673         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
56674fi
56675rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
56676
56677    CFLAGS="$OLD_CFLAGS"
56678    ac_ext=cpp
56679ac_cpp='$CXXCPP $CPPFLAGS'
56680ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56681ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56682ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
56683
56684  fi # NEEDS_LIB_X11
56685
56686
56687
56688
56689
56690
56691# Check whether --with-cups was given.
56692if test "${with_cups+set}" = set; then :
56693  withval=$with_cups;
56694fi
56695
56696
56697# Check whether --with-cups-include was given.
56698if test "${with_cups_include+set}" = set; then :
56699  withval=$with_cups_include;
56700fi
56701
56702
56703  if test "x$NEEDS_LIB_CUPS" = xfalse; then
56704    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
56705        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
56706      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
56707$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
56708    fi
56709    CUPS_CFLAGS=
56710  else
56711    CUPS_FOUND=no
56712
56713    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
56714      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
56715    fi
56716
56717    if test "x${with_cups}" != x; then
56718      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56719$as_echo_n "checking for cups headers... " >&6; }
56720      if test -s "${with_cups}/include/cups/cups.h"; then
56721        CUPS_CFLAGS="-I${with_cups}/include"
56722        CUPS_FOUND=yes
56723        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56724$as_echo "$CUPS_FOUND" >&6; }
56725      else
56726        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
56727      fi
56728    fi
56729    if test "x${with_cups_include}" != x; then
56730      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56731$as_echo_n "checking for cups headers... " >&6; }
56732      if test -s "${with_cups_include}/cups/cups.h"; then
56733        CUPS_CFLAGS="-I${with_cups_include}"
56734        CUPS_FOUND=yes
56735        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56736$as_echo "$CUPS_FOUND" >&6; }
56737      else
56738        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
56739      fi
56740    fi
56741    if test "x$CUPS_FOUND" = xno; then
56742      # Are the cups headers installed in the default /usr/include location?
56743      for ac_header in cups/cups.h cups/ppd.h
56744do :
56745  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56746ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
56747if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56748  cat >>confdefs.h <<_ACEOF
56749#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56750_ACEOF
56751
56752          CUPS_FOUND=yes
56753          CUPS_CFLAGS=
56754          DEFAULT_CUPS=yes
56755
56756fi
56757
56758done
56759
56760    fi
56761    if test "x$CUPS_FOUND" = xno; then
56762
56763  # Print a helpful message on how to acquire the necessary build dependency.
56764  # cups is the help tag: freetype, cups, alsa etc
56765  MISSING_DEPENDENCY=cups
56766
56767  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56768    cygwin_help $MISSING_DEPENDENCY
56769  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56770    msys_help $MISSING_DEPENDENCY
56771  else
56772    PKGHANDLER_COMMAND=
56773
56774    case $PKGHANDLER in
56775      apt-get)
56776        apt_help     $MISSING_DEPENDENCY ;;
56777      yum)
56778        yum_help     $MISSING_DEPENDENCY ;;
56779      port)
56780        port_help    $MISSING_DEPENDENCY ;;
56781      pkgutil)
56782        pkgutil_help $MISSING_DEPENDENCY ;;
56783      pkgadd)
56784        pkgadd_help  $MISSING_DEPENDENCY ;;
56785    esac
56786
56787    if test "x$PKGHANDLER_COMMAND" != x; then
56788      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56789    fi
56790  fi
56791
56792      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
56793    fi
56794  fi
56795
56796
56797
56798
56799
56800# Check whether --with-freetype was given.
56801if test "${with_freetype+set}" = set; then :
56802  withval=$with_freetype;
56803fi
56804
56805
56806# Check whether --with-freetype-include was given.
56807if test "${with_freetype_include+set}" = set; then :
56808  withval=$with_freetype_include;
56809fi
56810
56811
56812# Check whether --with-freetype-lib was given.
56813if test "${with_freetype_lib+set}" = set; then :
56814  withval=$with_freetype_lib;
56815fi
56816
56817
56818# Check whether --with-freetype-src was given.
56819if test "${with_freetype_src+set}" = set; then :
56820  withval=$with_freetype_src;
56821fi
56822
56823  # Check whether --enable-freetype-bundling was given.
56824if test "${enable_freetype_bundling+set}" = set; then :
56825  enableval=$enable_freetype_bundling;
56826fi
56827
56828
56829  # Need to specify explicitly since it needs to be overridden on some versions of macosx
56830  FREETYPE_BASE_NAME=freetype
56831  FREETYPE_CFLAGS=
56832  FREETYPE_LIBS=
56833  FREETYPE_BUNDLE_LIB_PATH=
56834
56835  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
56836    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
56837        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
56838        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
56839        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
56840      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
56841$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
56842    fi
56843    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
56844      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
56845$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
56846    fi
56847  else
56848    # freetype is needed to build; go get it!
56849
56850    BUNDLE_FREETYPE="$enable_freetype_bundling"
56851
56852    if  test "x$with_freetype_src" != x; then
56853      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56854        # Try to build freetype if --with-freetype-src was given on Windows
56855
56856  FREETYPE_SRC_PATH="$with_freetype_src"
56857  BUILD_FREETYPE=yes
56858
56859  # Check if the freetype sources are acessible..
56860  if ! test -d $FREETYPE_SRC_PATH; then
56861    { $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
56862$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
56863    BUILD_FREETYPE=no
56864  fi
56865  # ..and contain a vc2010 project file
56866  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
56867  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
56868    { $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
56869$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
56870    BUILD_FREETYPE=no
56871  fi
56872  # Now check if configure found a version of 'msbuild.exe'
56873  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
56874    { $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
56875$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;}
56876    BUILD_FREETYPE=no
56877  fi
56878
56879  # Ready to go..
56880  if test "x$BUILD_FREETYPE" = xyes; then
56881    # msbuild requires trailing slashes for output directories
56882    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
56883    freetype_lib_path_unix="$freetype_lib_path"
56884    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
56885
56886  unix_path="$vcxproj_path"
56887  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56888    windows_path=`$CYGPATH -m "$unix_path"`
56889    vcxproj_path="$windows_path"
56890  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56891    windows_path=`cmd //c echo $unix_path`
56892    vcxproj_path="$windows_path"
56893  fi
56894
56895
56896  unix_path="$freetype_lib_path"
56897  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56898    windows_path=`$CYGPATH -m "$unix_path"`
56899    freetype_lib_path="$windows_path"
56900  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56901    windows_path=`cmd //c echo $unix_path`
56902    freetype_lib_path="$windows_path"
56903  fi
56904
56905
56906  unix_path="$freetype_obj_path"
56907  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56908    windows_path=`$CYGPATH -m "$unix_path"`
56909    freetype_obj_path="$windows_path"
56910  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56911    windows_path=`cmd //c echo $unix_path`
56912    freetype_obj_path="$windows_path"
56913  fi
56914
56915    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56916      freetype_platform=x64
56917    else
56918      freetype_platform=win32
56919    fi
56920
56921    # The original freetype project file is for VS 2010 (i.e. 'v100'),
56922    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
56923    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
56924    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
56925    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
56926$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
56927
56928    # First we try to build the freetype.dll
56929    $ECHO -e "@echo off\n"\
56930        "$MSBUILD $vcxproj_path "\
56931        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
56932        "/p:Configuration=\"Release Multithreaded\" "\
56933        "/p:Platform=$freetype_platform "\
56934        "/p:ConfigurationType=DynamicLibrary "\
56935        "/p:TargetName=freetype "\
56936        "/p:OutDir=\"$freetype_lib_path\" "\
56937        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
56938    cmd /c freetype.bat
56939
56940    if test -s "$freetype_lib_path_unix/freetype.dll"; then
56941      # If that succeeds we also build freetype.lib
56942      $ECHO -e "@echo off\n"\
56943          "$MSBUILD $vcxproj_path "\
56944          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
56945          "/p:Configuration=\"Release Multithreaded\" "\
56946          "/p:Platform=$freetype_platform "\
56947          "/p:ConfigurationType=StaticLibrary "\
56948          "/p:TargetName=freetype "\
56949          "/p:OutDir=\"$freetype_lib_path\" "\
56950          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
56951      cmd /c freetype.bat
56952
56953      if test -s "$freetype_lib_path_unix/freetype.lib"; then
56954        # Once we build both, lib and dll, set freetype lib and include path appropriately
56955        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
56956        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
56957        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
56958$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
56959      else
56960        BUILD_FREETYPE=no
56961      fi
56962    else
56963      BUILD_FREETYPE=no
56964    fi
56965  fi
56966
56967        if test "x$BUILD_FREETYPE" = xyes; then
56968          # Okay, we built it. Check that it works.
56969
56970  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56971  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
56972  METHOD="--with-freetype-src"
56973
56974  # Let's start with an optimistic view of the world :-)
56975  FOUND_FREETYPE=yes
56976
56977  # First look for the canonical freetype main include file ft2build.h.
56978  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56979    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
56980    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
56981    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56982      # Fail.
56983      FOUND_FREETYPE=no
56984    fi
56985  fi
56986
56987  if test "x$FOUND_FREETYPE" = xyes; then
56988    # Include file found, let's continue the sanity check.
56989    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
56990$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
56991
56992    # Reset to default value
56993    FREETYPE_BASE_NAME=freetype
56994    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56995    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
56996      if test "x$OPENJDK_TARGET_OS" = xmacosx \
56997          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
56998        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
56999        # for the .6 version explicitly.
57000        FREETYPE_BASE_NAME=freetype.6
57001        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57002        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57003$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57004      else
57005        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57006$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57007        FOUND_FREETYPE=no
57008      fi
57009    else
57010      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57011        # On Windows, we will need both .lib and .dll file.
57012        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57013          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57014$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57015          FOUND_FREETYPE=no
57016        fi
57017      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57018          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57019        # Found lib in isa dir, use that instead.
57020        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57021        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57022$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57023      fi
57024    fi
57025  fi
57026
57027  if test "x$FOUND_FREETYPE" = xyes; then
57028
57029  # Only process if variable expands to non-empty
57030
57031  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57032    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57033
57034  # Input might be given as Windows format, start by converting to
57035  # unix format.
57036  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57037  new_path=`$CYGPATH -u "$path"`
57038
57039  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57040  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57041  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57042  # "foo.exe" is OK but "foo" is an error.
57043  #
57044  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57045  # It is also a way to make sure we got the proper file name for the real test later on.
57046  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57047  if test "x$test_shortpath" = x; then
57048    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57049$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57050    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57051  fi
57052
57053  # Call helper function which possibly converts this using DOS-style short mode.
57054  # If so, the updated path is stored in $new_path.
57055
57056  input_path="$new_path"
57057  # Check if we need to convert this using DOS-style short mode. If the path
57058  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57059  # take no chances and rewrite it.
57060  # Note: m4 eats our [], so we need to use [ and ] instead.
57061  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57062  if test "x$has_forbidden_chars" != x; then
57063    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57064    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57065    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57066    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57067      # Going to short mode and back again did indeed matter. Since short mode is
57068      # case insensitive, let's make it lowercase to improve readability.
57069      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57070      # Now convert it back to Unix-style (cygpath)
57071      input_path=`$CYGPATH -u "$shortmode_path"`
57072      new_path="$input_path"
57073    fi
57074  fi
57075
57076  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57077  if test "x$test_cygdrive_prefix" = x; then
57078    # As a simple fix, exclude /usr/bin since it's not a real path.
57079    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57080      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57081      # a path prefixed by /cygdrive for fixpath to work.
57082      new_path="$CYGWIN_ROOT_PATH$input_path"
57083    fi
57084  fi
57085
57086
57087  if test "x$path" != "x$new_path"; then
57088    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57089    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57090$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57091  fi
57092
57093    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57094
57095  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57096  has_colon=`$ECHO $path | $GREP ^.:`
57097  new_path="$path"
57098  if test "x$has_colon" = x; then
57099    # Not in mixed or Windows style, start by that.
57100    new_path=`cmd //c echo $path`
57101  fi
57102
57103
57104  input_path="$new_path"
57105  # Check if we need to convert this using DOS-style short mode. If the path
57106  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57107  # take no chances and rewrite it.
57108  # Note: m4 eats our [], so we need to use [ and ] instead.
57109  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57110  if test "x$has_forbidden_chars" != x; then
57111    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57112    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57113  fi
57114
57115
57116  windows_path="$new_path"
57117  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57118    unix_path=`$CYGPATH -u "$windows_path"`
57119    new_path="$unix_path"
57120  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57121    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57122    new_path="$unix_path"
57123  fi
57124
57125  if test "x$path" != "x$new_path"; then
57126    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57127    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57128$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57129  fi
57130
57131  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57132  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57133
57134    else
57135      # We're on a unix platform. Hooray! :)
57136      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57137      has_space=`$ECHO "$path" | $GREP " "`
57138      if test "x$has_space" != x; then
57139        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57140$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57141        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57142      fi
57143
57144      # Use eval to expand a potential ~
57145      eval path="$path"
57146      if test ! -f "$path" && test ! -d "$path"; then
57147        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57148      fi
57149
57150      if test -d "$path"; then
57151        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57152      else
57153        dir="`$DIRNAME "$path"`"
57154        base="`$BASENAME "$path"`"
57155        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57156      fi
57157    fi
57158  fi
57159
57160
57161  # Only process if variable expands to non-empty
57162
57163  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57164    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57165
57166  # Input might be given as Windows format, start by converting to
57167  # unix format.
57168  path="$POTENTIAL_FREETYPE_LIB_PATH"
57169  new_path=`$CYGPATH -u "$path"`
57170
57171  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57172  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57173  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57174  # "foo.exe" is OK but "foo" is an error.
57175  #
57176  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57177  # It is also a way to make sure we got the proper file name for the real test later on.
57178  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57179  if test "x$test_shortpath" = x; then
57180    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57181$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57182    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57183  fi
57184
57185  # Call helper function which possibly converts this using DOS-style short mode.
57186  # If so, the updated path is stored in $new_path.
57187
57188  input_path="$new_path"
57189  # Check if we need to convert this using DOS-style short mode. If the path
57190  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57191  # take no chances and rewrite it.
57192  # Note: m4 eats our [], so we need to use [ and ] instead.
57193  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57194  if test "x$has_forbidden_chars" != x; then
57195    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57196    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57197    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57198    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57199      # Going to short mode and back again did indeed matter. Since short mode is
57200      # case insensitive, let's make it lowercase to improve readability.
57201      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57202      # Now convert it back to Unix-style (cygpath)
57203      input_path=`$CYGPATH -u "$shortmode_path"`
57204      new_path="$input_path"
57205    fi
57206  fi
57207
57208  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57209  if test "x$test_cygdrive_prefix" = x; then
57210    # As a simple fix, exclude /usr/bin since it's not a real path.
57211    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57212      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57213      # a path prefixed by /cygdrive for fixpath to work.
57214      new_path="$CYGWIN_ROOT_PATH$input_path"
57215    fi
57216  fi
57217
57218
57219  if test "x$path" != "x$new_path"; then
57220    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57221    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57222$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57223  fi
57224
57225    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57226
57227  path="$POTENTIAL_FREETYPE_LIB_PATH"
57228  has_colon=`$ECHO $path | $GREP ^.:`
57229  new_path="$path"
57230  if test "x$has_colon" = x; then
57231    # Not in mixed or Windows style, start by that.
57232    new_path=`cmd //c echo $path`
57233  fi
57234
57235
57236  input_path="$new_path"
57237  # Check if we need to convert this using DOS-style short mode. If the path
57238  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57239  # take no chances and rewrite it.
57240  # Note: m4 eats our [], so we need to use [ and ] instead.
57241  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57242  if test "x$has_forbidden_chars" != x; then
57243    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57244    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57245  fi
57246
57247
57248  windows_path="$new_path"
57249  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57250    unix_path=`$CYGPATH -u "$windows_path"`
57251    new_path="$unix_path"
57252  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57253    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57254    new_path="$unix_path"
57255  fi
57256
57257  if test "x$path" != "x$new_path"; then
57258    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57259    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57260$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57261  fi
57262
57263  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57264  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57265
57266    else
57267      # We're on a unix platform. Hooray! :)
57268      path="$POTENTIAL_FREETYPE_LIB_PATH"
57269      has_space=`$ECHO "$path" | $GREP " "`
57270      if test "x$has_space" != x; then
57271        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57272$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57273        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57274      fi
57275
57276      # Use eval to expand a potential ~
57277      eval path="$path"
57278      if test ! -f "$path" && test ! -d "$path"; then
57279        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57280      fi
57281
57282      if test -d "$path"; then
57283        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57284      else
57285        dir="`$DIRNAME "$path"`"
57286        base="`$BASENAME "$path"`"
57287        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57288      fi
57289    fi
57290  fi
57291
57292
57293    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57294    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57295$as_echo_n "checking for freetype includes... " >&6; }
57296    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57297$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57298    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57299    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57300$as_echo_n "checking for freetype libraries... " >&6; }
57301    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57302$as_echo "$FREETYPE_LIB_PATH" >&6; }
57303  fi
57304
57305          if test "x$FOUND_FREETYPE" != xyes; then
57306            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
57307          fi
57308        else
57309          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
57310$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
57311          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
57312        fi
57313      else
57314        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
57315$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
57316      fi
57317    fi
57318
57319    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
57320      # User has specified settings
57321
57322      if test "x$BUNDLE_FREETYPE" = x; then
57323        # If not specified, default is to bundle freetype
57324        BUNDLE_FREETYPE=yes
57325      fi
57326
57327      if test "x$with_freetype" != x; then
57328        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
57329        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
57330      fi
57331
57332      # Allow --with-freetype-lib and --with-freetype-include to override
57333      if test "x$with_freetype_include" != x; then
57334        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
57335      fi
57336      if test "x$with_freetype_lib" != x; then
57337        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
57338      fi
57339
57340      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57341        # Okay, we got it. Check that it works.
57342
57343  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57344  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57345  METHOD="--with-freetype"
57346
57347  # Let's start with an optimistic view of the world :-)
57348  FOUND_FREETYPE=yes
57349
57350  # First look for the canonical freetype main include file ft2build.h.
57351  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57352    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57353    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57354    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57355      # Fail.
57356      FOUND_FREETYPE=no
57357    fi
57358  fi
57359
57360  if test "x$FOUND_FREETYPE" = xyes; then
57361    # Include file found, let's continue the sanity check.
57362    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57363$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57364
57365    # Reset to default value
57366    FREETYPE_BASE_NAME=freetype
57367    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57368    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57369      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57370          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57371        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57372        # for the .6 version explicitly.
57373        FREETYPE_BASE_NAME=freetype.6
57374        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57375        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57376$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57377      else
57378        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57379$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57380        FOUND_FREETYPE=no
57381      fi
57382    else
57383      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57384        # On Windows, we will need both .lib and .dll file.
57385        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57386          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57387$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57388          FOUND_FREETYPE=no
57389        fi
57390      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57391          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57392        # Found lib in isa dir, use that instead.
57393        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57394        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57395$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57396      fi
57397    fi
57398  fi
57399
57400  if test "x$FOUND_FREETYPE" = xyes; then
57401
57402  # Only process if variable expands to non-empty
57403
57404  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57405    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57406
57407  # Input might be given as Windows format, start by converting to
57408  # unix format.
57409  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57410  new_path=`$CYGPATH -u "$path"`
57411
57412  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57413  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57414  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57415  # "foo.exe" is OK but "foo" is an error.
57416  #
57417  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57418  # It is also a way to make sure we got the proper file name for the real test later on.
57419  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57420  if test "x$test_shortpath" = x; then
57421    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57422$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57423    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57424  fi
57425
57426  # Call helper function which possibly converts this using DOS-style short mode.
57427  # If so, the updated path is stored in $new_path.
57428
57429  input_path="$new_path"
57430  # Check if we need to convert this using DOS-style short mode. If the path
57431  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57432  # take no chances and rewrite it.
57433  # Note: m4 eats our [], so we need to use [ and ] instead.
57434  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57435  if test "x$has_forbidden_chars" != x; then
57436    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57437    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57438    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57439    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57440      # Going to short mode and back again did indeed matter. Since short mode is
57441      # case insensitive, let's make it lowercase to improve readability.
57442      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57443      # Now convert it back to Unix-style (cygpath)
57444      input_path=`$CYGPATH -u "$shortmode_path"`
57445      new_path="$input_path"
57446    fi
57447  fi
57448
57449  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57450  if test "x$test_cygdrive_prefix" = x; then
57451    # As a simple fix, exclude /usr/bin since it's not a real path.
57452    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57453      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57454      # a path prefixed by /cygdrive for fixpath to work.
57455      new_path="$CYGWIN_ROOT_PATH$input_path"
57456    fi
57457  fi
57458
57459
57460  if test "x$path" != "x$new_path"; then
57461    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57462    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57463$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57464  fi
57465
57466    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57467
57468  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57469  has_colon=`$ECHO $path | $GREP ^.:`
57470  new_path="$path"
57471  if test "x$has_colon" = x; then
57472    # Not in mixed or Windows style, start by that.
57473    new_path=`cmd //c echo $path`
57474  fi
57475
57476
57477  input_path="$new_path"
57478  # Check if we need to convert this using DOS-style short mode. If the path
57479  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57480  # take no chances and rewrite it.
57481  # Note: m4 eats our [], so we need to use [ and ] instead.
57482  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57483  if test "x$has_forbidden_chars" != x; then
57484    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57485    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57486  fi
57487
57488
57489  windows_path="$new_path"
57490  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57491    unix_path=`$CYGPATH -u "$windows_path"`
57492    new_path="$unix_path"
57493  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57494    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57495    new_path="$unix_path"
57496  fi
57497
57498  if test "x$path" != "x$new_path"; then
57499    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57500    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57501$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57502  fi
57503
57504  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57505  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57506
57507    else
57508      # We're on a unix platform. Hooray! :)
57509      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57510      has_space=`$ECHO "$path" | $GREP " "`
57511      if test "x$has_space" != x; then
57512        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57513$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57514        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57515      fi
57516
57517      # Use eval to expand a potential ~
57518      eval path="$path"
57519      if test ! -f "$path" && test ! -d "$path"; then
57520        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57521      fi
57522
57523      if test -d "$path"; then
57524        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57525      else
57526        dir="`$DIRNAME "$path"`"
57527        base="`$BASENAME "$path"`"
57528        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57529      fi
57530    fi
57531  fi
57532
57533
57534  # Only process if variable expands to non-empty
57535
57536  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57537    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57538
57539  # Input might be given as Windows format, start by converting to
57540  # unix format.
57541  path="$POTENTIAL_FREETYPE_LIB_PATH"
57542  new_path=`$CYGPATH -u "$path"`
57543
57544  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57545  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57546  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57547  # "foo.exe" is OK but "foo" is an error.
57548  #
57549  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57550  # It is also a way to make sure we got the proper file name for the real test later on.
57551  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57552  if test "x$test_shortpath" = x; then
57553    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57554$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57555    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57556  fi
57557
57558  # Call helper function which possibly converts this using DOS-style short mode.
57559  # If so, the updated path is stored in $new_path.
57560
57561  input_path="$new_path"
57562  # Check if we need to convert this using DOS-style short mode. If the path
57563  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57564  # take no chances and rewrite it.
57565  # Note: m4 eats our [], so we need to use [ and ] instead.
57566  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57567  if test "x$has_forbidden_chars" != x; then
57568    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57569    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57570    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57571    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57572      # Going to short mode and back again did indeed matter. Since short mode is
57573      # case insensitive, let's make it lowercase to improve readability.
57574      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57575      # Now convert it back to Unix-style (cygpath)
57576      input_path=`$CYGPATH -u "$shortmode_path"`
57577      new_path="$input_path"
57578    fi
57579  fi
57580
57581  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57582  if test "x$test_cygdrive_prefix" = x; then
57583    # As a simple fix, exclude /usr/bin since it's not a real path.
57584    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57585      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57586      # a path prefixed by /cygdrive for fixpath to work.
57587      new_path="$CYGWIN_ROOT_PATH$input_path"
57588    fi
57589  fi
57590
57591
57592  if test "x$path" != "x$new_path"; then
57593    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57594    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57595$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57596  fi
57597
57598    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57599
57600  path="$POTENTIAL_FREETYPE_LIB_PATH"
57601  has_colon=`$ECHO $path | $GREP ^.:`
57602  new_path="$path"
57603  if test "x$has_colon" = x; then
57604    # Not in mixed or Windows style, start by that.
57605    new_path=`cmd //c echo $path`
57606  fi
57607
57608
57609  input_path="$new_path"
57610  # Check if we need to convert this using DOS-style short mode. If the path
57611  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57612  # take no chances and rewrite it.
57613  # Note: m4 eats our [], so we need to use [ and ] instead.
57614  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57615  if test "x$has_forbidden_chars" != x; then
57616    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57617    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57618  fi
57619
57620
57621  windows_path="$new_path"
57622  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57623    unix_path=`$CYGPATH -u "$windows_path"`
57624    new_path="$unix_path"
57625  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57626    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57627    new_path="$unix_path"
57628  fi
57629
57630  if test "x$path" != "x$new_path"; then
57631    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57632    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57633$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57634  fi
57635
57636  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57637  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57638
57639    else
57640      # We're on a unix platform. Hooray! :)
57641      path="$POTENTIAL_FREETYPE_LIB_PATH"
57642      has_space=`$ECHO "$path" | $GREP " "`
57643      if test "x$has_space" != x; then
57644        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57645$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57646        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57647      fi
57648
57649      # Use eval to expand a potential ~
57650      eval path="$path"
57651      if test ! -f "$path" && test ! -d "$path"; then
57652        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57653      fi
57654
57655      if test -d "$path"; then
57656        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57657      else
57658        dir="`$DIRNAME "$path"`"
57659        base="`$BASENAME "$path"`"
57660        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57661      fi
57662    fi
57663  fi
57664
57665
57666    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57667    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57668$as_echo_n "checking for freetype includes... " >&6; }
57669    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57670$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57671    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57672    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57673$as_echo_n "checking for freetype libraries... " >&6; }
57674    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57675$as_echo "$FREETYPE_LIB_PATH" >&6; }
57676  fi
57677
57678        if test "x$FOUND_FREETYPE" != xyes; then
57679          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
57680        fi
57681      else
57682        # User specified only one of lib or include. This is an error.
57683        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
57684          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
57685$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
57686          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57687        else
57688          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
57689$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
57690          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57691        fi
57692      fi
57693    else
57694      # User did not specify settings, but we need freetype. Try to locate it.
57695
57696      if test "x$BUNDLE_FREETYPE" = x; then
57697        # If not specified, default is to bundle freetype only on windows
57698        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57699          BUNDLE_FREETYPE=yes
57700        else
57701          BUNDLE_FREETYPE=no
57702        fi
57703      fi
57704
57705      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
57706      if test "x$SYSROOT" = x; then
57707        if test "x$FOUND_FREETYPE" != xyes; then
57708          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
57709          if test "x$PKG_CONFIG" != x; then
57710
57711pkg_failed=no
57712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
57713$as_echo_n "checking for FREETYPE... " >&6; }
57714
57715if test -n "$FREETYPE_CFLAGS"; then
57716    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
57717 elif test -n "$PKG_CONFIG"; then
57718    if test -n "$PKG_CONFIG" && \
57719    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57720  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57721  ac_status=$?
57722  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57723  test $ac_status = 0; }; then
57724  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
57725else
57726  pkg_failed=yes
57727fi
57728 else
57729    pkg_failed=untried
57730fi
57731if test -n "$FREETYPE_LIBS"; then
57732    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
57733 elif test -n "$PKG_CONFIG"; then
57734    if test -n "$PKG_CONFIG" && \
57735    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57736  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57737  ac_status=$?
57738  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57739  test $ac_status = 0; }; then
57740  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
57741else
57742  pkg_failed=yes
57743fi
57744 else
57745    pkg_failed=untried
57746fi
57747
57748
57749
57750if test $pkg_failed = yes; then
57751
57752if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
57753        _pkg_short_errors_supported=yes
57754else
57755        _pkg_short_errors_supported=no
57756fi
57757        if test $_pkg_short_errors_supported = yes; then
57758	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
57759        else
57760	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
57761        fi
57762	# Put the nasty error message in config.log where it belongs
57763	echo "$FREETYPE_PKG_ERRORS" >&5
57764
57765	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57766$as_echo "no" >&6; }
57767                FOUND_FREETYPE=no
57768elif test $pkg_failed = untried; then
57769	FOUND_FREETYPE=no
57770else
57771	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
57772	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
57773        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57774$as_echo "yes" >&6; }
57775	FOUND_FREETYPE=yes
57776fi
57777            if test "x$FOUND_FREETYPE" = xyes; then
57778              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
57779              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
57780              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
57781              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
57782                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
57783              fi
57784              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
57785              if test "x$BUNDLE_FREETYPE" = xyes; then
57786                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
57787$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
57788                FOUND_FREETYPE=no
57789              else
57790                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
57791$as_echo_n "checking for freetype... " >&6; }
57792                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
57793$as_echo "yes (using pkg-config)" >&6; }
57794              fi
57795            fi
57796          fi
57797        fi
57798      fi
57799
57800      if test "x$FOUND_FREETYPE" != xyes; then
57801        # Check in well-known locations
57802        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57803          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
57804
57805  windows_path="$FREETYPE_BASE_DIR"
57806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57807    unix_path=`$CYGPATH -u "$windows_path"`
57808    FREETYPE_BASE_DIR="$unix_path"
57809  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57810    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57811    FREETYPE_BASE_DIR="$unix_path"
57812  fi
57813
57814
57815  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
57816  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
57817  METHOD="well-known location"
57818
57819  # Let's start with an optimistic view of the world :-)
57820  FOUND_FREETYPE=yes
57821
57822  # First look for the canonical freetype main include file ft2build.h.
57823  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57824    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57825    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57826    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57827      # Fail.
57828      FOUND_FREETYPE=no
57829    fi
57830  fi
57831
57832  if test "x$FOUND_FREETYPE" = xyes; then
57833    # Include file found, let's continue the sanity check.
57834    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57835$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57836
57837    # Reset to default value
57838    FREETYPE_BASE_NAME=freetype
57839    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57840    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57841      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57842          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57843        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57844        # for the .6 version explicitly.
57845        FREETYPE_BASE_NAME=freetype.6
57846        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57847        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57848$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57849      else
57850        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57851$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57852        FOUND_FREETYPE=no
57853      fi
57854    else
57855      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57856        # On Windows, we will need both .lib and .dll file.
57857        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57858          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57859$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57860          FOUND_FREETYPE=no
57861        fi
57862      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57863          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57864        # Found lib in isa dir, use that instead.
57865        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57866        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57867$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57868      fi
57869    fi
57870  fi
57871
57872  if test "x$FOUND_FREETYPE" = xyes; then
57873
57874  # Only process if variable expands to non-empty
57875
57876  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57877    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57878
57879  # Input might be given as Windows format, start by converting to
57880  # unix format.
57881  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57882  new_path=`$CYGPATH -u "$path"`
57883
57884  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57885  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57886  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57887  # "foo.exe" is OK but "foo" is an error.
57888  #
57889  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57890  # It is also a way to make sure we got the proper file name for the real test later on.
57891  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57892  if test "x$test_shortpath" = x; then
57893    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57894$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57895    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57896  fi
57897
57898  # Call helper function which possibly converts this using DOS-style short mode.
57899  # If so, the updated path is stored in $new_path.
57900
57901  input_path="$new_path"
57902  # Check if we need to convert this using DOS-style short mode. If the path
57903  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57904  # take no chances and rewrite it.
57905  # Note: m4 eats our [], so we need to use [ and ] instead.
57906  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57907  if test "x$has_forbidden_chars" != x; then
57908    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57909    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57910    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57911    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57912      # Going to short mode and back again did indeed matter. Since short mode is
57913      # case insensitive, let's make it lowercase to improve readability.
57914      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57915      # Now convert it back to Unix-style (cygpath)
57916      input_path=`$CYGPATH -u "$shortmode_path"`
57917      new_path="$input_path"
57918    fi
57919  fi
57920
57921  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57922  if test "x$test_cygdrive_prefix" = x; then
57923    # As a simple fix, exclude /usr/bin since it's not a real path.
57924    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57925      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57926      # a path prefixed by /cygdrive for fixpath to work.
57927      new_path="$CYGWIN_ROOT_PATH$input_path"
57928    fi
57929  fi
57930
57931
57932  if test "x$path" != "x$new_path"; then
57933    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57934    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57935$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57936  fi
57937
57938    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57939
57940  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57941  has_colon=`$ECHO $path | $GREP ^.:`
57942  new_path="$path"
57943  if test "x$has_colon" = x; then
57944    # Not in mixed or Windows style, start by that.
57945    new_path=`cmd //c echo $path`
57946  fi
57947
57948
57949  input_path="$new_path"
57950  # Check if we need to convert this using DOS-style short mode. If the path
57951  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57952  # take no chances and rewrite it.
57953  # Note: m4 eats our [], so we need to use [ and ] instead.
57954  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57955  if test "x$has_forbidden_chars" != x; then
57956    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57957    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57958  fi
57959
57960
57961  windows_path="$new_path"
57962  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57963    unix_path=`$CYGPATH -u "$windows_path"`
57964    new_path="$unix_path"
57965  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57966    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57967    new_path="$unix_path"
57968  fi
57969
57970  if test "x$path" != "x$new_path"; then
57971    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57972    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57973$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57974  fi
57975
57976  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57977  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57978
57979    else
57980      # We're on a unix platform. Hooray! :)
57981      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57982      has_space=`$ECHO "$path" | $GREP " "`
57983      if test "x$has_space" != x; then
57984        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57985$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57986        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57987      fi
57988
57989      # Use eval to expand a potential ~
57990      eval path="$path"
57991      if test ! -f "$path" && test ! -d "$path"; then
57992        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57993      fi
57994
57995      if test -d "$path"; then
57996        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57997      else
57998        dir="`$DIRNAME "$path"`"
57999        base="`$BASENAME "$path"`"
58000        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58001      fi
58002    fi
58003  fi
58004
58005
58006  # Only process if variable expands to non-empty
58007
58008  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58009    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58010
58011  # Input might be given as Windows format, start by converting to
58012  # unix format.
58013  path="$POTENTIAL_FREETYPE_LIB_PATH"
58014  new_path=`$CYGPATH -u "$path"`
58015
58016  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58017  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58018  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58019  # "foo.exe" is OK but "foo" is an error.
58020  #
58021  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58022  # It is also a way to make sure we got the proper file name for the real test later on.
58023  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58024  if test "x$test_shortpath" = x; then
58025    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58026$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58027    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58028  fi
58029
58030  # Call helper function which possibly converts this using DOS-style short mode.
58031  # If so, the updated path is stored in $new_path.
58032
58033  input_path="$new_path"
58034  # Check if we need to convert this using DOS-style short mode. If the path
58035  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58036  # take no chances and rewrite it.
58037  # Note: m4 eats our [], so we need to use [ and ] instead.
58038  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58039  if test "x$has_forbidden_chars" != x; then
58040    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58041    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58042    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58043    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58044      # Going to short mode and back again did indeed matter. Since short mode is
58045      # case insensitive, let's make it lowercase to improve readability.
58046      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58047      # Now convert it back to Unix-style (cygpath)
58048      input_path=`$CYGPATH -u "$shortmode_path"`
58049      new_path="$input_path"
58050    fi
58051  fi
58052
58053  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58054  if test "x$test_cygdrive_prefix" = x; then
58055    # As a simple fix, exclude /usr/bin since it's not a real path.
58056    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58057      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58058      # a path prefixed by /cygdrive for fixpath to work.
58059      new_path="$CYGWIN_ROOT_PATH$input_path"
58060    fi
58061  fi
58062
58063
58064  if test "x$path" != "x$new_path"; then
58065    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58066    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58067$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58068  fi
58069
58070    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58071
58072  path="$POTENTIAL_FREETYPE_LIB_PATH"
58073  has_colon=`$ECHO $path | $GREP ^.:`
58074  new_path="$path"
58075  if test "x$has_colon" = x; then
58076    # Not in mixed or Windows style, start by that.
58077    new_path=`cmd //c echo $path`
58078  fi
58079
58080
58081  input_path="$new_path"
58082  # Check if we need to convert this using DOS-style short mode. If the path
58083  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58084  # take no chances and rewrite it.
58085  # Note: m4 eats our [], so we need to use [ and ] instead.
58086  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58087  if test "x$has_forbidden_chars" != x; then
58088    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58089    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58090  fi
58091
58092
58093  windows_path="$new_path"
58094  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58095    unix_path=`$CYGPATH -u "$windows_path"`
58096    new_path="$unix_path"
58097  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58098    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58099    new_path="$unix_path"
58100  fi
58101
58102  if test "x$path" != "x$new_path"; then
58103    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58104    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58105$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58106  fi
58107
58108  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58109  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58110
58111    else
58112      # We're on a unix platform. Hooray! :)
58113      path="$POTENTIAL_FREETYPE_LIB_PATH"
58114      has_space=`$ECHO "$path" | $GREP " "`
58115      if test "x$has_space" != x; then
58116        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58117$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58118        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58119      fi
58120
58121      # Use eval to expand a potential ~
58122      eval path="$path"
58123      if test ! -f "$path" && test ! -d "$path"; then
58124        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58125      fi
58126
58127      if test -d "$path"; then
58128        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58129      else
58130        dir="`$DIRNAME "$path"`"
58131        base="`$BASENAME "$path"`"
58132        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58133      fi
58134    fi
58135  fi
58136
58137
58138    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58139    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58140$as_echo_n "checking for freetype includes... " >&6; }
58141    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58142$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58143    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58144    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58145$as_echo_n "checking for freetype libraries... " >&6; }
58146    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58147$as_echo "$FREETYPE_LIB_PATH" >&6; }
58148  fi
58149
58150          if test "x$FOUND_FREETYPE" != xyes; then
58151            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
58152
58153  windows_path="$FREETYPE_BASE_DIR"
58154  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58155    unix_path=`$CYGPATH -u "$windows_path"`
58156    FREETYPE_BASE_DIR="$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    FREETYPE_BASE_DIR="$unix_path"
58160  fi
58161
58162
58163  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58164  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58165  METHOD="well-known location"
58166
58167  # Let's start with an optimistic view of the world :-)
58168  FOUND_FREETYPE=yes
58169
58170  # First look for the canonical freetype main include file ft2build.h.
58171  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58172    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58173    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58174    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58175      # Fail.
58176      FOUND_FREETYPE=no
58177    fi
58178  fi
58179
58180  if test "x$FOUND_FREETYPE" = xyes; then
58181    # Include file found, let's continue the sanity check.
58182    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58183$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58184
58185    # Reset to default value
58186    FREETYPE_BASE_NAME=freetype
58187    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58188    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58189      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58190          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58191        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58192        # for the .6 version explicitly.
58193        FREETYPE_BASE_NAME=freetype.6
58194        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58195        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58196$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58197      else
58198        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58199$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58200        FOUND_FREETYPE=no
58201      fi
58202    else
58203      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58204        # On Windows, we will need both .lib and .dll file.
58205        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58206          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58207$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58208          FOUND_FREETYPE=no
58209        fi
58210      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58211          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58212        # Found lib in isa dir, use that instead.
58213        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58214        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58215$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58216      fi
58217    fi
58218  fi
58219
58220  if test "x$FOUND_FREETYPE" = xyes; then
58221
58222  # Only process if variable expands to non-empty
58223
58224  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58225    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58226
58227  # Input might be given as Windows format, start by converting to
58228  # unix format.
58229  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58230  new_path=`$CYGPATH -u "$path"`
58231
58232  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58233  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58234  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58235  # "foo.exe" is OK but "foo" is an error.
58236  #
58237  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58238  # It is also a way to make sure we got the proper file name for the real test later on.
58239  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58240  if test "x$test_shortpath" = x; then
58241    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58242$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58243    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58244  fi
58245
58246  # Call helper function which possibly converts this using DOS-style short mode.
58247  # If so, the updated path is stored in $new_path.
58248
58249  input_path="$new_path"
58250  # Check if we need to convert this using DOS-style short mode. If the path
58251  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58252  # take no chances and rewrite it.
58253  # Note: m4 eats our [], so we need to use [ and ] instead.
58254  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58255  if test "x$has_forbidden_chars" != x; then
58256    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58257    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58258    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58259    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58260      # Going to short mode and back again did indeed matter. Since short mode is
58261      # case insensitive, let's make it lowercase to improve readability.
58262      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58263      # Now convert it back to Unix-style (cygpath)
58264      input_path=`$CYGPATH -u "$shortmode_path"`
58265      new_path="$input_path"
58266    fi
58267  fi
58268
58269  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58270  if test "x$test_cygdrive_prefix" = x; then
58271    # As a simple fix, exclude /usr/bin since it's not a real path.
58272    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58273      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58274      # a path prefixed by /cygdrive for fixpath to work.
58275      new_path="$CYGWIN_ROOT_PATH$input_path"
58276    fi
58277  fi
58278
58279
58280  if test "x$path" != "x$new_path"; then
58281    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58282    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58283$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58284  fi
58285
58286    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58287
58288  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58289  has_colon=`$ECHO $path | $GREP ^.:`
58290  new_path="$path"
58291  if test "x$has_colon" = x; then
58292    # Not in mixed or Windows style, start by that.
58293    new_path=`cmd //c echo $path`
58294  fi
58295
58296
58297  input_path="$new_path"
58298  # Check if we need to convert this using DOS-style short mode. If the path
58299  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58300  # take no chances and rewrite it.
58301  # Note: m4 eats our [], so we need to use [ and ] instead.
58302  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58303  if test "x$has_forbidden_chars" != x; then
58304    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58305    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58306  fi
58307
58308
58309  windows_path="$new_path"
58310  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58311    unix_path=`$CYGPATH -u "$windows_path"`
58312    new_path="$unix_path"
58313  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58314    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58315    new_path="$unix_path"
58316  fi
58317
58318  if test "x$path" != "x$new_path"; then
58319    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58320    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58321$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58322  fi
58323
58324  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58325  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58326
58327    else
58328      # We're on a unix platform. Hooray! :)
58329      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58330      has_space=`$ECHO "$path" | $GREP " "`
58331      if test "x$has_space" != x; then
58332        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58333$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58334        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58335      fi
58336
58337      # Use eval to expand a potential ~
58338      eval path="$path"
58339      if test ! -f "$path" && test ! -d "$path"; then
58340        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58341      fi
58342
58343      if test -d "$path"; then
58344        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58345      else
58346        dir="`$DIRNAME "$path"`"
58347        base="`$BASENAME "$path"`"
58348        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58349      fi
58350    fi
58351  fi
58352
58353
58354  # Only process if variable expands to non-empty
58355
58356  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58357    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58358
58359  # Input might be given as Windows format, start by converting to
58360  # unix format.
58361  path="$POTENTIAL_FREETYPE_LIB_PATH"
58362  new_path=`$CYGPATH -u "$path"`
58363
58364  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58365  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58366  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58367  # "foo.exe" is OK but "foo" is an error.
58368  #
58369  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58370  # It is also a way to make sure we got the proper file name for the real test later on.
58371  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58372  if test "x$test_shortpath" = x; then
58373    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58374$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58375    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58376  fi
58377
58378  # Call helper function which possibly converts this using DOS-style short mode.
58379  # If so, the updated path is stored in $new_path.
58380
58381  input_path="$new_path"
58382  # Check if we need to convert this using DOS-style short mode. If the path
58383  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58384  # take no chances and rewrite it.
58385  # Note: m4 eats our [], so we need to use [ and ] instead.
58386  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58387  if test "x$has_forbidden_chars" != x; then
58388    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58389    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58390    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58391    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58392      # Going to short mode and back again did indeed matter. Since short mode is
58393      # case insensitive, let's make it lowercase to improve readability.
58394      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58395      # Now convert it back to Unix-style (cygpath)
58396      input_path=`$CYGPATH -u "$shortmode_path"`
58397      new_path="$input_path"
58398    fi
58399  fi
58400
58401  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58402  if test "x$test_cygdrive_prefix" = x; then
58403    # As a simple fix, exclude /usr/bin since it's not a real path.
58404    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58405      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58406      # a path prefixed by /cygdrive for fixpath to work.
58407      new_path="$CYGWIN_ROOT_PATH$input_path"
58408    fi
58409  fi
58410
58411
58412  if test "x$path" != "x$new_path"; then
58413    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58414    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58415$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58416  fi
58417
58418    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58419
58420  path="$POTENTIAL_FREETYPE_LIB_PATH"
58421  has_colon=`$ECHO $path | $GREP ^.:`
58422  new_path="$path"
58423  if test "x$has_colon" = x; then
58424    # Not in mixed or Windows style, start by that.
58425    new_path=`cmd //c echo $path`
58426  fi
58427
58428
58429  input_path="$new_path"
58430  # Check if we need to convert this using DOS-style short mode. If the path
58431  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58432  # take no chances and rewrite it.
58433  # Note: m4 eats our [], so we need to use [ and ] instead.
58434  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58435  if test "x$has_forbidden_chars" != x; then
58436    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58437    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58438  fi
58439
58440
58441  windows_path="$new_path"
58442  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58443    unix_path=`$CYGPATH -u "$windows_path"`
58444    new_path="$unix_path"
58445  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58446    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58447    new_path="$unix_path"
58448  fi
58449
58450  if test "x$path" != "x$new_path"; then
58451    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58452    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58453$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58454  fi
58455
58456  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58457  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58458
58459    else
58460      # We're on a unix platform. Hooray! :)
58461      path="$POTENTIAL_FREETYPE_LIB_PATH"
58462      has_space=`$ECHO "$path" | $GREP " "`
58463      if test "x$has_space" != x; then
58464        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58465$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58466        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58467      fi
58468
58469      # Use eval to expand a potential ~
58470      eval path="$path"
58471      if test ! -f "$path" && test ! -d "$path"; then
58472        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58473      fi
58474
58475      if test -d "$path"; then
58476        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58477      else
58478        dir="`$DIRNAME "$path"`"
58479        base="`$BASENAME "$path"`"
58480        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58481      fi
58482    fi
58483  fi
58484
58485
58486    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58487    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58488$as_echo_n "checking for freetype includes... " >&6; }
58489    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58490$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58491    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58492    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58493$as_echo_n "checking for freetype libraries... " >&6; }
58494    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58495$as_echo "$FREETYPE_LIB_PATH" >&6; }
58496  fi
58497
58498          fi
58499          if test "x$FOUND_FREETYPE" != xyes; then
58500            FREETYPE_BASE_DIR="$HOME/freetype"
58501
58502  windows_path="$FREETYPE_BASE_DIR"
58503  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58504    unix_path=`$CYGPATH -u "$windows_path"`
58505    FREETYPE_BASE_DIR="$unix_path"
58506  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58507    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58508    FREETYPE_BASE_DIR="$unix_path"
58509  fi
58510
58511            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
58512
58513  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58514  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
58515  METHOD="well-known location"
58516
58517  # Let's start with an optimistic view of the world :-)
58518  FOUND_FREETYPE=yes
58519
58520  # First look for the canonical freetype main include file ft2build.h.
58521  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58522    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58523    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58524    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58525      # Fail.
58526      FOUND_FREETYPE=no
58527    fi
58528  fi
58529
58530  if test "x$FOUND_FREETYPE" = xyes; then
58531    # Include file found, let's continue the sanity check.
58532    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58533$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58534
58535    # Reset to default value
58536    FREETYPE_BASE_NAME=freetype
58537    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58538    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58539      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58540          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58541        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58542        # for the .6 version explicitly.
58543        FREETYPE_BASE_NAME=freetype.6
58544        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58545        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58546$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58547      else
58548        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58549$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58550        FOUND_FREETYPE=no
58551      fi
58552    else
58553      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58554        # On Windows, we will need both .lib and .dll file.
58555        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58556          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58557$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58558          FOUND_FREETYPE=no
58559        fi
58560      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58561          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58562        # Found lib in isa dir, use that instead.
58563        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58564        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58565$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58566      fi
58567    fi
58568  fi
58569
58570  if test "x$FOUND_FREETYPE" = xyes; then
58571
58572  # Only process if variable expands to non-empty
58573
58574  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58575    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58576
58577  # Input might be given as Windows format, start by converting to
58578  # unix format.
58579  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58580  new_path=`$CYGPATH -u "$path"`
58581
58582  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58583  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58584  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58585  # "foo.exe" is OK but "foo" is an error.
58586  #
58587  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58588  # It is also a way to make sure we got the proper file name for the real test later on.
58589  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58590  if test "x$test_shortpath" = x; then
58591    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58592$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58593    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58594  fi
58595
58596  # Call helper function which possibly converts this using DOS-style short mode.
58597  # If so, the updated path is stored in $new_path.
58598
58599  input_path="$new_path"
58600  # Check if we need to convert this using DOS-style short mode. If the path
58601  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58602  # take no chances and rewrite it.
58603  # Note: m4 eats our [], so we need to use [ and ] instead.
58604  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58605  if test "x$has_forbidden_chars" != x; then
58606    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58607    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58608    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58609    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58610      # Going to short mode and back again did indeed matter. Since short mode is
58611      # case insensitive, let's make it lowercase to improve readability.
58612      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58613      # Now convert it back to Unix-style (cygpath)
58614      input_path=`$CYGPATH -u "$shortmode_path"`
58615      new_path="$input_path"
58616    fi
58617  fi
58618
58619  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58620  if test "x$test_cygdrive_prefix" = x; then
58621    # As a simple fix, exclude /usr/bin since it's not a real path.
58622    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58623      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58624      # a path prefixed by /cygdrive for fixpath to work.
58625      new_path="$CYGWIN_ROOT_PATH$input_path"
58626    fi
58627  fi
58628
58629
58630  if test "x$path" != "x$new_path"; then
58631    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58632    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58633$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58634  fi
58635
58636    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58637
58638  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58639  has_colon=`$ECHO $path | $GREP ^.:`
58640  new_path="$path"
58641  if test "x$has_colon" = x; then
58642    # Not in mixed or Windows style, start by that.
58643    new_path=`cmd //c echo $path`
58644  fi
58645
58646
58647  input_path="$new_path"
58648  # Check if we need to convert this using DOS-style short mode. If the path
58649  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58650  # take no chances and rewrite it.
58651  # Note: m4 eats our [], so we need to use [ and ] instead.
58652  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58653  if test "x$has_forbidden_chars" != x; then
58654    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58655    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58656  fi
58657
58658
58659  windows_path="$new_path"
58660  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58661    unix_path=`$CYGPATH -u "$windows_path"`
58662    new_path="$unix_path"
58663  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58664    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58665    new_path="$unix_path"
58666  fi
58667
58668  if test "x$path" != "x$new_path"; then
58669    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58670    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58671$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58672  fi
58673
58674  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58675  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58676
58677    else
58678      # We're on a unix platform. Hooray! :)
58679      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58680      has_space=`$ECHO "$path" | $GREP " "`
58681      if test "x$has_space" != x; then
58682        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58683$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58684        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58685      fi
58686
58687      # Use eval to expand a potential ~
58688      eval path="$path"
58689      if test ! -f "$path" && test ! -d "$path"; then
58690        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58691      fi
58692
58693      if test -d "$path"; then
58694        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58695      else
58696        dir="`$DIRNAME "$path"`"
58697        base="`$BASENAME "$path"`"
58698        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58699      fi
58700    fi
58701  fi
58702
58703
58704  # Only process if variable expands to non-empty
58705
58706  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58707    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58708
58709  # Input might be given as Windows format, start by converting to
58710  # unix format.
58711  path="$POTENTIAL_FREETYPE_LIB_PATH"
58712  new_path=`$CYGPATH -u "$path"`
58713
58714  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58715  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58716  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58717  # "foo.exe" is OK but "foo" is an error.
58718  #
58719  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58720  # It is also a way to make sure we got the proper file name for the real test later on.
58721  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58722  if test "x$test_shortpath" = x; then
58723    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58724$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58725    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58726  fi
58727
58728  # Call helper function which possibly converts this using DOS-style short mode.
58729  # If so, the updated path is stored in $new_path.
58730
58731  input_path="$new_path"
58732  # Check if we need to convert this using DOS-style short mode. If the path
58733  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58734  # take no chances and rewrite it.
58735  # Note: m4 eats our [], so we need to use [ and ] instead.
58736  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58737  if test "x$has_forbidden_chars" != x; then
58738    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58739    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58740    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58741    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58742      # Going to short mode and back again did indeed matter. Since short mode is
58743      # case insensitive, let's make it lowercase to improve readability.
58744      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58745      # Now convert it back to Unix-style (cygpath)
58746      input_path=`$CYGPATH -u "$shortmode_path"`
58747      new_path="$input_path"
58748    fi
58749  fi
58750
58751  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58752  if test "x$test_cygdrive_prefix" = x; then
58753    # As a simple fix, exclude /usr/bin since it's not a real path.
58754    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58755      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58756      # a path prefixed by /cygdrive for fixpath to work.
58757      new_path="$CYGWIN_ROOT_PATH$input_path"
58758    fi
58759  fi
58760
58761
58762  if test "x$path" != "x$new_path"; then
58763    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58764    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58765$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58766  fi
58767
58768    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58769
58770  path="$POTENTIAL_FREETYPE_LIB_PATH"
58771  has_colon=`$ECHO $path | $GREP ^.:`
58772  new_path="$path"
58773  if test "x$has_colon" = x; then
58774    # Not in mixed or Windows style, start by that.
58775    new_path=`cmd //c echo $path`
58776  fi
58777
58778
58779  input_path="$new_path"
58780  # Check if we need to convert this using DOS-style short mode. If the path
58781  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58782  # take no chances and rewrite it.
58783  # Note: m4 eats our [], so we need to use [ and ] instead.
58784  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58785  if test "x$has_forbidden_chars" != x; then
58786    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58787    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58788  fi
58789
58790
58791  windows_path="$new_path"
58792  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58793    unix_path=`$CYGPATH -u "$windows_path"`
58794    new_path="$unix_path"
58795  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58796    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58797    new_path="$unix_path"
58798  fi
58799
58800  if test "x$path" != "x$new_path"; then
58801    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58802    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58803$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58804  fi
58805
58806  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58807  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58808
58809    else
58810      # We're on a unix platform. Hooray! :)
58811      path="$POTENTIAL_FREETYPE_LIB_PATH"
58812      has_space=`$ECHO "$path" | $GREP " "`
58813      if test "x$has_space" != x; then
58814        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58815$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58816        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58817      fi
58818
58819      # Use eval to expand a potential ~
58820      eval path="$path"
58821      if test ! -f "$path" && test ! -d "$path"; then
58822        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58823      fi
58824
58825      if test -d "$path"; then
58826        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58827      else
58828        dir="`$DIRNAME "$path"`"
58829        base="`$BASENAME "$path"`"
58830        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58831      fi
58832    fi
58833  fi
58834
58835
58836    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58837    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58838$as_echo_n "checking for freetype includes... " >&6; }
58839    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58840$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58841    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58842    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58843$as_echo_n "checking for freetype libraries... " >&6; }
58844    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58845$as_echo "$FREETYPE_LIB_PATH" >&6; }
58846  fi
58847
58848            else
58849
58850  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58851  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
58852  METHOD="well-known location"
58853
58854  # Let's start with an optimistic view of the world :-)
58855  FOUND_FREETYPE=yes
58856
58857  # First look for the canonical freetype main include file ft2build.h.
58858  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58859    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58860    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58861    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58862      # Fail.
58863      FOUND_FREETYPE=no
58864    fi
58865  fi
58866
58867  if test "x$FOUND_FREETYPE" = xyes; then
58868    # Include file found, let's continue the sanity check.
58869    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58870$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58871
58872    # Reset to default value
58873    FREETYPE_BASE_NAME=freetype
58874    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58875    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58876      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58877          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58878        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58879        # for the .6 version explicitly.
58880        FREETYPE_BASE_NAME=freetype.6
58881        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58882        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58883$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58884      else
58885        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58886$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58887        FOUND_FREETYPE=no
58888      fi
58889    else
58890      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58891        # On Windows, we will need both .lib and .dll file.
58892        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58893          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58894$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58895          FOUND_FREETYPE=no
58896        fi
58897      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58898          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58899        # Found lib in isa dir, use that instead.
58900        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58901        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58902$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58903      fi
58904    fi
58905  fi
58906
58907  if test "x$FOUND_FREETYPE" = xyes; then
58908
58909  # Only process if variable expands to non-empty
58910
58911  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58912    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58913
58914  # Input might be given as Windows format, start by converting to
58915  # unix format.
58916  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58917  new_path=`$CYGPATH -u "$path"`
58918
58919  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58920  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58921  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58922  # "foo.exe" is OK but "foo" is an error.
58923  #
58924  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58925  # It is also a way to make sure we got the proper file name for the real test later on.
58926  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58927  if test "x$test_shortpath" = x; then
58928    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58929$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58930    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58931  fi
58932
58933  # Call helper function which possibly converts this using DOS-style short mode.
58934  # If so, the updated path is stored in $new_path.
58935
58936  input_path="$new_path"
58937  # Check if we need to convert this using DOS-style short mode. If the path
58938  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58939  # take no chances and rewrite it.
58940  # Note: m4 eats our [], so we need to use [ and ] instead.
58941  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58942  if test "x$has_forbidden_chars" != x; then
58943    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58944    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58945    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58946    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58947      # Going to short mode and back again did indeed matter. Since short mode is
58948      # case insensitive, let's make it lowercase to improve readability.
58949      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58950      # Now convert it back to Unix-style (cygpath)
58951      input_path=`$CYGPATH -u "$shortmode_path"`
58952      new_path="$input_path"
58953    fi
58954  fi
58955
58956  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58957  if test "x$test_cygdrive_prefix" = x; then
58958    # As a simple fix, exclude /usr/bin since it's not a real path.
58959    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58960      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58961      # a path prefixed by /cygdrive for fixpath to work.
58962      new_path="$CYGWIN_ROOT_PATH$input_path"
58963    fi
58964  fi
58965
58966
58967  if test "x$path" != "x$new_path"; then
58968    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58969    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58970$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58971  fi
58972
58973    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58974
58975  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58976  has_colon=`$ECHO $path | $GREP ^.:`
58977  new_path="$path"
58978  if test "x$has_colon" = x; then
58979    # Not in mixed or Windows style, start by that.
58980    new_path=`cmd //c echo $path`
58981  fi
58982
58983
58984  input_path="$new_path"
58985  # Check if we need to convert this using DOS-style short mode. If the path
58986  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58987  # take no chances and rewrite it.
58988  # Note: m4 eats our [], so we need to use [ and ] instead.
58989  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58990  if test "x$has_forbidden_chars" != x; then
58991    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58992    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58993  fi
58994
58995
58996  windows_path="$new_path"
58997  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58998    unix_path=`$CYGPATH -u "$windows_path"`
58999    new_path="$unix_path"
59000  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59001    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59002    new_path="$unix_path"
59003  fi
59004
59005  if test "x$path" != "x$new_path"; then
59006    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59007    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59008$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59009  fi
59010
59011  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59012  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59013
59014    else
59015      # We're on a unix platform. Hooray! :)
59016      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59017      has_space=`$ECHO "$path" | $GREP " "`
59018      if test "x$has_space" != x; then
59019        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59020$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59021        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59022      fi
59023
59024      # Use eval to expand a potential ~
59025      eval path="$path"
59026      if test ! -f "$path" && test ! -d "$path"; then
59027        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59028      fi
59029
59030      if test -d "$path"; then
59031        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59032      else
59033        dir="`$DIRNAME "$path"`"
59034        base="`$BASENAME "$path"`"
59035        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59036      fi
59037    fi
59038  fi
59039
59040
59041  # Only process if variable expands to non-empty
59042
59043  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59044    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59045
59046  # Input might be given as Windows format, start by converting to
59047  # unix format.
59048  path="$POTENTIAL_FREETYPE_LIB_PATH"
59049  new_path=`$CYGPATH -u "$path"`
59050
59051  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59052  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59053  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59054  # "foo.exe" is OK but "foo" is an error.
59055  #
59056  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59057  # It is also a way to make sure we got the proper file name for the real test later on.
59058  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59059  if test "x$test_shortpath" = x; then
59060    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59061$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59062    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59063  fi
59064
59065  # Call helper function which possibly converts this using DOS-style short mode.
59066  # If so, the updated path is stored in $new_path.
59067
59068  input_path="$new_path"
59069  # Check if we need to convert this using DOS-style short mode. If the path
59070  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59071  # take no chances and rewrite it.
59072  # Note: m4 eats our [], so we need to use [ and ] instead.
59073  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59074  if test "x$has_forbidden_chars" != x; then
59075    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59076    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59077    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59078    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59079      # Going to short mode and back again did indeed matter. Since short mode is
59080      # case insensitive, let's make it lowercase to improve readability.
59081      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59082      # Now convert it back to Unix-style (cygpath)
59083      input_path=`$CYGPATH -u "$shortmode_path"`
59084      new_path="$input_path"
59085    fi
59086  fi
59087
59088  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59089  if test "x$test_cygdrive_prefix" = x; then
59090    # As a simple fix, exclude /usr/bin since it's not a real path.
59091    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59092      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59093      # a path prefixed by /cygdrive for fixpath to work.
59094      new_path="$CYGWIN_ROOT_PATH$input_path"
59095    fi
59096  fi
59097
59098
59099  if test "x$path" != "x$new_path"; then
59100    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59101    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59102$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59103  fi
59104
59105    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59106
59107  path="$POTENTIAL_FREETYPE_LIB_PATH"
59108  has_colon=`$ECHO $path | $GREP ^.:`
59109  new_path="$path"
59110  if test "x$has_colon" = x; then
59111    # Not in mixed or Windows style, start by that.
59112    new_path=`cmd //c echo $path`
59113  fi
59114
59115
59116  input_path="$new_path"
59117  # Check if we need to convert this using DOS-style short mode. If the path
59118  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59119  # take no chances and rewrite it.
59120  # Note: m4 eats our [], so we need to use [ and ] instead.
59121  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59122  if test "x$has_forbidden_chars" != x; then
59123    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59124    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59125  fi
59126
59127
59128  windows_path="$new_path"
59129  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59130    unix_path=`$CYGPATH -u "$windows_path"`
59131    new_path="$unix_path"
59132  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59133    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59134    new_path="$unix_path"
59135  fi
59136
59137  if test "x$path" != "x$new_path"; then
59138    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59139    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59140$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59141  fi
59142
59143  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59144  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59145
59146    else
59147      # We're on a unix platform. Hooray! :)
59148      path="$POTENTIAL_FREETYPE_LIB_PATH"
59149      has_space=`$ECHO "$path" | $GREP " "`
59150      if test "x$has_space" != x; then
59151        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59152$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59153        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59154      fi
59155
59156      # Use eval to expand a potential ~
59157      eval path="$path"
59158      if test ! -f "$path" && test ! -d "$path"; then
59159        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59160      fi
59161
59162      if test -d "$path"; then
59163        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59164      else
59165        dir="`$DIRNAME "$path"`"
59166        base="`$BASENAME "$path"`"
59167        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59168      fi
59169    fi
59170  fi
59171
59172
59173    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59174    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59175$as_echo_n "checking for freetype includes... " >&6; }
59176    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59177$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59178    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59179    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59180$as_echo_n "checking for freetype libraries... " >&6; }
59181    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59182$as_echo "$FREETYPE_LIB_PATH" >&6; }
59183  fi
59184
59185            fi
59186            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
59187                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
59188              # Source is available, as a last resort try to build freetype in default location
59189
59190  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
59191  BUILD_FREETYPE=yes
59192
59193  # Check if the freetype sources are acessible..
59194  if ! test -d $FREETYPE_SRC_PATH; then
59195    { $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
59196$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
59197    BUILD_FREETYPE=no
59198  fi
59199  # ..and contain a vc2010 project file
59200  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
59201  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
59202    { $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
59203$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
59204    BUILD_FREETYPE=no
59205  fi
59206  # Now check if configure found a version of 'msbuild.exe'
59207  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
59208    { $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
59209$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;}
59210    BUILD_FREETYPE=no
59211  fi
59212
59213  # Ready to go..
59214  if test "x$BUILD_FREETYPE" = xyes; then
59215    # msbuild requires trailing slashes for output directories
59216    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
59217    freetype_lib_path_unix="$freetype_lib_path"
59218    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
59219
59220  unix_path="$vcxproj_path"
59221  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59222    windows_path=`$CYGPATH -m "$unix_path"`
59223    vcxproj_path="$windows_path"
59224  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59225    windows_path=`cmd //c echo $unix_path`
59226    vcxproj_path="$windows_path"
59227  fi
59228
59229
59230  unix_path="$freetype_lib_path"
59231  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59232    windows_path=`$CYGPATH -m "$unix_path"`
59233    freetype_lib_path="$windows_path"
59234  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59235    windows_path=`cmd //c echo $unix_path`
59236    freetype_lib_path="$windows_path"
59237  fi
59238
59239
59240  unix_path="$freetype_obj_path"
59241  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59242    windows_path=`$CYGPATH -m "$unix_path"`
59243    freetype_obj_path="$windows_path"
59244  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59245    windows_path=`cmd //c echo $unix_path`
59246    freetype_obj_path="$windows_path"
59247  fi
59248
59249    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59250      freetype_platform=x64
59251    else
59252      freetype_platform=win32
59253    fi
59254
59255    # The original freetype project file is for VS 2010 (i.e. 'v100'),
59256    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
59257    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
59258    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
59259    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
59260$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
59261
59262    # First we try to build the freetype.dll
59263    $ECHO -e "@echo off\n"\
59264        "$MSBUILD $vcxproj_path "\
59265        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59266        "/p:Configuration=\"Release Multithreaded\" "\
59267        "/p:Platform=$freetype_platform "\
59268        "/p:ConfigurationType=DynamicLibrary "\
59269        "/p:TargetName=freetype "\
59270        "/p:OutDir=\"$freetype_lib_path\" "\
59271        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
59272    cmd /c freetype.bat
59273
59274    if test -s "$freetype_lib_path_unix/freetype.dll"; then
59275      # If that succeeds we also build freetype.lib
59276      $ECHO -e "@echo off\n"\
59277          "$MSBUILD $vcxproj_path "\
59278          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59279          "/p:Configuration=\"Release Multithreaded\" "\
59280          "/p:Platform=$freetype_platform "\
59281          "/p:ConfigurationType=StaticLibrary "\
59282          "/p:TargetName=freetype "\
59283          "/p:OutDir=\"$freetype_lib_path\" "\
59284          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
59285      cmd /c freetype.bat
59286
59287      if test -s "$freetype_lib_path_unix/freetype.lib"; then
59288        # Once we build both, lib and dll, set freetype lib and include path appropriately
59289        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
59290        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
59291        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
59292$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
59293      else
59294        BUILD_FREETYPE=no
59295      fi
59296    else
59297      BUILD_FREETYPE=no
59298    fi
59299  fi
59300
59301              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59302
59303  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59304  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59305  METHOD="well-known location"
59306
59307  # Let's start with an optimistic view of the world :-)
59308  FOUND_FREETYPE=yes
59309
59310  # First look for the canonical freetype main include file ft2build.h.
59311  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59312    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59313    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59314    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59315      # Fail.
59316      FOUND_FREETYPE=no
59317    fi
59318  fi
59319
59320  if test "x$FOUND_FREETYPE" = xyes; then
59321    # Include file found, let's continue the sanity check.
59322    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59323$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59324
59325    # Reset to default value
59326    FREETYPE_BASE_NAME=freetype
59327    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59328    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59329      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59330          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59331        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59332        # for the .6 version explicitly.
59333        FREETYPE_BASE_NAME=freetype.6
59334        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59335        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59336$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59337      else
59338        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59339$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59340        FOUND_FREETYPE=no
59341      fi
59342    else
59343      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59344        # On Windows, we will need both .lib and .dll file.
59345        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59346          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59347$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59348          FOUND_FREETYPE=no
59349        fi
59350      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59351          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59352        # Found lib in isa dir, use that instead.
59353        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59354        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59355$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59356      fi
59357    fi
59358  fi
59359
59360  if test "x$FOUND_FREETYPE" = xyes; then
59361
59362  # Only process if variable expands to non-empty
59363
59364  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59365    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59366
59367  # Input might be given as Windows format, start by converting to
59368  # unix format.
59369  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59370  new_path=`$CYGPATH -u "$path"`
59371
59372  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59373  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59374  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59375  # "foo.exe" is OK but "foo" is an error.
59376  #
59377  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59378  # It is also a way to make sure we got the proper file name for the real test later on.
59379  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59380  if test "x$test_shortpath" = x; then
59381    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59382$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59383    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59384  fi
59385
59386  # Call helper function which possibly converts this using DOS-style short mode.
59387  # If so, the updated path is stored in $new_path.
59388
59389  input_path="$new_path"
59390  # Check if we need to convert this using DOS-style short mode. If the path
59391  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59392  # take no chances and rewrite it.
59393  # Note: m4 eats our [], so we need to use [ and ] instead.
59394  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59395  if test "x$has_forbidden_chars" != x; then
59396    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59397    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59398    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59399    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59400      # Going to short mode and back again did indeed matter. Since short mode is
59401      # case insensitive, let's make it lowercase to improve readability.
59402      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59403      # Now convert it back to Unix-style (cygpath)
59404      input_path=`$CYGPATH -u "$shortmode_path"`
59405      new_path="$input_path"
59406    fi
59407  fi
59408
59409  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59410  if test "x$test_cygdrive_prefix" = x; then
59411    # As a simple fix, exclude /usr/bin since it's not a real path.
59412    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59413      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59414      # a path prefixed by /cygdrive for fixpath to work.
59415      new_path="$CYGWIN_ROOT_PATH$input_path"
59416    fi
59417  fi
59418
59419
59420  if test "x$path" != "x$new_path"; then
59421    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59422    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59423$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59424  fi
59425
59426    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59427
59428  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59429  has_colon=`$ECHO $path | $GREP ^.:`
59430  new_path="$path"
59431  if test "x$has_colon" = x; then
59432    # Not in mixed or Windows style, start by that.
59433    new_path=`cmd //c echo $path`
59434  fi
59435
59436
59437  input_path="$new_path"
59438  # Check if we need to convert this using DOS-style short mode. If the path
59439  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59440  # take no chances and rewrite it.
59441  # Note: m4 eats our [], so we need to use [ and ] instead.
59442  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59443  if test "x$has_forbidden_chars" != x; then
59444    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59445    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59446  fi
59447
59448
59449  windows_path="$new_path"
59450  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59451    unix_path=`$CYGPATH -u "$windows_path"`
59452    new_path="$unix_path"
59453  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59454    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59455    new_path="$unix_path"
59456  fi
59457
59458  if test "x$path" != "x$new_path"; then
59459    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59460    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59461$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59462  fi
59463
59464  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59465  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59466
59467    else
59468      # We're on a unix platform. Hooray! :)
59469      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59470      has_space=`$ECHO "$path" | $GREP " "`
59471      if test "x$has_space" != x; then
59472        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59473$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59474        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59475      fi
59476
59477      # Use eval to expand a potential ~
59478      eval path="$path"
59479      if test ! -f "$path" && test ! -d "$path"; then
59480        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59481      fi
59482
59483      if test -d "$path"; then
59484        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59485      else
59486        dir="`$DIRNAME "$path"`"
59487        base="`$BASENAME "$path"`"
59488        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59489      fi
59490    fi
59491  fi
59492
59493
59494  # Only process if variable expands to non-empty
59495
59496  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59497    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59498
59499  # Input might be given as Windows format, start by converting to
59500  # unix format.
59501  path="$POTENTIAL_FREETYPE_LIB_PATH"
59502  new_path=`$CYGPATH -u "$path"`
59503
59504  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59505  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59506  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59507  # "foo.exe" is OK but "foo" is an error.
59508  #
59509  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59510  # It is also a way to make sure we got the proper file name for the real test later on.
59511  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59512  if test "x$test_shortpath" = x; then
59513    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59514$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59515    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59516  fi
59517
59518  # Call helper function which possibly converts this using DOS-style short mode.
59519  # If so, the updated path is stored in $new_path.
59520
59521  input_path="$new_path"
59522  # Check if we need to convert this using DOS-style short mode. If the path
59523  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59524  # take no chances and rewrite it.
59525  # Note: m4 eats our [], so we need to use [ and ] instead.
59526  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59527  if test "x$has_forbidden_chars" != x; then
59528    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59529    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59530    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59531    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59532      # Going to short mode and back again did indeed matter. Since short mode is
59533      # case insensitive, let's make it lowercase to improve readability.
59534      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59535      # Now convert it back to Unix-style (cygpath)
59536      input_path=`$CYGPATH -u "$shortmode_path"`
59537      new_path="$input_path"
59538    fi
59539  fi
59540
59541  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59542  if test "x$test_cygdrive_prefix" = x; then
59543    # As a simple fix, exclude /usr/bin since it's not a real path.
59544    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59545      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59546      # a path prefixed by /cygdrive for fixpath to work.
59547      new_path="$CYGWIN_ROOT_PATH$input_path"
59548    fi
59549  fi
59550
59551
59552  if test "x$path" != "x$new_path"; then
59553    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59554    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59555$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59556  fi
59557
59558    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59559
59560  path="$POTENTIAL_FREETYPE_LIB_PATH"
59561  has_colon=`$ECHO $path | $GREP ^.:`
59562  new_path="$path"
59563  if test "x$has_colon" = x; then
59564    # Not in mixed or Windows style, start by that.
59565    new_path=`cmd //c echo $path`
59566  fi
59567
59568
59569  input_path="$new_path"
59570  # Check if we need to convert this using DOS-style short mode. If the path
59571  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59572  # take no chances and rewrite it.
59573  # Note: m4 eats our [], so we need to use [ and ] instead.
59574  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59575  if test "x$has_forbidden_chars" != x; then
59576    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59577    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59578  fi
59579
59580
59581  windows_path="$new_path"
59582  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59583    unix_path=`$CYGPATH -u "$windows_path"`
59584    new_path="$unix_path"
59585  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59586    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59587    new_path="$unix_path"
59588  fi
59589
59590  if test "x$path" != "x$new_path"; then
59591    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59592    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59593$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59594  fi
59595
59596  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59597  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59598
59599    else
59600      # We're on a unix platform. Hooray! :)
59601      path="$POTENTIAL_FREETYPE_LIB_PATH"
59602      has_space=`$ECHO "$path" | $GREP " "`
59603      if test "x$has_space" != x; then
59604        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59605$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59606        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59607      fi
59608
59609      # Use eval to expand a potential ~
59610      eval path="$path"
59611      if test ! -f "$path" && test ! -d "$path"; then
59612        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59613      fi
59614
59615      if test -d "$path"; then
59616        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59617      else
59618        dir="`$DIRNAME "$path"`"
59619        base="`$BASENAME "$path"`"
59620        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59621      fi
59622    fi
59623  fi
59624
59625
59626    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59627    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59628$as_echo_n "checking for freetype includes... " >&6; }
59629    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59630$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59631    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59632    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59633$as_echo_n "checking for freetype libraries... " >&6; }
59634    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59635$as_echo "$FREETYPE_LIB_PATH" >&6; }
59636  fi
59637
59638              else
59639
59640  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59641  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59642  METHOD="well-known location"
59643
59644  # Let's start with an optimistic view of the world :-)
59645  FOUND_FREETYPE=yes
59646
59647  # First look for the canonical freetype main include file ft2build.h.
59648  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59649    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59650    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59651    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59652      # Fail.
59653      FOUND_FREETYPE=no
59654    fi
59655  fi
59656
59657  if test "x$FOUND_FREETYPE" = xyes; then
59658    # Include file found, let's continue the sanity check.
59659    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59660$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59661
59662    # Reset to default value
59663    FREETYPE_BASE_NAME=freetype
59664    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59665    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59666      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59667          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59668        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59669        # for the .6 version explicitly.
59670        FREETYPE_BASE_NAME=freetype.6
59671        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59672        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59673$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59674      else
59675        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59676$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59677        FOUND_FREETYPE=no
59678      fi
59679    else
59680      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59681        # On Windows, we will need both .lib and .dll file.
59682        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59683          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59684$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59685          FOUND_FREETYPE=no
59686        fi
59687      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59688          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59689        # Found lib in isa dir, use that instead.
59690        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59691        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59692$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59693      fi
59694    fi
59695  fi
59696
59697  if test "x$FOUND_FREETYPE" = xyes; then
59698
59699  # Only process if variable expands to non-empty
59700
59701  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59702    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59703
59704  # Input might be given as Windows format, start by converting to
59705  # unix format.
59706  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59707  new_path=`$CYGPATH -u "$path"`
59708
59709  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59710  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59711  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59712  # "foo.exe" is OK but "foo" is an error.
59713  #
59714  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59715  # It is also a way to make sure we got the proper file name for the real test later on.
59716  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59717  if test "x$test_shortpath" = x; then
59718    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59719$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59720    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59721  fi
59722
59723  # Call helper function which possibly converts this using DOS-style short mode.
59724  # If so, the updated path is stored in $new_path.
59725
59726  input_path="$new_path"
59727  # Check if we need to convert this using DOS-style short mode. If the path
59728  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59729  # take no chances and rewrite it.
59730  # Note: m4 eats our [], so we need to use [ and ] instead.
59731  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59732  if test "x$has_forbidden_chars" != x; then
59733    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59734    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59735    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59736    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59737      # Going to short mode and back again did indeed matter. Since short mode is
59738      # case insensitive, let's make it lowercase to improve readability.
59739      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59740      # Now convert it back to Unix-style (cygpath)
59741      input_path=`$CYGPATH -u "$shortmode_path"`
59742      new_path="$input_path"
59743    fi
59744  fi
59745
59746  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59747  if test "x$test_cygdrive_prefix" = x; then
59748    # As a simple fix, exclude /usr/bin since it's not a real path.
59749    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59750      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59751      # a path prefixed by /cygdrive for fixpath to work.
59752      new_path="$CYGWIN_ROOT_PATH$input_path"
59753    fi
59754  fi
59755
59756
59757  if test "x$path" != "x$new_path"; then
59758    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59759    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59760$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59761  fi
59762
59763    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59764
59765  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59766  has_colon=`$ECHO $path | $GREP ^.:`
59767  new_path="$path"
59768  if test "x$has_colon" = x; then
59769    # Not in mixed or Windows style, start by that.
59770    new_path=`cmd //c echo $path`
59771  fi
59772
59773
59774  input_path="$new_path"
59775  # Check if we need to convert this using DOS-style short mode. If the path
59776  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59777  # take no chances and rewrite it.
59778  # Note: m4 eats our [], so we need to use [ and ] instead.
59779  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59780  if test "x$has_forbidden_chars" != x; then
59781    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59782    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59783  fi
59784
59785
59786  windows_path="$new_path"
59787  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59788    unix_path=`$CYGPATH -u "$windows_path"`
59789    new_path="$unix_path"
59790  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59791    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59792    new_path="$unix_path"
59793  fi
59794
59795  if test "x$path" != "x$new_path"; then
59796    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59797    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59798$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59799  fi
59800
59801  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59802  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59803
59804    else
59805      # We're on a unix platform. Hooray! :)
59806      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59807      has_space=`$ECHO "$path" | $GREP " "`
59808      if test "x$has_space" != x; then
59809        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59810$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59811        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59812      fi
59813
59814      # Use eval to expand a potential ~
59815      eval path="$path"
59816      if test ! -f "$path" && test ! -d "$path"; then
59817        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59818      fi
59819
59820      if test -d "$path"; then
59821        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59822      else
59823        dir="`$DIRNAME "$path"`"
59824        base="`$BASENAME "$path"`"
59825        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59826      fi
59827    fi
59828  fi
59829
59830
59831  # Only process if variable expands to non-empty
59832
59833  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59834    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59835
59836  # Input might be given as Windows format, start by converting to
59837  # unix format.
59838  path="$POTENTIAL_FREETYPE_LIB_PATH"
59839  new_path=`$CYGPATH -u "$path"`
59840
59841  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59842  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59843  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59844  # "foo.exe" is OK but "foo" is an error.
59845  #
59846  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59847  # It is also a way to make sure we got the proper file name for the real test later on.
59848  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59849  if test "x$test_shortpath" = x; then
59850    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59851$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59852    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59853  fi
59854
59855  # Call helper function which possibly converts this using DOS-style short mode.
59856  # If so, the updated path is stored in $new_path.
59857
59858  input_path="$new_path"
59859  # Check if we need to convert this using DOS-style short mode. If the path
59860  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59861  # take no chances and rewrite it.
59862  # Note: m4 eats our [], so we need to use [ and ] instead.
59863  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59864  if test "x$has_forbidden_chars" != x; then
59865    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59866    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59867    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59868    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59869      # Going to short mode and back again did indeed matter. Since short mode is
59870      # case insensitive, let's make it lowercase to improve readability.
59871      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59872      # Now convert it back to Unix-style (cygpath)
59873      input_path=`$CYGPATH -u "$shortmode_path"`
59874      new_path="$input_path"
59875    fi
59876  fi
59877
59878  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59879  if test "x$test_cygdrive_prefix" = x; then
59880    # As a simple fix, exclude /usr/bin since it's not a real path.
59881    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59882      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59883      # a path prefixed by /cygdrive for fixpath to work.
59884      new_path="$CYGWIN_ROOT_PATH$input_path"
59885    fi
59886  fi
59887
59888
59889  if test "x$path" != "x$new_path"; then
59890    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59891    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59892$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59893  fi
59894
59895    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59896
59897  path="$POTENTIAL_FREETYPE_LIB_PATH"
59898  has_colon=`$ECHO $path | $GREP ^.:`
59899  new_path="$path"
59900  if test "x$has_colon" = x; then
59901    # Not in mixed or Windows style, start by that.
59902    new_path=`cmd //c echo $path`
59903  fi
59904
59905
59906  input_path="$new_path"
59907  # Check if we need to convert this using DOS-style short mode. If the path
59908  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59909  # take no chances and rewrite it.
59910  # Note: m4 eats our [], so we need to use [ and ] instead.
59911  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59912  if test "x$has_forbidden_chars" != x; then
59913    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59914    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59915  fi
59916
59917
59918  windows_path="$new_path"
59919  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59920    unix_path=`$CYGPATH -u "$windows_path"`
59921    new_path="$unix_path"
59922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59923    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59924    new_path="$unix_path"
59925  fi
59926
59927  if test "x$path" != "x$new_path"; then
59928    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59929    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59930$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59931  fi
59932
59933  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59934  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59935
59936    else
59937      # We're on a unix platform. Hooray! :)
59938      path="$POTENTIAL_FREETYPE_LIB_PATH"
59939      has_space=`$ECHO "$path" | $GREP " "`
59940      if test "x$has_space" != x; then
59941        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59942$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59943        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59944      fi
59945
59946      # Use eval to expand a potential ~
59947      eval path="$path"
59948      if test ! -f "$path" && test ! -d "$path"; then
59949        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59950      fi
59951
59952      if test -d "$path"; then
59953        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59954      else
59955        dir="`$DIRNAME "$path"`"
59956        base="`$BASENAME "$path"`"
59957        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59958      fi
59959    fi
59960  fi
59961
59962
59963    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59964    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59965$as_echo_n "checking for freetype includes... " >&6; }
59966    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59967$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59968    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59969    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59970$as_echo_n "checking for freetype libraries... " >&6; }
59971    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59972$as_echo "$FREETYPE_LIB_PATH" >&6; }
59973  fi
59974
59975              fi
59976            fi
59977          fi
59978        else
59979          FREETYPE_BASE_DIR="$SYSROOT/usr"
59980
59981  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59982  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
59983  METHOD="well-known location"
59984
59985  # Let's start with an optimistic view of the world :-)
59986  FOUND_FREETYPE=yes
59987
59988  # First look for the canonical freetype main include file ft2build.h.
59989  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59990    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59991    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59992    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59993      # Fail.
59994      FOUND_FREETYPE=no
59995    fi
59996  fi
59997
59998  if test "x$FOUND_FREETYPE" = xyes; then
59999    # Include file found, let's continue the sanity check.
60000    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60001$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60002
60003    # Reset to default value
60004    FREETYPE_BASE_NAME=freetype
60005    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60006    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60007      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60008          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60009        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60010        # for the .6 version explicitly.
60011        FREETYPE_BASE_NAME=freetype.6
60012        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60013        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60014$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60015      else
60016        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60017$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60018        FOUND_FREETYPE=no
60019      fi
60020    else
60021      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60022        # On Windows, we will need both .lib and .dll file.
60023        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60024          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60025$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60026          FOUND_FREETYPE=no
60027        fi
60028      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60029          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60030        # Found lib in isa dir, use that instead.
60031        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60032        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60033$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60034      fi
60035    fi
60036  fi
60037
60038  if test "x$FOUND_FREETYPE" = xyes; then
60039
60040  # Only process if variable expands to non-empty
60041
60042  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60043    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60044
60045  # Input might be given as Windows format, start by converting to
60046  # unix format.
60047  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60048  new_path=`$CYGPATH -u "$path"`
60049
60050  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60051  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60052  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60053  # "foo.exe" is OK but "foo" is an error.
60054  #
60055  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60056  # It is also a way to make sure we got the proper file name for the real test later on.
60057  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60058  if test "x$test_shortpath" = x; then
60059    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60060$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60061    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60062  fi
60063
60064  # Call helper function which possibly converts this using DOS-style short mode.
60065  # If so, the updated path is stored in $new_path.
60066
60067  input_path="$new_path"
60068  # Check if we need to convert this using DOS-style short mode. If the path
60069  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60070  # take no chances and rewrite it.
60071  # Note: m4 eats our [], so we need to use [ and ] instead.
60072  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60073  if test "x$has_forbidden_chars" != x; then
60074    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60075    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60076    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60077    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60078      # Going to short mode and back again did indeed matter. Since short mode is
60079      # case insensitive, let's make it lowercase to improve readability.
60080      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60081      # Now convert it back to Unix-style (cygpath)
60082      input_path=`$CYGPATH -u "$shortmode_path"`
60083      new_path="$input_path"
60084    fi
60085  fi
60086
60087  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60088  if test "x$test_cygdrive_prefix" = x; then
60089    # As a simple fix, exclude /usr/bin since it's not a real path.
60090    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60091      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60092      # a path prefixed by /cygdrive for fixpath to work.
60093      new_path="$CYGWIN_ROOT_PATH$input_path"
60094    fi
60095  fi
60096
60097
60098  if test "x$path" != "x$new_path"; then
60099    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60100    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60101$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60102  fi
60103
60104    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60105
60106  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60107  has_colon=`$ECHO $path | $GREP ^.:`
60108  new_path="$path"
60109  if test "x$has_colon" = x; then
60110    # Not in mixed or Windows style, start by that.
60111    new_path=`cmd //c echo $path`
60112  fi
60113
60114
60115  input_path="$new_path"
60116  # Check if we need to convert this using DOS-style short mode. If the path
60117  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60118  # take no chances and rewrite it.
60119  # Note: m4 eats our [], so we need to use [ and ] instead.
60120  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60121  if test "x$has_forbidden_chars" != x; then
60122    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60123    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60124  fi
60125
60126
60127  windows_path="$new_path"
60128  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60129    unix_path=`$CYGPATH -u "$windows_path"`
60130    new_path="$unix_path"
60131  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60132    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60133    new_path="$unix_path"
60134  fi
60135
60136  if test "x$path" != "x$new_path"; then
60137    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60138    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60139$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60140  fi
60141
60142  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60143  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60144
60145    else
60146      # We're on a unix platform. Hooray! :)
60147      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60148      has_space=`$ECHO "$path" | $GREP " "`
60149      if test "x$has_space" != x; then
60150        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60151$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60152        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60153      fi
60154
60155      # Use eval to expand a potential ~
60156      eval path="$path"
60157      if test ! -f "$path" && test ! -d "$path"; then
60158        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60159      fi
60160
60161      if test -d "$path"; then
60162        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60163      else
60164        dir="`$DIRNAME "$path"`"
60165        base="`$BASENAME "$path"`"
60166        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60167      fi
60168    fi
60169  fi
60170
60171
60172  # Only process if variable expands to non-empty
60173
60174  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60175    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60176
60177  # Input might be given as Windows format, start by converting to
60178  # unix format.
60179  path="$POTENTIAL_FREETYPE_LIB_PATH"
60180  new_path=`$CYGPATH -u "$path"`
60181
60182  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60183  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60184  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60185  # "foo.exe" is OK but "foo" is an error.
60186  #
60187  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60188  # It is also a way to make sure we got the proper file name for the real test later on.
60189  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60190  if test "x$test_shortpath" = x; then
60191    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60192$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60193    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60194  fi
60195
60196  # Call helper function which possibly converts this using DOS-style short mode.
60197  # If so, the updated path is stored in $new_path.
60198
60199  input_path="$new_path"
60200  # Check if we need to convert this using DOS-style short mode. If the path
60201  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60202  # take no chances and rewrite it.
60203  # Note: m4 eats our [], so we need to use [ and ] instead.
60204  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60205  if test "x$has_forbidden_chars" != x; then
60206    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60207    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60208    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60209    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60210      # Going to short mode and back again did indeed matter. Since short mode is
60211      # case insensitive, let's make it lowercase to improve readability.
60212      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60213      # Now convert it back to Unix-style (cygpath)
60214      input_path=`$CYGPATH -u "$shortmode_path"`
60215      new_path="$input_path"
60216    fi
60217  fi
60218
60219  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60220  if test "x$test_cygdrive_prefix" = x; then
60221    # As a simple fix, exclude /usr/bin since it's not a real path.
60222    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60223      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60224      # a path prefixed by /cygdrive for fixpath to work.
60225      new_path="$CYGWIN_ROOT_PATH$input_path"
60226    fi
60227  fi
60228
60229
60230  if test "x$path" != "x$new_path"; then
60231    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60232    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60233$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60234  fi
60235
60236    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60237
60238  path="$POTENTIAL_FREETYPE_LIB_PATH"
60239  has_colon=`$ECHO $path | $GREP ^.:`
60240  new_path="$path"
60241  if test "x$has_colon" = x; then
60242    # Not in mixed or Windows style, start by that.
60243    new_path=`cmd //c echo $path`
60244  fi
60245
60246
60247  input_path="$new_path"
60248  # Check if we need to convert this using DOS-style short mode. If the path
60249  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60250  # take no chances and rewrite it.
60251  # Note: m4 eats our [], so we need to use [ and ] instead.
60252  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60253  if test "x$has_forbidden_chars" != x; then
60254    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60255    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60256  fi
60257
60258
60259  windows_path="$new_path"
60260  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60261    unix_path=`$CYGPATH -u "$windows_path"`
60262    new_path="$unix_path"
60263  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60264    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60265    new_path="$unix_path"
60266  fi
60267
60268  if test "x$path" != "x$new_path"; then
60269    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60270    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60271$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60272  fi
60273
60274  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60275  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60276
60277    else
60278      # We're on a unix platform. Hooray! :)
60279      path="$POTENTIAL_FREETYPE_LIB_PATH"
60280      has_space=`$ECHO "$path" | $GREP " "`
60281      if test "x$has_space" != x; then
60282        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60283$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60284        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60285      fi
60286
60287      # Use eval to expand a potential ~
60288      eval path="$path"
60289      if test ! -f "$path" && test ! -d "$path"; then
60290        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60291      fi
60292
60293      if test -d "$path"; then
60294        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60295      else
60296        dir="`$DIRNAME "$path"`"
60297        base="`$BASENAME "$path"`"
60298        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60299      fi
60300    fi
60301  fi
60302
60303
60304    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60305    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60306$as_echo_n "checking for freetype includes... " >&6; }
60307    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60308$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60309    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60310    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60311$as_echo_n "checking for freetype libraries... " >&6; }
60312    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60313$as_echo "$FREETYPE_LIB_PATH" >&6; }
60314  fi
60315
60316
60317          if test "x$FOUND_FREETYPE" != xyes; then
60318            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
60319
60320  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60321  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60322  METHOD="well-known location"
60323
60324  # Let's start with an optimistic view of the world :-)
60325  FOUND_FREETYPE=yes
60326
60327  # First look for the canonical freetype main include file ft2build.h.
60328  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60329    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60330    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60331    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60332      # Fail.
60333      FOUND_FREETYPE=no
60334    fi
60335  fi
60336
60337  if test "x$FOUND_FREETYPE" = xyes; then
60338    # Include file found, let's continue the sanity check.
60339    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60340$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60341
60342    # Reset to default value
60343    FREETYPE_BASE_NAME=freetype
60344    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60345    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60346      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60347          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60348        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60349        # for the .6 version explicitly.
60350        FREETYPE_BASE_NAME=freetype.6
60351        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60352        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60353$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60354      else
60355        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60356$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60357        FOUND_FREETYPE=no
60358      fi
60359    else
60360      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60361        # On Windows, we will need both .lib and .dll file.
60362        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60363          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60364$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60365          FOUND_FREETYPE=no
60366        fi
60367      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60368          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60369        # Found lib in isa dir, use that instead.
60370        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60371        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60372$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60373      fi
60374    fi
60375  fi
60376
60377  if test "x$FOUND_FREETYPE" = xyes; then
60378
60379  # Only process if variable expands to non-empty
60380
60381  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60382    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60383
60384  # Input might be given as Windows format, start by converting to
60385  # unix format.
60386  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60387  new_path=`$CYGPATH -u "$path"`
60388
60389  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60390  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60391  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60392  # "foo.exe" is OK but "foo" is an error.
60393  #
60394  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60395  # It is also a way to make sure we got the proper file name for the real test later on.
60396  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60397  if test "x$test_shortpath" = x; then
60398    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60399$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60400    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60401  fi
60402
60403  # Call helper function which possibly converts this using DOS-style short mode.
60404  # If so, the updated path is stored in $new_path.
60405
60406  input_path="$new_path"
60407  # Check if we need to convert this using DOS-style short mode. If the path
60408  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60409  # take no chances and rewrite it.
60410  # Note: m4 eats our [], so we need to use [ and ] instead.
60411  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60412  if test "x$has_forbidden_chars" != x; then
60413    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60414    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60415    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60416    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60417      # Going to short mode and back again did indeed matter. Since short mode is
60418      # case insensitive, let's make it lowercase to improve readability.
60419      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60420      # Now convert it back to Unix-style (cygpath)
60421      input_path=`$CYGPATH -u "$shortmode_path"`
60422      new_path="$input_path"
60423    fi
60424  fi
60425
60426  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60427  if test "x$test_cygdrive_prefix" = x; then
60428    # As a simple fix, exclude /usr/bin since it's not a real path.
60429    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60430      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60431      # a path prefixed by /cygdrive for fixpath to work.
60432      new_path="$CYGWIN_ROOT_PATH$input_path"
60433    fi
60434  fi
60435
60436
60437  if test "x$path" != "x$new_path"; then
60438    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60439    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60440$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60441  fi
60442
60443    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60444
60445  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60446  has_colon=`$ECHO $path | $GREP ^.:`
60447  new_path="$path"
60448  if test "x$has_colon" = x; then
60449    # Not in mixed or Windows style, start by that.
60450    new_path=`cmd //c echo $path`
60451  fi
60452
60453
60454  input_path="$new_path"
60455  # Check if we need to convert this using DOS-style short mode. If the path
60456  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60457  # take no chances and rewrite it.
60458  # Note: m4 eats our [], so we need to use [ and ] instead.
60459  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60460  if test "x$has_forbidden_chars" != x; then
60461    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60462    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60463  fi
60464
60465
60466  windows_path="$new_path"
60467  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60468    unix_path=`$CYGPATH -u "$windows_path"`
60469    new_path="$unix_path"
60470  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60471    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60472    new_path="$unix_path"
60473  fi
60474
60475  if test "x$path" != "x$new_path"; then
60476    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60477    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60478$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60479  fi
60480
60481  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60482  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60483
60484    else
60485      # We're on a unix platform. Hooray! :)
60486      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60487      has_space=`$ECHO "$path" | $GREP " "`
60488      if test "x$has_space" != x; then
60489        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60490$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60491        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60492      fi
60493
60494      # Use eval to expand a potential ~
60495      eval path="$path"
60496      if test ! -f "$path" && test ! -d "$path"; then
60497        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60498      fi
60499
60500      if test -d "$path"; then
60501        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60502      else
60503        dir="`$DIRNAME "$path"`"
60504        base="`$BASENAME "$path"`"
60505        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60506      fi
60507    fi
60508  fi
60509
60510
60511  # Only process if variable expands to non-empty
60512
60513  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60514    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60515
60516  # Input might be given as Windows format, start by converting to
60517  # unix format.
60518  path="$POTENTIAL_FREETYPE_LIB_PATH"
60519  new_path=`$CYGPATH -u "$path"`
60520
60521  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60522  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60523  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60524  # "foo.exe" is OK but "foo" is an error.
60525  #
60526  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60527  # It is also a way to make sure we got the proper file name for the real test later on.
60528  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60529  if test "x$test_shortpath" = x; then
60530    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60531$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60532    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60533  fi
60534
60535  # Call helper function which possibly converts this using DOS-style short mode.
60536  # If so, the updated path is stored in $new_path.
60537
60538  input_path="$new_path"
60539  # Check if we need to convert this using DOS-style short mode. If the path
60540  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60541  # take no chances and rewrite it.
60542  # Note: m4 eats our [], so we need to use [ and ] instead.
60543  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60544  if test "x$has_forbidden_chars" != x; then
60545    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60546    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60547    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60548    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60549      # Going to short mode and back again did indeed matter. Since short mode is
60550      # case insensitive, let's make it lowercase to improve readability.
60551      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60552      # Now convert it back to Unix-style (cygpath)
60553      input_path=`$CYGPATH -u "$shortmode_path"`
60554      new_path="$input_path"
60555    fi
60556  fi
60557
60558  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60559  if test "x$test_cygdrive_prefix" = x; then
60560    # As a simple fix, exclude /usr/bin since it's not a real path.
60561    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60562      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60563      # a path prefixed by /cygdrive for fixpath to work.
60564      new_path="$CYGWIN_ROOT_PATH$input_path"
60565    fi
60566  fi
60567
60568
60569  if test "x$path" != "x$new_path"; then
60570    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60571    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60572$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60573  fi
60574
60575    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60576
60577  path="$POTENTIAL_FREETYPE_LIB_PATH"
60578  has_colon=`$ECHO $path | $GREP ^.:`
60579  new_path="$path"
60580  if test "x$has_colon" = x; then
60581    # Not in mixed or Windows style, start by that.
60582    new_path=`cmd //c echo $path`
60583  fi
60584
60585
60586  input_path="$new_path"
60587  # Check if we need to convert this using DOS-style short mode. If the path
60588  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60589  # take no chances and rewrite it.
60590  # Note: m4 eats our [], so we need to use [ and ] instead.
60591  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60592  if test "x$has_forbidden_chars" != x; then
60593    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60594    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60595  fi
60596
60597
60598  windows_path="$new_path"
60599  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60600    unix_path=`$CYGPATH -u "$windows_path"`
60601    new_path="$unix_path"
60602  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60603    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60604    new_path="$unix_path"
60605  fi
60606
60607  if test "x$path" != "x$new_path"; then
60608    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60609    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60610$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60611  fi
60612
60613  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60614  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60615
60616    else
60617      # We're on a unix platform. Hooray! :)
60618      path="$POTENTIAL_FREETYPE_LIB_PATH"
60619      has_space=`$ECHO "$path" | $GREP " "`
60620      if test "x$has_space" != x; then
60621        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60622$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60623        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60624      fi
60625
60626      # Use eval to expand a potential ~
60627      eval path="$path"
60628      if test ! -f "$path" && test ! -d "$path"; then
60629        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60630      fi
60631
60632      if test -d "$path"; then
60633        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60634      else
60635        dir="`$DIRNAME "$path"`"
60636        base="`$BASENAME "$path"`"
60637        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60638      fi
60639    fi
60640  fi
60641
60642
60643    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60644    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60645$as_echo_n "checking for freetype includes... " >&6; }
60646    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60647$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60648    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60649    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60650$as_echo_n "checking for freetype libraries... " >&6; }
60651    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60652$as_echo "$FREETYPE_LIB_PATH" >&6; }
60653  fi
60654
60655          fi
60656
60657          if test "x$OPENJDK_TARGET_OS" = xmacosx; then
60658            if test "x$FOUND_FREETYPE" != xyes; then
60659              # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
60660              FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
60661
60662  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60663  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60664  METHOD="well-known location"
60665
60666  # Let's start with an optimistic view of the world :-)
60667  FOUND_FREETYPE=yes
60668
60669  # First look for the canonical freetype main include file ft2build.h.
60670  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60671    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60672    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60673    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60674      # Fail.
60675      FOUND_FREETYPE=no
60676    fi
60677  fi
60678
60679  if test "x$FOUND_FREETYPE" = xyes; then
60680    # Include file found, let's continue the sanity check.
60681    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60682$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60683
60684    # Reset to default value
60685    FREETYPE_BASE_NAME=freetype
60686    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60687    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60688      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60689          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60690        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60691        # for the .6 version explicitly.
60692        FREETYPE_BASE_NAME=freetype.6
60693        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60694        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60695$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60696      else
60697        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60698$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60699        FOUND_FREETYPE=no
60700      fi
60701    else
60702      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60703        # On Windows, we will need both .lib and .dll file.
60704        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60705          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60706$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60707          FOUND_FREETYPE=no
60708        fi
60709      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60710          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60711        # Found lib in isa dir, use that instead.
60712        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60713        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60714$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60715      fi
60716    fi
60717  fi
60718
60719  if test "x$FOUND_FREETYPE" = xyes; then
60720
60721  # Only process if variable expands to non-empty
60722
60723  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60724    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60725
60726  # Input might be given as Windows format, start by converting to
60727  # unix format.
60728  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60729  new_path=`$CYGPATH -u "$path"`
60730
60731  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60732  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60733  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60734  # "foo.exe" is OK but "foo" is an error.
60735  #
60736  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60737  # It is also a way to make sure we got the proper file name for the real test later on.
60738  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60739  if test "x$test_shortpath" = x; then
60740    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60741$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60742    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60743  fi
60744
60745  # Call helper function which possibly converts this using DOS-style short mode.
60746  # If so, the updated path is stored in $new_path.
60747
60748  input_path="$new_path"
60749  # Check if we need to convert this using DOS-style short mode. If the path
60750  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60751  # take no chances and rewrite it.
60752  # Note: m4 eats our [], so we need to use [ and ] instead.
60753  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60754  if test "x$has_forbidden_chars" != x; then
60755    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60756    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60757    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60758    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60759      # Going to short mode and back again did indeed matter. Since short mode is
60760      # case insensitive, let's make it lowercase to improve readability.
60761      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60762      # Now convert it back to Unix-style (cygpath)
60763      input_path=`$CYGPATH -u "$shortmode_path"`
60764      new_path="$input_path"
60765    fi
60766  fi
60767
60768  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60769  if test "x$test_cygdrive_prefix" = x; then
60770    # As a simple fix, exclude /usr/bin since it's not a real path.
60771    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60772      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60773      # a path prefixed by /cygdrive for fixpath to work.
60774      new_path="$CYGWIN_ROOT_PATH$input_path"
60775    fi
60776  fi
60777
60778
60779  if test "x$path" != "x$new_path"; then
60780    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60781    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60782$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60783  fi
60784
60785    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60786
60787  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60788  has_colon=`$ECHO $path | $GREP ^.:`
60789  new_path="$path"
60790  if test "x$has_colon" = x; then
60791    # Not in mixed or Windows style, start by that.
60792    new_path=`cmd //c echo $path`
60793  fi
60794
60795
60796  input_path="$new_path"
60797  # Check if we need to convert this using DOS-style short mode. If the path
60798  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60799  # take no chances and rewrite it.
60800  # Note: m4 eats our [], so we need to use [ and ] instead.
60801  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60802  if test "x$has_forbidden_chars" != x; then
60803    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60804    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60805  fi
60806
60807
60808  windows_path="$new_path"
60809  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60810    unix_path=`$CYGPATH -u "$windows_path"`
60811    new_path="$unix_path"
60812  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60813    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60814    new_path="$unix_path"
60815  fi
60816
60817  if test "x$path" != "x$new_path"; then
60818    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60819    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60820$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60821  fi
60822
60823  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60824  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60825
60826    else
60827      # We're on a unix platform. Hooray! :)
60828      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60829      has_space=`$ECHO "$path" | $GREP " "`
60830      if test "x$has_space" != x; then
60831        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60832$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60833        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60834      fi
60835
60836      # Use eval to expand a potential ~
60837      eval path="$path"
60838      if test ! -f "$path" && test ! -d "$path"; then
60839        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60840      fi
60841
60842      if test -d "$path"; then
60843        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60844      else
60845        dir="`$DIRNAME "$path"`"
60846        base="`$BASENAME "$path"`"
60847        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60848      fi
60849    fi
60850  fi
60851
60852
60853  # Only process if variable expands to non-empty
60854
60855  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60856    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60857
60858  # Input might be given as Windows format, start by converting to
60859  # unix format.
60860  path="$POTENTIAL_FREETYPE_LIB_PATH"
60861  new_path=`$CYGPATH -u "$path"`
60862
60863  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60864  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60865  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60866  # "foo.exe" is OK but "foo" is an error.
60867  #
60868  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60869  # It is also a way to make sure we got the proper file name for the real test later on.
60870  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60871  if test "x$test_shortpath" = x; then
60872    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60873$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60874    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60875  fi
60876
60877  # Call helper function which possibly converts this using DOS-style short mode.
60878  # If so, the updated path is stored in $new_path.
60879
60880  input_path="$new_path"
60881  # Check if we need to convert this using DOS-style short mode. If the path
60882  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60883  # take no chances and rewrite it.
60884  # Note: m4 eats our [], so we need to use [ and ] instead.
60885  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60886  if test "x$has_forbidden_chars" != x; then
60887    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60888    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60889    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60890    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60891      # Going to short mode and back again did indeed matter. Since short mode is
60892      # case insensitive, let's make it lowercase to improve readability.
60893      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60894      # Now convert it back to Unix-style (cygpath)
60895      input_path=`$CYGPATH -u "$shortmode_path"`
60896      new_path="$input_path"
60897    fi
60898  fi
60899
60900  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60901  if test "x$test_cygdrive_prefix" = x; then
60902    # As a simple fix, exclude /usr/bin since it's not a real path.
60903    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60904      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60905      # a path prefixed by /cygdrive for fixpath to work.
60906      new_path="$CYGWIN_ROOT_PATH$input_path"
60907    fi
60908  fi
60909
60910
60911  if test "x$path" != "x$new_path"; then
60912    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60913    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60914$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60915  fi
60916
60917    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60918
60919  path="$POTENTIAL_FREETYPE_LIB_PATH"
60920  has_colon=`$ECHO $path | $GREP ^.:`
60921  new_path="$path"
60922  if test "x$has_colon" = x; then
60923    # Not in mixed or Windows style, start by that.
60924    new_path=`cmd //c echo $path`
60925  fi
60926
60927
60928  input_path="$new_path"
60929  # Check if we need to convert this using DOS-style short mode. If the path
60930  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60931  # take no chances and rewrite it.
60932  # Note: m4 eats our [], so we need to use [ and ] instead.
60933  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60934  if test "x$has_forbidden_chars" != x; then
60935    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60936    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60937  fi
60938
60939
60940  windows_path="$new_path"
60941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60942    unix_path=`$CYGPATH -u "$windows_path"`
60943    new_path="$unix_path"
60944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60945    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60946    new_path="$unix_path"
60947  fi
60948
60949  if test "x$path" != "x$new_path"; then
60950    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60951    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60952$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60953  fi
60954
60955  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60956  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60957
60958    else
60959      # We're on a unix platform. Hooray! :)
60960      path="$POTENTIAL_FREETYPE_LIB_PATH"
60961      has_space=`$ECHO "$path" | $GREP " "`
60962      if test "x$has_space" != x; then
60963        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60964$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60965        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60966      fi
60967
60968      # Use eval to expand a potential ~
60969      eval path="$path"
60970      if test ! -f "$path" && test ! -d "$path"; then
60971        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60972      fi
60973
60974      if test -d "$path"; then
60975        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60976      else
60977        dir="`$DIRNAME "$path"`"
60978        base="`$BASENAME "$path"`"
60979        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60980      fi
60981    fi
60982  fi
60983
60984
60985    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60986    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60987$as_echo_n "checking for freetype includes... " >&6; }
60988    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60989$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60990    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60991    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60992$as_echo_n "checking for freetype libraries... " >&6; }
60993    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60994$as_echo "$FREETYPE_LIB_PATH" >&6; }
60995  fi
60996
60997            fi
60998          fi
60999
61000          if test "x$FOUND_FREETYPE" != xyes; then
61001            FREETYPE_BASE_DIR="$SYSROOT/usr"
61002            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
61003
61004  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61005  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
61006  METHOD="well-known location"
61007
61008  # Let's start with an optimistic view of the world :-)
61009  FOUND_FREETYPE=yes
61010
61011  # First look for the canonical freetype main include file ft2build.h.
61012  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61013    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61014    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61015    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61016      # Fail.
61017      FOUND_FREETYPE=no
61018    fi
61019  fi
61020
61021  if test "x$FOUND_FREETYPE" = xyes; then
61022    # Include file found, let's continue the sanity check.
61023    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61024$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61025
61026    # Reset to default value
61027    FREETYPE_BASE_NAME=freetype
61028    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61029    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61030      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61031          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61032        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61033        # for the .6 version explicitly.
61034        FREETYPE_BASE_NAME=freetype.6
61035        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61036        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61037$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61038      else
61039        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61040$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61041        FOUND_FREETYPE=no
61042      fi
61043    else
61044      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61045        # On Windows, we will need both .lib and .dll file.
61046        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61047          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61048$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61049          FOUND_FREETYPE=no
61050        fi
61051      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61052          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61053        # Found lib in isa dir, use that instead.
61054        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61055        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61056$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61057      fi
61058    fi
61059  fi
61060
61061  if test "x$FOUND_FREETYPE" = xyes; then
61062
61063  # Only process if variable expands to non-empty
61064
61065  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61066    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61067
61068  # Input might be given as Windows format, start by converting to
61069  # unix format.
61070  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61071  new_path=`$CYGPATH -u "$path"`
61072
61073  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61074  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61075  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61076  # "foo.exe" is OK but "foo" is an error.
61077  #
61078  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61079  # It is also a way to make sure we got the proper file name for the real test later on.
61080  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61081  if test "x$test_shortpath" = x; then
61082    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61083$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61084    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61085  fi
61086
61087  # Call helper function which possibly converts this using DOS-style short mode.
61088  # If so, the updated path is stored in $new_path.
61089
61090  input_path="$new_path"
61091  # Check if we need to convert this using DOS-style short mode. If the path
61092  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61093  # take no chances and rewrite it.
61094  # Note: m4 eats our [], so we need to use [ and ] instead.
61095  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61096  if test "x$has_forbidden_chars" != x; then
61097    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61098    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61099    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61100    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61101      # Going to short mode and back again did indeed matter. Since short mode is
61102      # case insensitive, let's make it lowercase to improve readability.
61103      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61104      # Now convert it back to Unix-style (cygpath)
61105      input_path=`$CYGPATH -u "$shortmode_path"`
61106      new_path="$input_path"
61107    fi
61108  fi
61109
61110  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61111  if test "x$test_cygdrive_prefix" = x; then
61112    # As a simple fix, exclude /usr/bin since it's not a real path.
61113    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61114      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61115      # a path prefixed by /cygdrive for fixpath to work.
61116      new_path="$CYGWIN_ROOT_PATH$input_path"
61117    fi
61118  fi
61119
61120
61121  if test "x$path" != "x$new_path"; then
61122    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61123    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61124$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61125  fi
61126
61127    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61128
61129  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61130  has_colon=`$ECHO $path | $GREP ^.:`
61131  new_path="$path"
61132  if test "x$has_colon" = x; then
61133    # Not in mixed or Windows style, start by that.
61134    new_path=`cmd //c echo $path`
61135  fi
61136
61137
61138  input_path="$new_path"
61139  # Check if we need to convert this using DOS-style short mode. If the path
61140  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61141  # take no chances and rewrite it.
61142  # Note: m4 eats our [], so we need to use [ and ] instead.
61143  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61144  if test "x$has_forbidden_chars" != x; then
61145    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61146    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61147  fi
61148
61149
61150  windows_path="$new_path"
61151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61152    unix_path=`$CYGPATH -u "$windows_path"`
61153    new_path="$unix_path"
61154  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61155    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61156    new_path="$unix_path"
61157  fi
61158
61159  if test "x$path" != "x$new_path"; then
61160    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61161    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61162$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61163  fi
61164
61165  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61166  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61167
61168    else
61169      # We're on a unix platform. Hooray! :)
61170      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61171      has_space=`$ECHO "$path" | $GREP " "`
61172      if test "x$has_space" != x; then
61173        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61174$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61175        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61176      fi
61177
61178      # Use eval to expand a potential ~
61179      eval path="$path"
61180      if test ! -f "$path" && test ! -d "$path"; then
61181        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61182      fi
61183
61184      if test -d "$path"; then
61185        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61186      else
61187        dir="`$DIRNAME "$path"`"
61188        base="`$BASENAME "$path"`"
61189        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61190      fi
61191    fi
61192  fi
61193
61194
61195  # Only process if variable expands to non-empty
61196
61197  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61198    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61199
61200  # Input might be given as Windows format, start by converting to
61201  # unix format.
61202  path="$POTENTIAL_FREETYPE_LIB_PATH"
61203  new_path=`$CYGPATH -u "$path"`
61204
61205  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61206  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61207  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61208  # "foo.exe" is OK but "foo" is an error.
61209  #
61210  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61211  # It is also a way to make sure we got the proper file name for the real test later on.
61212  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61213  if test "x$test_shortpath" = x; then
61214    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61215$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61216    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61217  fi
61218
61219  # Call helper function which possibly converts this using DOS-style short mode.
61220  # If so, the updated path is stored in $new_path.
61221
61222  input_path="$new_path"
61223  # Check if we need to convert this using DOS-style short mode. If the path
61224  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61225  # take no chances and rewrite it.
61226  # Note: m4 eats our [], so we need to use [ and ] instead.
61227  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61228  if test "x$has_forbidden_chars" != x; then
61229    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61230    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61231    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61232    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61233      # Going to short mode and back again did indeed matter. Since short mode is
61234      # case insensitive, let's make it lowercase to improve readability.
61235      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61236      # Now convert it back to Unix-style (cygpath)
61237      input_path=`$CYGPATH -u "$shortmode_path"`
61238      new_path="$input_path"
61239    fi
61240  fi
61241
61242  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61243  if test "x$test_cygdrive_prefix" = x; then
61244    # As a simple fix, exclude /usr/bin since it's not a real path.
61245    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61246      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61247      # a path prefixed by /cygdrive for fixpath to work.
61248      new_path="$CYGWIN_ROOT_PATH$input_path"
61249    fi
61250  fi
61251
61252
61253  if test "x$path" != "x$new_path"; then
61254    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61255    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61256$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61257  fi
61258
61259    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61260
61261  path="$POTENTIAL_FREETYPE_LIB_PATH"
61262  has_colon=`$ECHO $path | $GREP ^.:`
61263  new_path="$path"
61264  if test "x$has_colon" = x; then
61265    # Not in mixed or Windows style, start by that.
61266    new_path=`cmd //c echo $path`
61267  fi
61268
61269
61270  input_path="$new_path"
61271  # Check if we need to convert this using DOS-style short mode. If the path
61272  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61273  # take no chances and rewrite it.
61274  # Note: m4 eats our [], so we need to use [ and ] instead.
61275  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61276  if test "x$has_forbidden_chars" != x; then
61277    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61278    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61279  fi
61280
61281
61282  windows_path="$new_path"
61283  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61284    unix_path=`$CYGPATH -u "$windows_path"`
61285    new_path="$unix_path"
61286  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61287    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61288    new_path="$unix_path"
61289  fi
61290
61291  if test "x$path" != "x$new_path"; then
61292    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61293    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61294$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61295  fi
61296
61297  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61298  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61299
61300    else
61301      # We're on a unix platform. Hooray! :)
61302      path="$POTENTIAL_FREETYPE_LIB_PATH"
61303      has_space=`$ECHO "$path" | $GREP " "`
61304      if test "x$has_space" != x; then
61305        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61306$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61307        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61308      fi
61309
61310      # Use eval to expand a potential ~
61311      eval path="$path"
61312      if test ! -f "$path" && test ! -d "$path"; then
61313        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61314      fi
61315
61316      if test -d "$path"; then
61317        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61318      else
61319        dir="`$DIRNAME "$path"`"
61320        base="`$BASENAME "$path"`"
61321        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61322      fi
61323    fi
61324  fi
61325
61326
61327    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61328    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61329$as_echo_n "checking for freetype includes... " >&6; }
61330    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61331$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61332    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61333    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61334$as_echo_n "checking for freetype libraries... " >&6; }
61335    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61336$as_echo "$FREETYPE_LIB_PATH" >&6; }
61337  fi
61338
61339            else
61340
61341  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61342  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
61343  METHOD="well-known location"
61344
61345  # Let's start with an optimistic view of the world :-)
61346  FOUND_FREETYPE=yes
61347
61348  # First look for the canonical freetype main include file ft2build.h.
61349  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61350    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61351    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61352    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61353      # Fail.
61354      FOUND_FREETYPE=no
61355    fi
61356  fi
61357
61358  if test "x$FOUND_FREETYPE" = xyes; then
61359    # Include file found, let's continue the sanity check.
61360    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61361$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61362
61363    # Reset to default value
61364    FREETYPE_BASE_NAME=freetype
61365    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61366    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61367      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61368          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61369        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61370        # for the .6 version explicitly.
61371        FREETYPE_BASE_NAME=freetype.6
61372        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61373        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61374$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61375      else
61376        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61377$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61378        FOUND_FREETYPE=no
61379      fi
61380    else
61381      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61382        # On Windows, we will need both .lib and .dll file.
61383        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61384          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61385$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61386          FOUND_FREETYPE=no
61387        fi
61388      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61389          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61390        # Found lib in isa dir, use that instead.
61391        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61392        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61393$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61394      fi
61395    fi
61396  fi
61397
61398  if test "x$FOUND_FREETYPE" = xyes; then
61399
61400  # Only process if variable expands to non-empty
61401
61402  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61403    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61404
61405  # Input might be given as Windows format, start by converting to
61406  # unix format.
61407  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61408  new_path=`$CYGPATH -u "$path"`
61409
61410  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61411  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61412  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61413  # "foo.exe" is OK but "foo" is an error.
61414  #
61415  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61416  # It is also a way to make sure we got the proper file name for the real test later on.
61417  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61418  if test "x$test_shortpath" = x; then
61419    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61420$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61421    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61422  fi
61423
61424  # Call helper function which possibly converts this using DOS-style short mode.
61425  # If so, the updated path is stored in $new_path.
61426
61427  input_path="$new_path"
61428  # Check if we need to convert this using DOS-style short mode. If the path
61429  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61430  # take no chances and rewrite it.
61431  # Note: m4 eats our [], so we need to use [ and ] instead.
61432  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61433  if test "x$has_forbidden_chars" != x; then
61434    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61435    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61436    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61437    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61438      # Going to short mode and back again did indeed matter. Since short mode is
61439      # case insensitive, let's make it lowercase to improve readability.
61440      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61441      # Now convert it back to Unix-style (cygpath)
61442      input_path=`$CYGPATH -u "$shortmode_path"`
61443      new_path="$input_path"
61444    fi
61445  fi
61446
61447  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61448  if test "x$test_cygdrive_prefix" = x; then
61449    # As a simple fix, exclude /usr/bin since it's not a real path.
61450    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61451      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61452      # a path prefixed by /cygdrive for fixpath to work.
61453      new_path="$CYGWIN_ROOT_PATH$input_path"
61454    fi
61455  fi
61456
61457
61458  if test "x$path" != "x$new_path"; then
61459    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61460    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61461$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61462  fi
61463
61464    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61465
61466  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61467  has_colon=`$ECHO $path | $GREP ^.:`
61468  new_path="$path"
61469  if test "x$has_colon" = x; then
61470    # Not in mixed or Windows style, start by that.
61471    new_path=`cmd //c echo $path`
61472  fi
61473
61474
61475  input_path="$new_path"
61476  # Check if we need to convert this using DOS-style short mode. If the path
61477  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61478  # take no chances and rewrite it.
61479  # Note: m4 eats our [], so we need to use [ and ] instead.
61480  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61481  if test "x$has_forbidden_chars" != x; then
61482    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61483    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61484  fi
61485
61486
61487  windows_path="$new_path"
61488  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61489    unix_path=`$CYGPATH -u "$windows_path"`
61490    new_path="$unix_path"
61491  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61492    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61493    new_path="$unix_path"
61494  fi
61495
61496  if test "x$path" != "x$new_path"; then
61497    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61498    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61499$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61500  fi
61501
61502  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61503  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61504
61505    else
61506      # We're on a unix platform. Hooray! :)
61507      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61508      has_space=`$ECHO "$path" | $GREP " "`
61509      if test "x$has_space" != x; then
61510        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61511$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61512        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61513      fi
61514
61515      # Use eval to expand a potential ~
61516      eval path="$path"
61517      if test ! -f "$path" && test ! -d "$path"; then
61518        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61519      fi
61520
61521      if test -d "$path"; then
61522        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61523      else
61524        dir="`$DIRNAME "$path"`"
61525        base="`$BASENAME "$path"`"
61526        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61527      fi
61528    fi
61529  fi
61530
61531
61532  # Only process if variable expands to non-empty
61533
61534  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61535    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61536
61537  # Input might be given as Windows format, start by converting to
61538  # unix format.
61539  path="$POTENTIAL_FREETYPE_LIB_PATH"
61540  new_path=`$CYGPATH -u "$path"`
61541
61542  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61543  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61544  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61545  # "foo.exe" is OK but "foo" is an error.
61546  #
61547  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61548  # It is also a way to make sure we got the proper file name for the real test later on.
61549  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61550  if test "x$test_shortpath" = x; then
61551    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61552$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61553    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61554  fi
61555
61556  # Call helper function which possibly converts this using DOS-style short mode.
61557  # If so, the updated path is stored in $new_path.
61558
61559  input_path="$new_path"
61560  # Check if we need to convert this using DOS-style short mode. If the path
61561  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61562  # take no chances and rewrite it.
61563  # Note: m4 eats our [], so we need to use [ and ] instead.
61564  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61565  if test "x$has_forbidden_chars" != x; then
61566    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61567    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61568    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61569    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61570      # Going to short mode and back again did indeed matter. Since short mode is
61571      # case insensitive, let's make it lowercase to improve readability.
61572      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61573      # Now convert it back to Unix-style (cygpath)
61574      input_path=`$CYGPATH -u "$shortmode_path"`
61575      new_path="$input_path"
61576    fi
61577  fi
61578
61579  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61580  if test "x$test_cygdrive_prefix" = x; then
61581    # As a simple fix, exclude /usr/bin since it's not a real path.
61582    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61583      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61584      # a path prefixed by /cygdrive for fixpath to work.
61585      new_path="$CYGWIN_ROOT_PATH$input_path"
61586    fi
61587  fi
61588
61589
61590  if test "x$path" != "x$new_path"; then
61591    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61592    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61593$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61594  fi
61595
61596    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61597
61598  path="$POTENTIAL_FREETYPE_LIB_PATH"
61599  has_colon=`$ECHO $path | $GREP ^.:`
61600  new_path="$path"
61601  if test "x$has_colon" = x; then
61602    # Not in mixed or Windows style, start by that.
61603    new_path=`cmd //c echo $path`
61604  fi
61605
61606
61607  input_path="$new_path"
61608  # Check if we need to convert this using DOS-style short mode. If the path
61609  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61610  # take no chances and rewrite it.
61611  # Note: m4 eats our [], so we need to use [ and ] instead.
61612  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61613  if test "x$has_forbidden_chars" != x; then
61614    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61615    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61616  fi
61617
61618
61619  windows_path="$new_path"
61620  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61621    unix_path=`$CYGPATH -u "$windows_path"`
61622    new_path="$unix_path"
61623  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61624    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61625    new_path="$unix_path"
61626  fi
61627
61628  if test "x$path" != "x$new_path"; then
61629    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61630    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61631$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61632  fi
61633
61634  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61635  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61636
61637    else
61638      # We're on a unix platform. Hooray! :)
61639      path="$POTENTIAL_FREETYPE_LIB_PATH"
61640      has_space=`$ECHO "$path" | $GREP " "`
61641      if test "x$has_space" != x; then
61642        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61643$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61644        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61645      fi
61646
61647      # Use eval to expand a potential ~
61648      eval path="$path"
61649      if test ! -f "$path" && test ! -d "$path"; then
61650        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61651      fi
61652
61653      if test -d "$path"; then
61654        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61655      else
61656        dir="`$DIRNAME "$path"`"
61657        base="`$BASENAME "$path"`"
61658        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61659      fi
61660    fi
61661  fi
61662
61663
61664    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61665    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61666$as_echo_n "checking for freetype includes... " >&6; }
61667    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61668$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61669    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61670    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61671$as_echo_n "checking for freetype libraries... " >&6; }
61672    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61673$as_echo "$FREETYPE_LIB_PATH" >&6; }
61674  fi
61675
61676              if test "x$FOUND_FREETYPE" != xyes; then
61677
61678  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61679  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
61680  METHOD="well-known location"
61681
61682  # Let's start with an optimistic view of the world :-)
61683  FOUND_FREETYPE=yes
61684
61685  # First look for the canonical freetype main include file ft2build.h.
61686  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61687    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61688    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61689    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61690      # Fail.
61691      FOUND_FREETYPE=no
61692    fi
61693  fi
61694
61695  if test "x$FOUND_FREETYPE" = xyes; then
61696    # Include file found, let's continue the sanity check.
61697    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61698$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61699
61700    # Reset to default value
61701    FREETYPE_BASE_NAME=freetype
61702    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61703    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61704      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61705          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61706        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61707        # for the .6 version explicitly.
61708        FREETYPE_BASE_NAME=freetype.6
61709        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61710        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61711$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61712      else
61713        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61714$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61715        FOUND_FREETYPE=no
61716      fi
61717    else
61718      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61719        # On Windows, we will need both .lib and .dll file.
61720        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61721          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61722$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61723          FOUND_FREETYPE=no
61724        fi
61725      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61726          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61727        # Found lib in isa dir, use that instead.
61728        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61729        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61730$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61731      fi
61732    fi
61733  fi
61734
61735  if test "x$FOUND_FREETYPE" = xyes; then
61736
61737  # Only process if variable expands to non-empty
61738
61739  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61740    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61741
61742  # Input might be given as Windows format, start by converting to
61743  # unix format.
61744  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61745  new_path=`$CYGPATH -u "$path"`
61746
61747  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61748  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61749  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61750  # "foo.exe" is OK but "foo" is an error.
61751  #
61752  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61753  # It is also a way to make sure we got the proper file name for the real test later on.
61754  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61755  if test "x$test_shortpath" = x; then
61756    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61757$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61758    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61759  fi
61760
61761  # Call helper function which possibly converts this using DOS-style short mode.
61762  # If so, the updated path is stored in $new_path.
61763
61764  input_path="$new_path"
61765  # Check if we need to convert this using DOS-style short mode. If the path
61766  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61767  # take no chances and rewrite it.
61768  # Note: m4 eats our [], so we need to use [ and ] instead.
61769  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61770  if test "x$has_forbidden_chars" != x; then
61771    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61772    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61773    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61774    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61775      # Going to short mode and back again did indeed matter. Since short mode is
61776      # case insensitive, let's make it lowercase to improve readability.
61777      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61778      # Now convert it back to Unix-style (cygpath)
61779      input_path=`$CYGPATH -u "$shortmode_path"`
61780      new_path="$input_path"
61781    fi
61782  fi
61783
61784  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61785  if test "x$test_cygdrive_prefix" = x; then
61786    # As a simple fix, exclude /usr/bin since it's not a real path.
61787    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61788      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61789      # a path prefixed by /cygdrive for fixpath to work.
61790      new_path="$CYGWIN_ROOT_PATH$input_path"
61791    fi
61792  fi
61793
61794
61795  if test "x$path" != "x$new_path"; then
61796    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61797    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61798$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61799  fi
61800
61801    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61802
61803  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61804  has_colon=`$ECHO $path | $GREP ^.:`
61805  new_path="$path"
61806  if test "x$has_colon" = x; then
61807    # Not in mixed or Windows style, start by that.
61808    new_path=`cmd //c echo $path`
61809  fi
61810
61811
61812  input_path="$new_path"
61813  # Check if we need to convert this using DOS-style short mode. If the path
61814  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61815  # take no chances and rewrite it.
61816  # Note: m4 eats our [], so we need to use [ and ] instead.
61817  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61818  if test "x$has_forbidden_chars" != x; then
61819    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61820    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61821  fi
61822
61823
61824  windows_path="$new_path"
61825  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61826    unix_path=`$CYGPATH -u "$windows_path"`
61827    new_path="$unix_path"
61828  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61829    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61830    new_path="$unix_path"
61831  fi
61832
61833  if test "x$path" != "x$new_path"; then
61834    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61835    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61836$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61837  fi
61838
61839  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61840  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61841
61842    else
61843      # We're on a unix platform. Hooray! :)
61844      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61845      has_space=`$ECHO "$path" | $GREP " "`
61846      if test "x$has_space" != x; then
61847        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61848$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61849        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61850      fi
61851
61852      # Use eval to expand a potential ~
61853      eval path="$path"
61854      if test ! -f "$path" && test ! -d "$path"; then
61855        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61856      fi
61857
61858      if test -d "$path"; then
61859        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61860      else
61861        dir="`$DIRNAME "$path"`"
61862        base="`$BASENAME "$path"`"
61863        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61864      fi
61865    fi
61866  fi
61867
61868
61869  # Only process if variable expands to non-empty
61870
61871  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61872    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61873
61874  # Input might be given as Windows format, start by converting to
61875  # unix format.
61876  path="$POTENTIAL_FREETYPE_LIB_PATH"
61877  new_path=`$CYGPATH -u "$path"`
61878
61879  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61880  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61881  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61882  # "foo.exe" is OK but "foo" is an error.
61883  #
61884  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61885  # It is also a way to make sure we got the proper file name for the real test later on.
61886  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61887  if test "x$test_shortpath" = x; then
61888    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61889$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61890    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61891  fi
61892
61893  # Call helper function which possibly converts this using DOS-style short mode.
61894  # If so, the updated path is stored in $new_path.
61895
61896  input_path="$new_path"
61897  # Check if we need to convert this using DOS-style short mode. If the path
61898  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61899  # take no chances and rewrite it.
61900  # Note: m4 eats our [], so we need to use [ and ] instead.
61901  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61902  if test "x$has_forbidden_chars" != x; then
61903    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61904    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61905    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61906    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61907      # Going to short mode and back again did indeed matter. Since short mode is
61908      # case insensitive, let's make it lowercase to improve readability.
61909      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61910      # Now convert it back to Unix-style (cygpath)
61911      input_path=`$CYGPATH -u "$shortmode_path"`
61912      new_path="$input_path"
61913    fi
61914  fi
61915
61916  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61917  if test "x$test_cygdrive_prefix" = x; then
61918    # As a simple fix, exclude /usr/bin since it's not a real path.
61919    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61920      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61921      # a path prefixed by /cygdrive for fixpath to work.
61922      new_path="$CYGWIN_ROOT_PATH$input_path"
61923    fi
61924  fi
61925
61926
61927  if test "x$path" != "x$new_path"; then
61928    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61929    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61930$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61931  fi
61932
61933    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61934
61935  path="$POTENTIAL_FREETYPE_LIB_PATH"
61936  has_colon=`$ECHO $path | $GREP ^.:`
61937  new_path="$path"
61938  if test "x$has_colon" = x; then
61939    # Not in mixed or Windows style, start by that.
61940    new_path=`cmd //c echo $path`
61941  fi
61942
61943
61944  input_path="$new_path"
61945  # Check if we need to convert this using DOS-style short mode. If the path
61946  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61947  # take no chances and rewrite it.
61948  # Note: m4 eats our [], so we need to use [ and ] instead.
61949  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61950  if test "x$has_forbidden_chars" != x; then
61951    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61952    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61953  fi
61954
61955
61956  windows_path="$new_path"
61957  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61958    unix_path=`$CYGPATH -u "$windows_path"`
61959    new_path="$unix_path"
61960  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61961    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61962    new_path="$unix_path"
61963  fi
61964
61965  if test "x$path" != "x$new_path"; then
61966    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61967    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61968$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61969  fi
61970
61971  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61972  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61973
61974    else
61975      # We're on a unix platform. Hooray! :)
61976      path="$POTENTIAL_FREETYPE_LIB_PATH"
61977      has_space=`$ECHO "$path" | $GREP " "`
61978      if test "x$has_space" != x; then
61979        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61980$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61981        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61982      fi
61983
61984      # Use eval to expand a potential ~
61985      eval path="$path"
61986      if test ! -f "$path" && test ! -d "$path"; then
61987        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61988      fi
61989
61990      if test -d "$path"; then
61991        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61992      else
61993        dir="`$DIRNAME "$path"`"
61994        base="`$BASENAME "$path"`"
61995        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61996      fi
61997    fi
61998  fi
61999
62000
62001    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62002    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62003$as_echo_n "checking for freetype includes... " >&6; }
62004    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62005$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62006    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62007    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62008$as_echo_n "checking for freetype libraries... " >&6; }
62009    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62010$as_echo "$FREETYPE_LIB_PATH" >&6; }
62011  fi
62012
62013              fi
62014            fi
62015          fi
62016        fi
62017      fi # end check in well-known locations
62018
62019      if test "x$FOUND_FREETYPE" != xyes; then
62020
62021  # Print a helpful message on how to acquire the necessary build dependency.
62022  # freetype is the help tag: freetype, cups, alsa etc
62023  MISSING_DEPENDENCY=freetype
62024
62025  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62026    cygwin_help $MISSING_DEPENDENCY
62027  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62028    msys_help $MISSING_DEPENDENCY
62029  else
62030    PKGHANDLER_COMMAND=
62031
62032    case $PKGHANDLER in
62033      apt-get)
62034        apt_help     $MISSING_DEPENDENCY ;;
62035      yum)
62036        yum_help     $MISSING_DEPENDENCY ;;
62037      port)
62038        port_help    $MISSING_DEPENDENCY ;;
62039      pkgutil)
62040        pkgutil_help $MISSING_DEPENDENCY ;;
62041      pkgadd)
62042        pkgadd_help  $MISSING_DEPENDENCY ;;
62043    esac
62044
62045    if test "x$PKGHANDLER_COMMAND" != x; then
62046      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62047    fi
62048  fi
62049
62050        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
62051      fi
62052    fi # end user specified settings
62053
62054    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
62055    if test "x$FREETYPE_CFLAGS" = x; then
62056
62057  # Only process if variable expands to non-empty
62058
62059  if test "x$FREETYPE_INCLUDE_PATH" != x; then
62060    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62061
62062  # Input might be given as Windows format, start by converting to
62063  # unix format.
62064  path="$FREETYPE_INCLUDE_PATH"
62065  new_path=`$CYGPATH -u "$path"`
62066
62067  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62068  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62069  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62070  # "foo.exe" is OK but "foo" is an error.
62071  #
62072  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62073  # It is also a way to make sure we got the proper file name for the real test later on.
62074  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62075  if test "x$test_shortpath" = x; then
62076    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62077$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62078    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
62079  fi
62080
62081  # Call helper function which possibly converts this using DOS-style short mode.
62082  # If so, the updated path is stored in $new_path.
62083
62084  input_path="$new_path"
62085  # Check if we need to convert this using DOS-style short mode. If the path
62086  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62087  # take no chances and rewrite it.
62088  # Note: m4 eats our [], so we need to use [ and ] instead.
62089  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62090  if test "x$has_forbidden_chars" != x; then
62091    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62092    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62093    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62094    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62095      # Going to short mode and back again did indeed matter. Since short mode is
62096      # case insensitive, let's make it lowercase to improve readability.
62097      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62098      # Now convert it back to Unix-style (cygpath)
62099      input_path=`$CYGPATH -u "$shortmode_path"`
62100      new_path="$input_path"
62101    fi
62102  fi
62103
62104  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62105  if test "x$test_cygdrive_prefix" = x; then
62106    # As a simple fix, exclude /usr/bin since it's not a real path.
62107    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62108      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62109      # a path prefixed by /cygdrive for fixpath to work.
62110      new_path="$CYGWIN_ROOT_PATH$input_path"
62111    fi
62112  fi
62113
62114
62115  if test "x$path" != "x$new_path"; then
62116    FREETYPE_INCLUDE_PATH="$new_path"
62117    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62118$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62119  fi
62120
62121    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62122
62123  path="$FREETYPE_INCLUDE_PATH"
62124  has_colon=`$ECHO $path | $GREP ^.:`
62125  new_path="$path"
62126  if test "x$has_colon" = x; then
62127    # Not in mixed or Windows style, start by that.
62128    new_path=`cmd //c echo $path`
62129  fi
62130
62131
62132  input_path="$new_path"
62133  # Check if we need to convert this using DOS-style short mode. If the path
62134  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62135  # take no chances and rewrite it.
62136  # Note: m4 eats our [], so we need to use [ and ] instead.
62137  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62138  if test "x$has_forbidden_chars" != x; then
62139    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62140    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62141  fi
62142
62143
62144  windows_path="$new_path"
62145  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62146    unix_path=`$CYGPATH -u "$windows_path"`
62147    new_path="$unix_path"
62148  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62149    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62150    new_path="$unix_path"
62151  fi
62152
62153  if test "x$path" != "x$new_path"; then
62154    FREETYPE_INCLUDE_PATH="$new_path"
62155    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62156$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62157  fi
62158
62159  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62160  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62161
62162    else
62163      # We're on a unix platform. Hooray! :)
62164      path="$FREETYPE_INCLUDE_PATH"
62165      has_space=`$ECHO "$path" | $GREP " "`
62166      if test "x$has_space" != x; then
62167        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62168$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62169        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62170      fi
62171
62172      # Use eval to expand a potential ~
62173      eval path="$path"
62174      if test ! -f "$path" && test ! -d "$path"; then
62175        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62176      fi
62177
62178      if test -d "$path"; then
62179        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62180      else
62181        dir="`$DIRNAME "$path"`"
62182        base="`$BASENAME "$path"`"
62183        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62184      fi
62185    fi
62186  fi
62187
62188      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
62189        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
62190      else
62191        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
62192      fi
62193    fi
62194
62195    if test "x$FREETYPE_LIBS" = x; then
62196
62197  # Only process if variable expands to non-empty
62198
62199  if test "x$FREETYPE_LIB_PATH" != x; then
62200    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62201
62202  # Input might be given as Windows format, start by converting to
62203  # unix format.
62204  path="$FREETYPE_LIB_PATH"
62205  new_path=`$CYGPATH -u "$path"`
62206
62207  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62208  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62209  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62210  # "foo.exe" is OK but "foo" is an error.
62211  #
62212  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62213  # It is also a way to make sure we got the proper file name for the real test later on.
62214  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62215  if test "x$test_shortpath" = x; then
62216    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62217$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62218    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
62219  fi
62220
62221  # Call helper function which possibly converts this using DOS-style short mode.
62222  # If so, the updated path is stored in $new_path.
62223
62224  input_path="$new_path"
62225  # Check if we need to convert this using DOS-style short mode. If the path
62226  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62227  # take no chances and rewrite it.
62228  # Note: m4 eats our [], so we need to use [ and ] instead.
62229  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62230  if test "x$has_forbidden_chars" != x; then
62231    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62232    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62233    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62234    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62235      # Going to short mode and back again did indeed matter. Since short mode is
62236      # case insensitive, let's make it lowercase to improve readability.
62237      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62238      # Now convert it back to Unix-style (cygpath)
62239      input_path=`$CYGPATH -u "$shortmode_path"`
62240      new_path="$input_path"
62241    fi
62242  fi
62243
62244  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62245  if test "x$test_cygdrive_prefix" = x; then
62246    # As a simple fix, exclude /usr/bin since it's not a real path.
62247    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62248      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62249      # a path prefixed by /cygdrive for fixpath to work.
62250      new_path="$CYGWIN_ROOT_PATH$input_path"
62251    fi
62252  fi
62253
62254
62255  if test "x$path" != "x$new_path"; then
62256    FREETYPE_LIB_PATH="$new_path"
62257    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62258$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62259  fi
62260
62261    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62262
62263  path="$FREETYPE_LIB_PATH"
62264  has_colon=`$ECHO $path | $GREP ^.:`
62265  new_path="$path"
62266  if test "x$has_colon" = x; then
62267    # Not in mixed or Windows style, start by that.
62268    new_path=`cmd //c echo $path`
62269  fi
62270
62271
62272  input_path="$new_path"
62273  # Check if we need to convert this using DOS-style short mode. If the path
62274  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62275  # take no chances and rewrite it.
62276  # Note: m4 eats our [], so we need to use [ and ] instead.
62277  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62278  if test "x$has_forbidden_chars" != x; then
62279    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62280    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62281  fi
62282
62283
62284  windows_path="$new_path"
62285  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62286    unix_path=`$CYGPATH -u "$windows_path"`
62287    new_path="$unix_path"
62288  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62289    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62290    new_path="$unix_path"
62291  fi
62292
62293  if test "x$path" != "x$new_path"; then
62294    FREETYPE_LIB_PATH="$new_path"
62295    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62296$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62297  fi
62298
62299  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62300  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62301
62302    else
62303      # We're on a unix platform. Hooray! :)
62304      path="$FREETYPE_LIB_PATH"
62305      has_space=`$ECHO "$path" | $GREP " "`
62306      if test "x$has_space" != x; then
62307        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62308$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62309        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62310      fi
62311
62312      # Use eval to expand a potential ~
62313      eval path="$path"
62314      if test ! -f "$path" && test ! -d "$path"; then
62315        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62316      fi
62317
62318      if test -d "$path"; then
62319        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62320      else
62321        dir="`$DIRNAME "$path"`"
62322        base="`$BASENAME "$path"`"
62323        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62324      fi
62325    fi
62326  fi
62327
62328      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62329        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
62330      else
62331        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
62332      fi
62333    fi
62334
62335    # Try to compile it
62336    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
62337$as_echo_n "checking if we can compile and link with freetype... " >&6; }
62338    ac_ext=cpp
62339ac_cpp='$CXXCPP $CPPFLAGS'
62340ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62341ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62342ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62343
62344    PREV_CXXCFLAGS="$CXXFLAGS"
62345    PREV_LIBS="$LIBS"
62346    PREV_CXX="$CXX"
62347    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
62348    LIBS="$LIBS $FREETYPE_LIBS"
62349    CXX="$FIXPATH $CXX"
62350    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62351/* end confdefs.h.  */
62352
62353          #include<ft2build.h>
62354          #include FT_FREETYPE_H
62355          int main () {
62356            FT_Init_FreeType(NULL);
62357            return 0;
62358          }
62359
62360_ACEOF
62361if ac_fn_cxx_try_link "$LINENO"; then :
62362
62363          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62364$as_echo "yes" >&6; }
62365
62366else
62367
62368          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62369$as_echo "no" >&6; }
62370          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
62371$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
62372          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
62373$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
62374
62375
62376  # Print a helpful message on how to acquire the necessary build dependency.
62377  # freetype is the help tag: freetype, cups, alsa etc
62378  MISSING_DEPENDENCY=freetype
62379
62380  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62381    cygwin_help $MISSING_DEPENDENCY
62382  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62383    msys_help $MISSING_DEPENDENCY
62384  else
62385    PKGHANDLER_COMMAND=
62386
62387    case $PKGHANDLER in
62388      apt-get)
62389        apt_help     $MISSING_DEPENDENCY ;;
62390      yum)
62391        yum_help     $MISSING_DEPENDENCY ;;
62392      port)
62393        port_help    $MISSING_DEPENDENCY ;;
62394      pkgutil)
62395        pkgutil_help $MISSING_DEPENDENCY ;;
62396      pkgadd)
62397        pkgadd_help  $MISSING_DEPENDENCY ;;
62398    esac
62399
62400    if test "x$PKGHANDLER_COMMAND" != x; then
62401      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62402    fi
62403  fi
62404
62405
62406          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
62407
62408
62409fi
62410rm -f core conftest.err conftest.$ac_objext \
62411    conftest$ac_exeext conftest.$ac_ext
62412    CXXCFLAGS="$PREV_CXXFLAGS"
62413    LIBS="$PREV_LIBS"
62414    CXX="$PREV_CXX"
62415    ac_ext=cpp
62416ac_cpp='$CXXCPP $CPPFLAGS'
62417ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62418ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62419ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62420
62421
62422    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
62423$as_echo_n "checking if we should bundle freetype... " >&6; }
62424    if test "x$BUNDLE_FREETYPE" = xyes; then
62425      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
62426    fi
62427    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
62428$as_echo "$BUNDLE_FREETYPE" >&6; }
62429
62430  fi # end freetype needed
62431
62432
62433
62434
62435
62436
62437
62438# Check whether --with-alsa was given.
62439if test "${with_alsa+set}" = set; then :
62440  withval=$with_alsa;
62441fi
62442
62443
62444# Check whether --with-alsa-include was given.
62445if test "${with_alsa_include+set}" = set; then :
62446  withval=$with_alsa_include;
62447fi
62448
62449
62450# Check whether --with-alsa-lib was given.
62451if test "${with_alsa_lib+set}" = set; then :
62452  withval=$with_alsa_lib;
62453fi
62454
62455
62456  if test "x$NEEDS_LIB_ALSA" = xfalse; then
62457    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
62458        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
62459        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
62460      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
62461$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
62462    fi
62463    ALSA_CFLAGS=
62464    ALSA_LIBS=
62465  else
62466    ALSA_FOUND=no
62467
62468    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
62469      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
62470    fi
62471
62472    if test "x${with_alsa}" != x; then
62473      ALSA_LIBS="-L${with_alsa}/lib -lasound"
62474      ALSA_CFLAGS="-I${with_alsa}/include"
62475      ALSA_FOUND=yes
62476    fi
62477    if test "x${with_alsa_include}" != x; then
62478      ALSA_CFLAGS="-I${with_alsa_include}"
62479      ALSA_FOUND=yes
62480    fi
62481    if test "x${with_alsa_lib}" != x; then
62482      ALSA_LIBS="-L${with_alsa_lib} -lasound"
62483      ALSA_FOUND=yes
62484    fi
62485    # Do not try pkg-config if we have a sysroot set.
62486    if test "x$SYSROOT" = x; then
62487      if test "x$ALSA_FOUND" = xno; then
62488
62489pkg_failed=no
62490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
62491$as_echo_n "checking for ALSA... " >&6; }
62492
62493if test -n "$ALSA_CFLAGS"; then
62494    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
62495 elif test -n "$PKG_CONFIG"; then
62496    if test -n "$PKG_CONFIG" && \
62497    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62498  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62499  ac_status=$?
62500  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62501  test $ac_status = 0; }; then
62502  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
62503else
62504  pkg_failed=yes
62505fi
62506 else
62507    pkg_failed=untried
62508fi
62509if test -n "$ALSA_LIBS"; then
62510    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
62511 elif test -n "$PKG_CONFIG"; then
62512    if test -n "$PKG_CONFIG" && \
62513    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62514  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62515  ac_status=$?
62516  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62517  test $ac_status = 0; }; then
62518  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
62519else
62520  pkg_failed=yes
62521fi
62522 else
62523    pkg_failed=untried
62524fi
62525
62526
62527
62528if test $pkg_failed = yes; then
62529
62530if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62531        _pkg_short_errors_supported=yes
62532else
62533        _pkg_short_errors_supported=no
62534fi
62535        if test $_pkg_short_errors_supported = yes; then
62536	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
62537        else
62538	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
62539        fi
62540	# Put the nasty error message in config.log where it belongs
62541	echo "$ALSA_PKG_ERRORS" >&5
62542
62543	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62544$as_echo "no" >&6; }
62545                ALSA_FOUND=no
62546elif test $pkg_failed = untried; then
62547	ALSA_FOUND=no
62548else
62549	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
62550	ALSA_LIBS=$pkg_cv_ALSA_LIBS
62551        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62552$as_echo "yes" >&6; }
62553	ALSA_FOUND=yes
62554fi
62555      fi
62556    fi
62557    if test "x$ALSA_FOUND" = xno; then
62558      for ac_header in alsa/asoundlib.h
62559do :
62560  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
62561if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
62562  cat >>confdefs.h <<_ACEOF
62563#define HAVE_ALSA_ASOUNDLIB_H 1
62564_ACEOF
62565
62566            ALSA_FOUND=yes
62567            ALSA_CFLAGS=-Iignoreme
62568            ALSA_LIBS=-lasound
62569            DEFAULT_ALSA=yes
62570
62571else
62572  ALSA_FOUND=no
62573
62574fi
62575
62576done
62577
62578    fi
62579    if test "x$ALSA_FOUND" = xno; then
62580
62581  # Print a helpful message on how to acquire the necessary build dependency.
62582  # alsa is the help tag: freetype, cups, alsa etc
62583  MISSING_DEPENDENCY=alsa
62584
62585  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62586    cygwin_help $MISSING_DEPENDENCY
62587  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62588    msys_help $MISSING_DEPENDENCY
62589  else
62590    PKGHANDLER_COMMAND=
62591
62592    case $PKGHANDLER in
62593      apt-get)
62594        apt_help     $MISSING_DEPENDENCY ;;
62595      yum)
62596        yum_help     $MISSING_DEPENDENCY ;;
62597      port)
62598        port_help    $MISSING_DEPENDENCY ;;
62599      pkgutil)
62600        pkgutil_help $MISSING_DEPENDENCY ;;
62601      pkgadd)
62602        pkgadd_help  $MISSING_DEPENDENCY ;;
62603    esac
62604
62605    if test "x$PKGHANDLER_COMMAND" != x; then
62606      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62607    fi
62608  fi
62609
62610      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
62611    fi
62612  fi
62613
62614
62615
62616
62617
62618
62619# Check whether --with-libffi was given.
62620if test "${with_libffi+set}" = set; then :
62621  withval=$with_libffi;
62622fi
62623
62624
62625# Check whether --with-libffi-include was given.
62626if test "${with_libffi_include+set}" = set; then :
62627  withval=$with_libffi_include;
62628fi
62629
62630
62631# Check whether --with-libffi-lib was given.
62632if test "${with_libffi_lib+set}" = set; then :
62633  withval=$with_libffi_lib;
62634fi
62635
62636
62637  if test "x$NEEDS_LIB_FFI" = xfalse; then
62638    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
62639        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
62640        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
62641      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
62642$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
62643    fi
62644    LIBFFI_CFLAGS=
62645    LIBFFI_LIBS=
62646  else
62647    LIBFFI_FOUND=no
62648
62649    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
62650      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
62651    fi
62652
62653    if test "x${with_libffi}" != x; then
62654      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
62655      LIBFFI_CFLAGS="-I${with_libffi}/include"
62656      LIBFFI_FOUND=yes
62657    fi
62658    if test "x${with_libffi_include}" != x; then
62659      LIBFFI_CFLAGS="-I${with_libffi_include}"
62660      LIBFFI_FOUND=yes
62661    fi
62662    if test "x${with_libffi_lib}" != x; then
62663      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
62664      LIBFFI_FOUND=yes
62665    fi
62666    # Do not try pkg-config if we have a sysroot set.
62667    if test "x$SYSROOT" = x; then
62668      if test "x$LIBFFI_FOUND" = xno; then
62669        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
62670
62671pkg_failed=no
62672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
62673$as_echo_n "checking for LIBFFI... " >&6; }
62674
62675if test -n "$LIBFFI_CFLAGS"; then
62676    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
62677 elif test -n "$PKG_CONFIG"; then
62678    if test -n "$PKG_CONFIG" && \
62679    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
62680  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
62681  ac_status=$?
62682  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62683  test $ac_status = 0; }; then
62684  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
62685else
62686  pkg_failed=yes
62687fi
62688 else
62689    pkg_failed=untried
62690fi
62691if test -n "$LIBFFI_LIBS"; then
62692    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
62693 elif test -n "$PKG_CONFIG"; then
62694    if test -n "$PKG_CONFIG" && \
62695    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
62696  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
62697  ac_status=$?
62698  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62699  test $ac_status = 0; }; then
62700  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
62701else
62702  pkg_failed=yes
62703fi
62704 else
62705    pkg_failed=untried
62706fi
62707
62708
62709
62710if test $pkg_failed = yes; then
62711
62712if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62713        _pkg_short_errors_supported=yes
62714else
62715        _pkg_short_errors_supported=no
62716fi
62717        if test $_pkg_short_errors_supported = yes; then
62718	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
62719        else
62720	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
62721        fi
62722	# Put the nasty error message in config.log where it belongs
62723	echo "$LIBFFI_PKG_ERRORS" >&5
62724
62725	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62726$as_echo "no" >&6; }
62727                LIBFFI_FOUND=no
62728elif test $pkg_failed = untried; then
62729	LIBFFI_FOUND=no
62730else
62731	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
62732	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
62733        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62734$as_echo "yes" >&6; }
62735	LIBFFI_FOUND=yes
62736fi
62737      fi
62738    fi
62739    if test "x$LIBFFI_FOUND" = xno; then
62740      for ac_header in ffi.h
62741do :
62742  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
62743if test "x$ac_cv_header_ffi_h" = xyes; then :
62744  cat >>confdefs.h <<_ACEOF
62745#define HAVE_FFI_H 1
62746_ACEOF
62747
62748            LIBFFI_FOUND=yes
62749            LIBFFI_CFLAGS=
62750            LIBFFI_LIBS=-lffi
62751
62752else
62753  LIBFFI_FOUND=no
62754
62755fi
62756
62757done
62758
62759    fi
62760    if test "x$LIBFFI_FOUND" = xno; then
62761
62762  # Print a helpful message on how to acquire the necessary build dependency.
62763  # ffi is the help tag: freetype, cups, alsa etc
62764  MISSING_DEPENDENCY=ffi
62765
62766  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62767    cygwin_help $MISSING_DEPENDENCY
62768  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62769    msys_help $MISSING_DEPENDENCY
62770  else
62771    PKGHANDLER_COMMAND=
62772
62773    case $PKGHANDLER in
62774      apt-get)
62775        apt_help     $MISSING_DEPENDENCY ;;
62776      yum)
62777        yum_help     $MISSING_DEPENDENCY ;;
62778      port)
62779        port_help    $MISSING_DEPENDENCY ;;
62780      pkgutil)
62781        pkgutil_help $MISSING_DEPENDENCY ;;
62782      pkgadd)
62783        pkgadd_help  $MISSING_DEPENDENCY ;;
62784    esac
62785
62786    if test "x$PKGHANDLER_COMMAND" != x; then
62787      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62788    fi
62789  fi
62790
62791      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
62792    fi
62793
62794    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
62795$as_echo_n "checking if libffi works... " >&6; }
62796    ac_ext=c
62797ac_cpp='$CPP $CPPFLAGS'
62798ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62799ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62800ac_compiler_gnu=$ac_cv_c_compiler_gnu
62801
62802    OLD_CFLAGS="$CFLAGS"
62803    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
62804    OLD_LIBS="$LIBS"
62805    LIBS="$LIBS $LIBFFI_LIBS"
62806    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62807/* end confdefs.h.  */
62808#include <ffi.h>
62809int
62810main ()
62811{
62812
62813          ffi_call(NULL, NULL, NULL, NULL);
62814          return 0;
62815
62816  ;
62817  return 0;
62818}
62819_ACEOF
62820if ac_fn_c_try_link "$LINENO"; then :
62821  LIBFFI_WORKS=yes
62822else
62823  LIBFFI_WORKS=no
62824
62825fi
62826rm -f core conftest.err conftest.$ac_objext \
62827    conftest$ac_exeext conftest.$ac_ext
62828    CFLAGS="$OLD_CFLAGS"
62829    LIBS="$OLD_LIBS"
62830    ac_ext=cpp
62831ac_cpp='$CXXCPP $CPPFLAGS'
62832ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62833ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62834ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62835
62836    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
62837$as_echo "$LIBFFI_WORKS" >&6; }
62838
62839    if test "x$LIBFFI_WORKS" = xno; then
62840
62841  # Print a helpful message on how to acquire the necessary build dependency.
62842  # ffi is the help tag: freetype, cups, alsa etc
62843  MISSING_DEPENDENCY=ffi
62844
62845  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62846    cygwin_help $MISSING_DEPENDENCY
62847  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62848    msys_help $MISSING_DEPENDENCY
62849  else
62850    PKGHANDLER_COMMAND=
62851
62852    case $PKGHANDLER in
62853      apt-get)
62854        apt_help     $MISSING_DEPENDENCY ;;
62855      yum)
62856        yum_help     $MISSING_DEPENDENCY ;;
62857      port)
62858        port_help    $MISSING_DEPENDENCY ;;
62859      pkgutil)
62860        pkgutil_help $MISSING_DEPENDENCY ;;
62861      pkgadd)
62862        pkgadd_help  $MISSING_DEPENDENCY ;;
62863    esac
62864
62865    if test "x$PKGHANDLER_COMMAND" != x; then
62866      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62867    fi
62868  fi
62869
62870      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
62871    fi
62872  fi
62873
62874
62875
62876
62877
62878  if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
62879    # Extract the first word of "llvm-config", so it can be a program name with args.
62880set dummy llvm-config; ac_word=$2
62881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
62882$as_echo_n "checking for $ac_word... " >&6; }
62883if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
62884  $as_echo_n "(cached) " >&6
62885else
62886  if test -n "$LLVM_CONFIG"; then
62887  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
62888else
62889as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
62890for as_dir in $PATH
62891do
62892  IFS=$as_save_IFS
62893  test -z "$as_dir" && as_dir=.
62894    for ac_exec_ext in '' $ac_executable_extensions; do
62895  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
62896    ac_cv_prog_LLVM_CONFIG="llvm-config"
62897    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
62898    break 2
62899  fi
62900done
62901  done
62902IFS=$as_save_IFS
62903
62904fi
62905fi
62906LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
62907if test -n "$LLVM_CONFIG"; then
62908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
62909$as_echo "$LLVM_CONFIG" >&6; }
62910else
62911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62912$as_echo "no" >&6; }
62913fi
62914
62915
62916
62917    if test "x$LLVM_CONFIG" != xllvm-config; then
62918      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
62919    fi
62920
62921    llvm_components="jit mcjit engine nativecodegen native"
62922    unset LLVM_CFLAGS
62923    for flag in $("$LLVM_CONFIG" --cxxflags); do
62924      if echo "${flag}" | grep -q '^-[ID]'; then
62925        if test "${flag}" != "-D_DEBUG" ; then
62926          if test "${LLVM_CFLAGS}" != "" ; then
62927            LLVM_CFLAGS="${LLVM_CFLAGS} "
62928          fi
62929          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
62930        fi
62931      fi
62932    done
62933    llvm_version=$("${LLVM_CONFIG}" --version | $SED 's/\.//; s/svn.*//')
62934    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
62935
62936    unset LLVM_LDFLAGS
62937    for flag in $("${LLVM_CONFIG}" --ldflags); do
62938      if echo "${flag}" | grep -q '^-L'; then
62939        if test "${LLVM_LDFLAGS}" != ""; then
62940          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
62941        fi
62942        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
62943      fi
62944    done
62945
62946    unset LLVM_LIBS
62947    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
62948      if echo "${flag}" | grep -q '^-l'; then
62949        if test "${LLVM_LIBS}" != ""; then
62950          LLVM_LIBS="${LLVM_LIBS} "
62951        fi
62952        LLVM_LIBS="${LLVM_LIBS}${flag}"
62953      fi
62954    done
62955
62956    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
62957    # always properly detect -ltinfo
62958    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
62959
62960
62961
62962
62963  fi
62964
62965
62966
62967# Check whether --with-libjpeg was given.
62968if test "${with_libjpeg+set}" = set; then :
62969  withval=$with_libjpeg;
62970fi
62971
62972
62973  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
62974$as_echo_n "checking for which libjpeg to use... " >&6; }
62975  # default is bundled
62976  DEFAULT_LIBJPEG=bundled
62977  # if user didn't specify, use DEFAULT_LIBJPEG
62978  if test "x${with_libjpeg}" = "x"; then
62979    with_libjpeg=${DEFAULT_LIBJPEG}
62980  fi
62981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
62982$as_echo "${with_libjpeg}" >&6; }
62983
62984  if test "x${with_libjpeg}" = "xbundled"; then
62985    USE_EXTERNAL_LIBJPEG=false
62986  elif test "x${with_libjpeg}" = "xsystem"; then
62987    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
62988if test "x$ac_cv_header_jpeglib_h" = xyes; then :
62989
62990else
62991   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
62992fi
62993
62994
62995    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
62996$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
62997if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
62998  $as_echo_n "(cached) " >&6
62999else
63000  ac_check_lib_save_LIBS=$LIBS
63001LIBS="-ljpeg  $LIBS"
63002cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63003/* end confdefs.h.  */
63004
63005/* Override any GCC internal prototype to avoid an error.
63006   Use char because int might match the return type of a GCC
63007   builtin and then its argument prototype would still apply.  */
63008#ifdef __cplusplus
63009extern "C"
63010#endif
63011char jpeg_CreateDecompress ();
63012int
63013main ()
63014{
63015return jpeg_CreateDecompress ();
63016  ;
63017  return 0;
63018}
63019_ACEOF
63020if ac_fn_cxx_try_link "$LINENO"; then :
63021  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
63022else
63023  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
63024fi
63025rm -f core conftest.err conftest.$ac_objext \
63026    conftest$ac_exeext conftest.$ac_ext
63027LIBS=$ac_check_lib_save_LIBS
63028fi
63029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
63030$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
63031if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
63032  cat >>confdefs.h <<_ACEOF
63033#define HAVE_LIBJPEG 1
63034_ACEOF
63035
63036  LIBS="-ljpeg $LIBS"
63037
63038else
63039   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
63040fi
63041
63042
63043    USE_EXTERNAL_LIBJPEG=true
63044  else
63045    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
63046  fi
63047
63048
63049
63050
63051
63052# Check whether --with-giflib was given.
63053if test "${with_giflib+set}" = set; then :
63054  withval=$with_giflib;
63055fi
63056
63057
63058  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
63059$as_echo_n "checking for which giflib to use... " >&6; }
63060  # default is bundled
63061  DEFAULT_GIFLIB=bundled
63062  # if user didn't specify, use DEFAULT_GIFLIB
63063  if test "x${with_giflib}" = "x"; then
63064    with_giflib=${DEFAULT_GIFLIB}
63065  fi
63066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
63067$as_echo "${with_giflib}" >&6; }
63068
63069  if test "x${with_giflib}" = "xbundled"; then
63070    USE_EXTERNAL_LIBGIF=false
63071  elif test "x${with_giflib}" = "xsystem"; then
63072    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
63073if test "x$ac_cv_header_gif_lib_h" = xyes; then :
63074
63075else
63076   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
63077fi
63078
63079
63080    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
63081$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
63082if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
63083  $as_echo_n "(cached) " >&6
63084else
63085  ac_check_lib_save_LIBS=$LIBS
63086LIBS="-lgif  $LIBS"
63087cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63088/* end confdefs.h.  */
63089
63090/* Override any GCC internal prototype to avoid an error.
63091   Use char because int might match the return type of a GCC
63092   builtin and then its argument prototype would still apply.  */
63093#ifdef __cplusplus
63094extern "C"
63095#endif
63096char DGifGetCode ();
63097int
63098main ()
63099{
63100return DGifGetCode ();
63101  ;
63102  return 0;
63103}
63104_ACEOF
63105if ac_fn_cxx_try_link "$LINENO"; then :
63106  ac_cv_lib_gif_DGifGetCode=yes
63107else
63108  ac_cv_lib_gif_DGifGetCode=no
63109fi
63110rm -f core conftest.err conftest.$ac_objext \
63111    conftest$ac_exeext conftest.$ac_ext
63112LIBS=$ac_check_lib_save_LIBS
63113fi
63114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
63115$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
63116if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
63117  cat >>confdefs.h <<_ACEOF
63118#define HAVE_LIBGIF 1
63119_ACEOF
63120
63121  LIBS="-lgif $LIBS"
63122
63123else
63124   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
63125fi
63126
63127
63128    USE_EXTERNAL_LIBGIF=true
63129  else
63130    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
63131  fi
63132
63133
63134
63135
63136
63137# Check whether --with-libpng was given.
63138if test "${with_libpng+set}" = set; then :
63139  withval=$with_libpng;
63140fi
63141
63142
63143  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
63144$as_echo_n "checking for which libpng to use... " >&6; }
63145
63146  # default is bundled
63147  DEFAULT_LIBPNG=bundled
63148  # if user didn't specify, use DEFAULT_LIBPNG
63149  if test "x${with_libpng}" = "x"; then
63150      with_libpng=${DEFAULT_LIBPNG}
63151  fi
63152
63153  if test "x${with_libpng}" = "xbundled"; then
63154      USE_EXTERNAL_LIBPNG=false
63155      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63156$as_echo "bundled" >&6; }
63157  elif test "x${with_libpng}" = "xsystem"; then
63158
63159pkg_failed=no
63160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
63161$as_echo_n "checking for PNG... " >&6; }
63162
63163if test -n "$PNG_CFLAGS"; then
63164    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
63165 elif test -n "$PKG_CONFIG"; then
63166    if test -n "$PKG_CONFIG" && \
63167    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63168  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63169  ac_status=$?
63170  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63171  test $ac_status = 0; }; then
63172  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
63173else
63174  pkg_failed=yes
63175fi
63176 else
63177    pkg_failed=untried
63178fi
63179if test -n "$PNG_LIBS"; then
63180    pkg_cv_PNG_LIBS="$PNG_LIBS"
63181 elif test -n "$PKG_CONFIG"; then
63182    if test -n "$PKG_CONFIG" && \
63183    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63184  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63185  ac_status=$?
63186  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63187  test $ac_status = 0; }; then
63188  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
63189else
63190  pkg_failed=yes
63191fi
63192 else
63193    pkg_failed=untried
63194fi
63195
63196
63197
63198if test $pkg_failed = yes; then
63199
63200if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63201        _pkg_short_errors_supported=yes
63202else
63203        _pkg_short_errors_supported=no
63204fi
63205        if test $_pkg_short_errors_supported = yes; then
63206	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
63207        else
63208	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
63209        fi
63210	# Put the nasty error message in config.log where it belongs
63211	echo "$PNG_PKG_ERRORS" >&5
63212
63213	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63214$as_echo "no" >&6; }
63215                 LIBPNG_FOUND=no
63216elif test $pkg_failed = untried; then
63217	 LIBPNG_FOUND=no
63218else
63219	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
63220	PNG_LIBS=$pkg_cv_PNG_LIBS
63221        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63222$as_echo "yes" >&6; }
63223	 LIBPNG_FOUND=yes
63224fi
63225      if test "x${LIBPNG_FOUND}" = "xyes"; then
63226          USE_EXTERNAL_LIBPNG=true
63227          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63228$as_echo "system" >&6; }
63229      else
63230          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63231$as_echo "system not found" >&6; }
63232          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
63233      fi
63234  else
63235      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
63236  fi
63237
63238
63239
63240
63241
63242# Check whether --with-zlib was given.
63243if test "${with_zlib+set}" = set; then :
63244  withval=$with_zlib;
63245fi
63246
63247
63248  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
63249$as_echo_n "checking for compress in -lz... " >&6; }
63250if ${ac_cv_lib_z_compress+:} false; then :
63251  $as_echo_n "(cached) " >&6
63252else
63253  ac_check_lib_save_LIBS=$LIBS
63254LIBS="-lz  $LIBS"
63255cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63256/* end confdefs.h.  */
63257
63258/* Override any GCC internal prototype to avoid an error.
63259   Use char because int might match the return type of a GCC
63260   builtin and then its argument prototype would still apply.  */
63261#ifdef __cplusplus
63262extern "C"
63263#endif
63264char compress ();
63265int
63266main ()
63267{
63268return compress ();
63269  ;
63270  return 0;
63271}
63272_ACEOF
63273if ac_fn_cxx_try_link "$LINENO"; then :
63274  ac_cv_lib_z_compress=yes
63275else
63276  ac_cv_lib_z_compress=no
63277fi
63278rm -f core conftest.err conftest.$ac_objext \
63279    conftest$ac_exeext conftest.$ac_ext
63280LIBS=$ac_check_lib_save_LIBS
63281fi
63282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
63283$as_echo "$ac_cv_lib_z_compress" >&6; }
63284if test "x$ac_cv_lib_z_compress" = xyes; then :
63285   ZLIB_FOUND=yes
63286else
63287   ZLIB_FOUND=no
63288fi
63289
63290
63291  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
63292$as_echo_n "checking for which zlib to use... " >&6; }
63293
63294  DEFAULT_ZLIB=system
63295  if test "x$OPENJDK_TARGET_OS" = xwindows; then
63296    # On windows default is bundled...on others default is system
63297    DEFAULT_ZLIB=bundled
63298  fi
63299
63300  if test "x${ZLIB_FOUND}" != "xyes"; then
63301    # If we don't find any system...set default to bundled
63302    DEFAULT_ZLIB=bundled
63303  fi
63304
63305  # If user didn't specify, use DEFAULT_ZLIB
63306  if test "x${with_zlib}" = "x"; then
63307    with_zlib=${DEFAULT_ZLIB}
63308  fi
63309
63310  if test "x${with_zlib}" = "xbundled"; then
63311    USE_EXTERNAL_LIBZ=false
63312    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63313$as_echo "bundled" >&6; }
63314  elif test "x${with_zlib}" = "xsystem"; then
63315    if test "x${ZLIB_FOUND}" = "xyes"; then
63316      USE_EXTERNAL_LIBZ=true
63317      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63318$as_echo "system" >&6; }
63319    else
63320      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63321$as_echo "system not found" >&6; }
63322      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
63323    fi
63324  else
63325    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
63326  fi
63327
63328
63329
63330
63331
63332# Check whether --with-lcms was given.
63333if test "${with_lcms+set}" = set; then :
63334  withval=$with_lcms;
63335fi
63336
63337
63338  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
63339$as_echo_n "checking for which lcms to use... " >&6; }
63340
63341  DEFAULT_LCMS=bundled
63342  # If user didn't specify, use DEFAULT_LCMS
63343  if test "x${with_lcms}" = "x"; then
63344      with_lcms=${DEFAULT_LCMS}
63345  fi
63346
63347  if test "x${with_lcms}" = "xbundled"; then
63348    USE_EXTERNAL_LCMS=false
63349    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63350$as_echo "bundled" >&6; }
63351  elif test "x${with_lcms}" = "xsystem"; then
63352    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63353$as_echo "system" >&6; }
63354
63355pkg_failed=no
63356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
63357$as_echo_n "checking for LCMS... " >&6; }
63358
63359if test -n "$LCMS_CFLAGS"; then
63360    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
63361 elif test -n "$PKG_CONFIG"; then
63362    if test -n "$PKG_CONFIG" && \
63363    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63364  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63365  ac_status=$?
63366  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63367  test $ac_status = 0; }; then
63368  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
63369else
63370  pkg_failed=yes
63371fi
63372 else
63373    pkg_failed=untried
63374fi
63375if test -n "$LCMS_LIBS"; then
63376    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
63377 elif test -n "$PKG_CONFIG"; then
63378    if test -n "$PKG_CONFIG" && \
63379    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63380  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63381  ac_status=$?
63382  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63383  test $ac_status = 0; }; then
63384  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
63385else
63386  pkg_failed=yes
63387fi
63388 else
63389    pkg_failed=untried
63390fi
63391
63392
63393
63394if test $pkg_failed = yes; then
63395
63396if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63397        _pkg_short_errors_supported=yes
63398else
63399        _pkg_short_errors_supported=no
63400fi
63401        if test $_pkg_short_errors_supported = yes; then
63402	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
63403        else
63404	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
63405        fi
63406	# Put the nasty error message in config.log where it belongs
63407	echo "$LCMS_PKG_ERRORS" >&5
63408
63409	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63410$as_echo "no" >&6; }
63411                LCMS_FOUND=no
63412elif test $pkg_failed = untried; then
63413	LCMS_FOUND=no
63414else
63415	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
63416	LCMS_LIBS=$pkg_cv_LCMS_LIBS
63417        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63418$as_echo "yes" >&6; }
63419	LCMS_FOUND=yes
63420fi
63421    if test "x${LCMS_FOUND}" = "xyes"; then
63422      USE_EXTERNAL_LCMS=true
63423    else
63424      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
63425    fi
63426  else
63427    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
63428  fi
63429
63430
63431
63432
63433
63434
63435
63436
63437
63438
63439
63440  # Setup libm (the maths library)
63441  if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
63442    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
63443$as_echo_n "checking for cos in -lm... " >&6; }
63444if ${ac_cv_lib_m_cos+:} false; then :
63445  $as_echo_n "(cached) " >&6
63446else
63447  ac_check_lib_save_LIBS=$LIBS
63448LIBS="-lm  $LIBS"
63449cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63450/* end confdefs.h.  */
63451
63452/* Override any GCC internal prototype to avoid an error.
63453   Use char because int might match the return type of a GCC
63454   builtin and then its argument prototype would still apply.  */
63455#ifdef __cplusplus
63456extern "C"
63457#endif
63458char cos ();
63459int
63460main ()
63461{
63462return cos ();
63463  ;
63464  return 0;
63465}
63466_ACEOF
63467if ac_fn_cxx_try_link "$LINENO"; then :
63468  ac_cv_lib_m_cos=yes
63469else
63470  ac_cv_lib_m_cos=no
63471fi
63472rm -f core conftest.err conftest.$ac_objext \
63473    conftest$ac_exeext conftest.$ac_ext
63474LIBS=$ac_check_lib_save_LIBS
63475fi
63476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
63477$as_echo "$ac_cv_lib_m_cos" >&6; }
63478if test "x$ac_cv_lib_m_cos" = xyes; then :
63479  cat >>confdefs.h <<_ACEOF
63480#define HAVE_LIBM 1
63481_ACEOF
63482
63483  LIBS="-lm $LIBS"
63484
63485else
63486
63487        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
63488$as_echo "$as_me: Maths library was not found" >&6;}
63489
63490fi
63491
63492    LIBM="-lm"
63493  else
63494    LIBM=""
63495  fi
63496
63497
63498  # Setup libdl (for dynamic library loading)
63499  save_LIBS="$LIBS"
63500  LIBS=""
63501  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
63502$as_echo_n "checking for dlopen in -ldl... " >&6; }
63503if ${ac_cv_lib_dl_dlopen+:} false; then :
63504  $as_echo_n "(cached) " >&6
63505else
63506  ac_check_lib_save_LIBS=$LIBS
63507LIBS="-ldl  $LIBS"
63508cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63509/* end confdefs.h.  */
63510
63511/* Override any GCC internal prototype to avoid an error.
63512   Use char because int might match the return type of a GCC
63513   builtin and then its argument prototype would still apply.  */
63514#ifdef __cplusplus
63515extern "C"
63516#endif
63517char dlopen ();
63518int
63519main ()
63520{
63521return dlopen ();
63522  ;
63523  return 0;
63524}
63525_ACEOF
63526if ac_fn_cxx_try_link "$LINENO"; then :
63527  ac_cv_lib_dl_dlopen=yes
63528else
63529  ac_cv_lib_dl_dlopen=no
63530fi
63531rm -f core conftest.err conftest.$ac_objext \
63532    conftest$ac_exeext conftest.$ac_ext
63533LIBS=$ac_check_lib_save_LIBS
63534fi
63535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
63536$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
63537if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
63538  cat >>confdefs.h <<_ACEOF
63539#define HAVE_LIBDL 1
63540_ACEOF
63541
63542  LIBS="-ldl $LIBS"
63543
63544fi
63545
63546  LIBDL="$LIBS"
63547
63548  LIBS="$save_LIBS"
63549
63550  # Deprecated libraries, keep the flags for backwards compatibility
63551  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
63552
63553
63554# Check whether --with-dxsdk was given.
63555if test "${with_dxsdk+set}" = set; then :
63556  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
63557$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
63558fi
63559
63560
63561
63562
63563# Check whether --with-dxsdk-lib was given.
63564if test "${with_dxsdk_lib+set}" = set; then :
63565  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
63566$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
63567fi
63568
63569
63570
63571
63572# Check whether --with-dxsdk-include was given.
63573if test "${with_dxsdk_include+set}" = set; then :
63574  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
63575$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
63576fi
63577
63578
63579  fi
63580
63581  # Control if libzip can use mmap. Available for purposes of overriding.
63582  LIBZIP_CAN_USE_MMAP=true
63583
63584
63585
63586  if test "$OPENJDK_TARGET_OS" = "solaris" && test "x$BUILD_GTEST" = "xtrue"; then
63587    # Find the root of the Solaris Studio installation from the compiler path
63588    SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
63589    STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
63590    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
63591$as_echo_n "checking for libstlport.so.1... " >&6; }
63592    if ! test -f "$STLPORT_LIB" && test "x$OPENJDK_TARGET_CPU_ISADIR" = "x/sparcv9"; then
63593      # SS12u3 has libstlport under 'stlport4/v9' instead of 'stlport4/sparcv9'
63594      STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4/v9/libstlport.so.1"
63595    fi
63596    if test -f "$STLPORT_LIB"; then
63597      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
63598$as_echo "yes, $STLPORT_LIB" >&6; }
63599
63600  # Only process if variable expands to non-empty
63601
63602  if test "x$STLPORT_LIB" != x; then
63603    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63604
63605  # Input might be given as Windows format, start by converting to
63606  # unix format.
63607  path="$STLPORT_LIB"
63608  new_path=`$CYGPATH -u "$path"`
63609
63610  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63611  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63612  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63613  # "foo.exe" is OK but "foo" is an error.
63614  #
63615  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63616  # It is also a way to make sure we got the proper file name for the real test later on.
63617  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63618  if test "x$test_shortpath" = x; then
63619    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
63620$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
63621    as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
63622  fi
63623
63624  # Call helper function which possibly converts this using DOS-style short mode.
63625  # If so, the updated path is stored in $new_path.
63626
63627  input_path="$new_path"
63628  # Check if we need to convert this using DOS-style short mode. If the path
63629  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63630  # take no chances and rewrite it.
63631  # Note: m4 eats our [], so we need to use [ and ] instead.
63632  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63633  if test "x$has_forbidden_chars" != x; then
63634    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63635    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63636    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63637    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63638      # Going to short mode and back again did indeed matter. Since short mode is
63639      # case insensitive, let's make it lowercase to improve readability.
63640      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63641      # Now convert it back to Unix-style (cygpath)
63642      input_path=`$CYGPATH -u "$shortmode_path"`
63643      new_path="$input_path"
63644    fi
63645  fi
63646
63647  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63648  if test "x$test_cygdrive_prefix" = x; then
63649    # As a simple fix, exclude /usr/bin since it's not a real path.
63650    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63651      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63652      # a path prefixed by /cygdrive for fixpath to work.
63653      new_path="$CYGWIN_ROOT_PATH$input_path"
63654    fi
63655  fi
63656
63657
63658  if test "x$path" != "x$new_path"; then
63659    STLPORT_LIB="$new_path"
63660    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
63661$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
63662  fi
63663
63664    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63665
63666  path="$STLPORT_LIB"
63667  has_colon=`$ECHO $path | $GREP ^.:`
63668  new_path="$path"
63669  if test "x$has_colon" = x; then
63670    # Not in mixed or Windows style, start by that.
63671    new_path=`cmd //c echo $path`
63672  fi
63673
63674
63675  input_path="$new_path"
63676  # Check if we need to convert this using DOS-style short mode. If the path
63677  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63678  # take no chances and rewrite it.
63679  # Note: m4 eats our [], so we need to use [ and ] instead.
63680  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63681  if test "x$has_forbidden_chars" != x; then
63682    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63683    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63684  fi
63685
63686
63687  windows_path="$new_path"
63688  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63689    unix_path=`$CYGPATH -u "$windows_path"`
63690    new_path="$unix_path"
63691  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63692    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63693    new_path="$unix_path"
63694  fi
63695
63696  if test "x$path" != "x$new_path"; then
63697    STLPORT_LIB="$new_path"
63698    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
63699$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
63700  fi
63701
63702  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63703  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63704
63705    else
63706      # We're on a unix platform. Hooray! :)
63707      path="$STLPORT_LIB"
63708      has_space=`$ECHO "$path" | $GREP " "`
63709      if test "x$has_space" != x; then
63710        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
63711$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
63712        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63713      fi
63714
63715      # Use eval to expand a potential ~
63716      eval path="$path"
63717      if test ! -f "$path" && test ! -d "$path"; then
63718        as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
63719      fi
63720
63721      if test -d "$path"; then
63722        STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
63723      else
63724        dir="`$DIRNAME "$path"`"
63725        base="`$BASENAME "$path"`"
63726        STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
63727      fi
63728    fi
63729  fi
63730
63731    else
63732      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
63733$as_echo "no, not found at $STLPORT_LIB" >&6; }
63734      as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
63735    fi
63736
63737  fi
63738
63739
63740
63741
63742
63743
63744
63745
63746
63747
63748
63749
63750
63751
63752###############################################################################
63753#
63754# We need to do some final tweaking, when everything else is done.
63755#
63756###############################################################################
63757
63758
63759  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
63760$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
63761
63762  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
63763    ENABLE_INTREE_EC=yes
63764    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63765$as_echo "yes" >&6; }
63766  else
63767    ENABLE_INTREE_EC=no
63768    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63769$as_echo "no" >&6; }
63770  fi
63771
63772
63773
63774
63775  # Check whether --enable-jtreg-failure-handler was given.
63776if test "${enable_jtreg_failure_handler+set}" = set; then :
63777  enableval=$enable_jtreg_failure_handler;
63778fi
63779
63780
63781  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
63782$as_echo_n "checking if jtreg failure handler should be built... " >&6; }
63783
63784  if test "x$enable_jtreg_failure_handler" = "xyes"; then
63785    if test "x$JT_HOME" = "x"; then
63786      as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
63787    else
63788      BUILD_FAILURE_HANDLER=true
63789      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
63790$as_echo "yes, forced" >&6; }
63791    fi
63792  elif test "x$enable_jtreg_failure_handler" = "xno"; then
63793    BUILD_FAILURE_HANDLER=false
63794    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
63795$as_echo "no, forced" >&6; }
63796  elif test "x$enable_jtreg_failure_handler" = "xauto" \
63797      || test "x$enable_jtreg_failure_handler" = "x"; then
63798    if test "x$JT_HOME" = "x"; then
63799      BUILD_FAILURE_HANDLER=false
63800      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
63801$as_echo "no, missing jtreg" >&6; }
63802    else
63803      BUILD_FAILURE_HANDLER=true
63804      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
63805$as_echo "yes, jtreg present" >&6; }
63806    fi
63807  else
63808    as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
63809  fi
63810
63811
63812
63813
63814  # Check whether --enable-generate-classlist was given.
63815if test "${enable_generate_classlist+set}" = set; then :
63816  enableval=$enable_generate_classlist;
63817fi
63818
63819
63820  # Check if it's likely that it's possible to generate the classlist. Depending
63821  # on exact jvm configuration it could be possible anyway.
63822  if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
63823    ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
63824  else
63825    ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
63826  fi
63827
63828  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the CDS classlist generation should be enabled" >&5
63829$as_echo_n "checking if the CDS classlist generation should be enabled... " >&6; }
63830  if test "x$enable_generate_classlist" = "xyes"; then
63831    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
63832$as_echo "yes, forced" >&6; }
63833    ENABLE_GENERATE_CLASSLIST="true"
63834    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
63835      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&5
63836$as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&2;}
63837    fi
63838  elif test "x$enable_generate_classlist" = "xno"; then
63839    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
63840$as_echo "no, forced" >&6; }
63841    ENABLE_GENERATE_CLASSLIST="false"
63842  elif test "x$enable_generate_classlist" = "x"; then
63843    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
63844      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63845$as_echo "yes" >&6; }
63846      ENABLE_GENERATE_CLASSLIST="true"
63847    else
63848      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63849$as_echo "no" >&6; }
63850      ENABLE_GENERATE_CLASSLIST="false"
63851    fi
63852  else
63853    as_fn_error $? "Invalid value for --enable-generate-classlist: $enable_generate_classlist" "$LINENO" 5
63854  fi
63855
63856
63857
63858
63859###############################################################################
63860#
63861# Configure parts of the build that only affect the build performance,
63862# not the result.
63863#
63864###############################################################################
63865
63866
63867  # How many cores do we have on this build system?
63868
63869# Check whether --with-num-cores was given.
63870if test "${with_num_cores+set}" = set; then :
63871  withval=$with_num_cores;
63872fi
63873
63874  if test "x$with_num_cores" = x; then
63875    # The number of cores were not specified, try to probe them.
63876
63877  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
63878$as_echo_n "checking for number of cores... " >&6; }
63879  NUM_CORES=1
63880  FOUND_CORES=no
63881
63882  if test -f /proc/cpuinfo; then
63883    # Looks like a Linux (or cygwin) system
63884    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
63885    FOUND_CORES=yes
63886  elif test -x /usr/sbin/psrinfo; then
63887    # Looks like a Solaris system
63888    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
63889    FOUND_CORES=yes
63890  elif test -x /usr/sbin/sysctl; then
63891    # Looks like a MacOSX system
63892    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
63893    FOUND_CORES=yes
63894  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
63895    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
63896    FOUND_CORES=yes
63897  elif test -n "$NUMBER_OF_PROCESSORS"; then
63898    # On windows, look in the env
63899    NUM_CORES=$NUMBER_OF_PROCESSORS
63900    FOUND_CORES=yes
63901  fi
63902
63903  if test "x$FOUND_CORES" = xyes; then
63904    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
63905$as_echo "$NUM_CORES" >&6; }
63906  else
63907    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
63908$as_echo "could not detect number of cores, defaulting to 1" >&6; }
63909    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
63910$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
63911  fi
63912
63913  else
63914    NUM_CORES=$with_num_cores
63915  fi
63916
63917
63918
63919  # How much memory do we have on this build system?
63920
63921# Check whether --with-memory-size was given.
63922if test "${with_memory_size+set}" = set; then :
63923  withval=$with_memory_size;
63924fi
63925
63926  if test "x$with_memory_size" = x; then
63927    # The memory size was not specified, try to probe it.
63928
63929  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
63930$as_echo_n "checking for memory size... " >&6; }
63931  # Default to 1024 MB
63932  MEMORY_SIZE=1024
63933  FOUND_MEM=no
63934
63935  if test -f /proc/meminfo; then
63936    # Looks like a Linux (or cygwin) system
63937    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
63938    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
63939    FOUND_MEM=yes
63940  elif test -x /usr/sbin/prtconf; then
63941    # Looks like a Solaris or AIX system
63942    MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
63943    FOUND_MEM=yes
63944  elif test -x /usr/sbin/sysctl; then
63945    # Looks like a MacOSX system
63946    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
63947    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
63948    FOUND_MEM=yes
63949  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
63950    # Windows, but without cygwin
63951    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
63952    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
63953    FOUND_MEM=yes
63954  fi
63955
63956  if test "x$FOUND_MEM" = xyes; then
63957    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
63958$as_echo "$MEMORY_SIZE MB" >&6; }
63959  else
63960    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
63961$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
63962    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
63963$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
63964  fi
63965
63966  else
63967    MEMORY_SIZE=$with_memory_size
63968  fi
63969
63970
63971
63972  # Provide a decent default number of parallel jobs for make depending on
63973  # number of cores, amount of memory and machine architecture.
63974
63975# Check whether --with-jobs was given.
63976if test "${with_jobs+set}" = set; then :
63977  withval=$with_jobs;
63978fi
63979
63980  if test "x$with_jobs" = x; then
63981    # Number of jobs was not specified, calculate.
63982    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
63983$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
63984    # Approximate memory in GB.
63985    memory_gb=`expr $MEMORY_SIZE / 1024`
63986    # Pick the lowest of memory in gb and number of cores.
63987    if test "$memory_gb" -lt "$NUM_CORES"; then
63988      JOBS="$memory_gb"
63989    else
63990      JOBS="$NUM_CORES"
63991    fi
63992    if test "$JOBS" -eq "0"; then
63993      JOBS=1
63994    fi
63995    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
63996$as_echo "$JOBS" >&6; }
63997  else
63998    JOBS=$with_jobs
63999  fi
64000
64001
64002
64003  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
64004
64005# Check whether --with-test-jobs was given.
64006if test "${with_test_jobs+set}" = set; then :
64007  withval=$with_test_jobs;
64008fi
64009
64010  if test "x$with_test_jobs" = x; then
64011      TEST_JOBS=0
64012  else
64013      TEST_JOBS=$with_test_jobs
64014  fi
64015
64016
64017
64018# Setup arguments for the boot jdk (after cores and memory have been setup)
64019
64020  ##############################################################################
64021  #
64022  # Specify jvm options for anything that is run with the Boot JDK.
64023  # Not all JVM:s accept the same arguments on the command line.
64024  #
64025
64026# Check whether --with-boot-jdk-jvmargs was given.
64027if test "${with_boot_jdk_jvmargs+set}" = set; then :
64028  withval=$with_boot_jdk_jvmargs;
64029fi
64030
64031
64032  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
64033$as_echo_n "checking flags for boot jdk java command ... " >&6; }
64034
64035  # Disable special log output when a debug build is used as Boot JDK...
64036
64037  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
64038  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
64039  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
64040  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64041  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64042  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64043    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
64044    JVM_ARG_OK=true
64045  else
64046    $ECHO "Arg failed:" >&5
64047    $ECHO "$OUTPUT" >&5
64048    JVM_ARG_OK=false
64049  fi
64050
64051
64052  # Force en-US environment
64053
64054  $ECHO "Check if jvm arg is ok: -Duser.language=en -Duser.country=US" >&5
64055  $ECHO "Command: $JAVA -Duser.language=en -Duser.country=US -version" >&5
64056  OUTPUT=`$JAVA -Duser.language=en -Duser.country=US -version 2>&1`
64057  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64058  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64059  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64060    boot_jdk_jvmargs="$boot_jdk_jvmargs -Duser.language=en -Duser.country=US"
64061    JVM_ARG_OK=true
64062  else
64063    $ECHO "Arg failed:" >&5
64064    $ECHO "$OUTPUT" >&5
64065    JVM_ARG_OK=false
64066  fi
64067
64068
64069  # Apply user provided options.
64070
64071  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
64072  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
64073  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
64074  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64075  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64076  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64077    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
64078    JVM_ARG_OK=true
64079  else
64080    $ECHO "Arg failed:" >&5
64081    $ECHO "$OUTPUT" >&5
64082    JVM_ARG_OK=false
64083  fi
64084
64085
64086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
64087$as_echo "$boot_jdk_jvmargs" >&6; }
64088
64089  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
64090  JAVA_FLAGS=$boot_jdk_jvmargs
64091
64092
64093
64094  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
64095$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
64096
64097  # Starting amount of heap memory.
64098
64099  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
64100  $ECHO "Command: $JAVA -Xms64M -version" >&5
64101  OUTPUT=`$JAVA -Xms64M -version 2>&1`
64102  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64103  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64104  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64105    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
64106    JVM_ARG_OK=true
64107  else
64108    $ECHO "Arg failed:" >&5
64109    $ECHO "$OUTPUT" >&5
64110    JVM_ARG_OK=false
64111  fi
64112
64113  BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
64114
64115  # Maximum amount of heap memory and stack size.
64116  JVM_HEAP_LIMIT_32="1024"
64117  # Running a 64 bit JVM allows for and requires a bigger heap
64118  JVM_HEAP_LIMIT_64="1600"
64119  STACK_SIZE_32=768
64120  STACK_SIZE_64=1536
64121  JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
64122  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
64123    JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
64124  fi
64125  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_64"; then
64126    JVM_HEAP_LIMIT_64=$JVM_HEAP_LIMIT_GLOBAL
64127  fi
64128  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "512"; then
64129    JVM_HEAP_LIMIT_32=512
64130    JVM_HEAP_LIMIT_64=512
64131  fi
64132
64133  if test "x$BOOT_JDK_BITS" = "x32"; then
64134    STACK_SIZE=$STACK_SIZE_32
64135    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_32
64136  else
64137    STACK_SIZE=$STACK_SIZE_64
64138    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
64139  fi
64140
64141  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
64142  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
64143  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
64144  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64145  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64146  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64147    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
64148    JVM_ARG_OK=true
64149  else
64150    $ECHO "Arg failed:" >&5
64151    $ECHO "$OUTPUT" >&5
64152    JVM_ARG_OK=false
64153  fi
64154
64155
64156  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
64157  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
64158  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
64159  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64160  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64161  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64162    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
64163    JVM_ARG_OK=true
64164  else
64165    $ECHO "Arg failed:" >&5
64166    $ECHO "$OUTPUT" >&5
64167    JVM_ARG_OK=false
64168  fi
64169
64170
64171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
64172$as_echo "$boot_jdk_jvmargs_big" >&6; }
64173
64174  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
64175
64176
64177  if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
64178    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_32
64179    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_32
64180  else
64181    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_64
64182    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_64
64183  fi
64184  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -Xmx${BOOTCYCLE_MAX_HEAP}M"
64185  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -XX:ThreadStackSize=$BOOTCYCLE_STACK_SIZE"
64186  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for bootcycle boot jdk java command for big workloads" >&5
64187$as_echo_n "checking flags for bootcycle boot jdk java command for big workloads... " >&6; }
64188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOTCYCLE_JVM_ARGS_BIG" >&5
64189$as_echo "$BOOTCYCLE_JVM_ARGS_BIG" >&6; }
64190
64191
64192  # By default, the main javac compilations use big
64193  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
64194
64195
64196  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
64197$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
64198
64199  # Use serial gc for small short lived tools if possible
64200
64201  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
64202  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
64203  OUTPUT=`$JAVA -XX:+UseSerialGC -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_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
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: -Xms32M" >&5
64217  $ECHO "Command: $JAVA -Xms32M -version" >&5
64218  OUTPUT=`$JAVA -Xms32M -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_small="$boot_jdk_jvmargs_small -Xms32M"
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  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
64232  $ECHO "Command: $JAVA -Xmx512M -version" >&5
64233  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
64234  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64235  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64236  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64237    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
64238    JVM_ARG_OK=true
64239  else
64240    $ECHO "Arg failed:" >&5
64241    $ECHO "$OUTPUT" >&5
64242    JVM_ARG_OK=false
64243  fi
64244
64245
64246  $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
64247  $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
64248  OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
64249  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64250  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64251  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64252    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
64253    JVM_ARG_OK=true
64254  else
64255    $ECHO "Arg failed:" >&5
64256    $ECHO "$OUTPUT" >&5
64257    JVM_ARG_OK=false
64258  fi
64259
64260
64261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
64262$as_echo "$boot_jdk_jvmargs_small" >&6; }
64263
64264  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
64265
64266
64267  JAVA_TOOL_FLAGS_SMALL=""
64268  for f in $JAVA_FLAGS_SMALL; do
64269    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
64270  done
64271
64272
64273
64274# Setup smart javac (after cores and memory have been setup)
64275
64276
64277# Check whether --with-sjavac-server-java was given.
64278if test "${with_sjavac_server_java+set}" = set; then :
64279  withval=$with_sjavac_server_java;
64280fi
64281
64282
64283  if test "x$with_sjavac_server_java" != x; then
64284    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
64285    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
64286    if test "x$FOUND_VERSION" = x; then
64287      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
64288    fi
64289  else
64290    SJAVAC_SERVER_JAVA="$JAVA"
64291  fi
64292
64293
64294  if test "$MEMORY_SIZE" -gt "3000"; then
64295
64296  $ECHO "Check if jvm arg is ok: -d64" >&5
64297  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
64298  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
64299  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64300  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64301  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64302    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
64303    JVM_ARG_OK=true
64304  else
64305    $ECHO "Arg failed:" >&5
64306    $ECHO "$OUTPUT" >&5
64307    JVM_ARG_OK=false
64308  fi
64309
64310    if test "$JVM_ARG_OK" = true; then
64311      JVM_64BIT=true
64312      JVM_ARG_OK=false
64313    fi
64314  fi
64315
64316  MX_VALUE=`expr $MEMORY_SIZE / 2`
64317  if test "$JVM_64BIT" = true; then
64318    # Set ms lower than mx since more than one instance of the server might
64319    # get launched at the same time before they figure out which instance won.
64320    MS_VALUE=512
64321    if test "$MX_VALUE" -gt "2048"; then
64322      MX_VALUE=2048
64323    fi
64324  else
64325    MS_VALUE=256
64326    if test "$MX_VALUE" -gt "1500"; then
64327      MX_VALUE=1500
64328    fi
64329  fi
64330  if test "$MX_VALUE" -lt "512"; then
64331    MX_VALUE=512
64332  fi
64333
64334  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
64335  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
64336  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
64337  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64338  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64339  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64340    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
64341    JVM_ARG_OK=true
64342  else
64343    $ECHO "Arg failed:" >&5
64344    $ECHO "$OUTPUT" >&5
64345    JVM_ARG_OK=false
64346  fi
64347
64348
64349
64350  # Check whether --enable-sjavac was given.
64351if test "${enable_sjavac+set}" = set; then :
64352  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
64353else
64354  ENABLE_SJAVAC="no"
64355fi
64356
64357  if test "x$JVM_ARG_OK" = "xfalse"; then
64358    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
64359$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
64360    ENABLE_SJAVAC="no"
64361  fi
64362  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
64363$as_echo_n "checking whether to use sjavac... " >&6; }
64364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
64365$as_echo "$ENABLE_SJAVAC" >&6; }
64366
64367
64368  # Check whether --enable-javac-server was given.
64369if test "${enable_javac_server+set}" = set; then :
64370  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
64371else
64372  ENABLE_JAVAC_SERVER="yes"
64373fi
64374
64375  if test "x$JVM_ARG_OK" = "xfalse"; then
64376    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
64377$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
64378    ENABLE_JAVAC_SERVER="no"
64379  fi
64380  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
64381$as_echo_n "checking whether to use javac server... " >&6; }
64382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
64383$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
64384
64385
64386  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
64387    # When using a server javac, the small client instances do not need much
64388    # resources.
64389    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
64390  fi
64391
64392
64393# Setup use of icecc if requested
64394
64395  # Check whether --enable-icecc was given.
64396if test "${enable_icecc+set}" = set; then :
64397  enableval=$enable_icecc;
64398fi
64399
64400
64401  if test "x${enable_icecc}" = "xyes"; then
64402
64403
64404
64405  # Publish this variable in the help.
64406
64407
64408  if [ -z "${ICECC_CMD+x}" ]; then
64409    # The variable is not set by user, try to locate tool using the code snippet
64410    for ac_prog in icecc
64411do
64412  # Extract the first word of "$ac_prog", so it can be a program name with args.
64413set dummy $ac_prog; ac_word=$2
64414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64415$as_echo_n "checking for $ac_word... " >&6; }
64416if ${ac_cv_path_ICECC_CMD+:} false; then :
64417  $as_echo_n "(cached) " >&6
64418else
64419  case $ICECC_CMD in
64420  [\\/]* | ?:[\\/]*)
64421  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64422  ;;
64423  *)
64424  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64425for as_dir in $PATH
64426do
64427  IFS=$as_save_IFS
64428  test -z "$as_dir" && as_dir=.
64429    for ac_exec_ext in '' $ac_executable_extensions; do
64430  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64431    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64432    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64433    break 2
64434  fi
64435done
64436  done
64437IFS=$as_save_IFS
64438
64439  ;;
64440esac
64441fi
64442ICECC_CMD=$ac_cv_path_ICECC_CMD
64443if test -n "$ICECC_CMD"; then
64444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64445$as_echo "$ICECC_CMD" >&6; }
64446else
64447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64448$as_echo "no" >&6; }
64449fi
64450
64451
64452  test -n "$ICECC_CMD" && break
64453done
64454
64455  else
64456    # The variable is set, but is it from the command line or the environment?
64457
64458    # Try to remove the string !ICECC_CMD! from our list.
64459    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
64460    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64461      # If it failed, the variable was not from the command line. Ignore it,
64462      # but warn the user (except for BASH, which is always set by the calling BASH).
64463      if test "xICECC_CMD" != xBASH; then
64464        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
64465$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
64466      fi
64467      # Try to locate tool using the code snippet
64468      for ac_prog in icecc
64469do
64470  # Extract the first word of "$ac_prog", so it can be a program name with args.
64471set dummy $ac_prog; ac_word=$2
64472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64473$as_echo_n "checking for $ac_word... " >&6; }
64474if ${ac_cv_path_ICECC_CMD+:} false; then :
64475  $as_echo_n "(cached) " >&6
64476else
64477  case $ICECC_CMD in
64478  [\\/]* | ?:[\\/]*)
64479  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64480  ;;
64481  *)
64482  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64483for as_dir in $PATH
64484do
64485  IFS=$as_save_IFS
64486  test -z "$as_dir" && as_dir=.
64487    for ac_exec_ext in '' $ac_executable_extensions; do
64488  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64489    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64490    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64491    break 2
64492  fi
64493done
64494  done
64495IFS=$as_save_IFS
64496
64497  ;;
64498esac
64499fi
64500ICECC_CMD=$ac_cv_path_ICECC_CMD
64501if test -n "$ICECC_CMD"; then
64502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64503$as_echo "$ICECC_CMD" >&6; }
64504else
64505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64506$as_echo "no" >&6; }
64507fi
64508
64509
64510  test -n "$ICECC_CMD" && break
64511done
64512
64513    else
64514      # If it succeeded, then it was overridden by the user. We will use it
64515      # for the tool.
64516
64517      # First remove it from the list of overridden variables, so we can test
64518      # for unknown variables in the end.
64519      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64520
64521      # Check if we try to supply an empty value
64522      if test "x$ICECC_CMD" = x; then
64523        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
64524$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
64525        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
64526$as_echo_n "checking for ICECC_CMD... " >&6; }
64527        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64528$as_echo "disabled" >&6; }
64529      else
64530        # Check if the provided tool contains a complete path.
64531        tool_specified="$ICECC_CMD"
64532        tool_basename="${tool_specified##*/}"
64533        if test "x$tool_basename" = "x$tool_specified"; then
64534          # A command without a complete path is provided, search $PATH.
64535          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
64536$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
64537          # Extract the first word of "$tool_basename", so it can be a program name with args.
64538set dummy $tool_basename; ac_word=$2
64539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64540$as_echo_n "checking for $ac_word... " >&6; }
64541if ${ac_cv_path_ICECC_CMD+:} false; then :
64542  $as_echo_n "(cached) " >&6
64543else
64544  case $ICECC_CMD in
64545  [\\/]* | ?:[\\/]*)
64546  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64547  ;;
64548  *)
64549  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64550for as_dir in $PATH
64551do
64552  IFS=$as_save_IFS
64553  test -z "$as_dir" && as_dir=.
64554    for ac_exec_ext in '' $ac_executable_extensions; do
64555  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64556    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64557    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64558    break 2
64559  fi
64560done
64561  done
64562IFS=$as_save_IFS
64563
64564  ;;
64565esac
64566fi
64567ICECC_CMD=$ac_cv_path_ICECC_CMD
64568if test -n "$ICECC_CMD"; then
64569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64570$as_echo "$ICECC_CMD" >&6; }
64571else
64572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64573$as_echo "no" >&6; }
64574fi
64575
64576
64577          if test "x$ICECC_CMD" = x; then
64578            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
64579          fi
64580        else
64581          # Otherwise we believe it is a complete path. Use it as it is.
64582          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
64583$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
64584          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
64585$as_echo_n "checking for ICECC_CMD... " >&6; }
64586          if test ! -x "$tool_specified"; then
64587            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
64588$as_echo "not found" >&6; }
64589            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
64590          fi
64591          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
64592$as_echo "$tool_specified" >&6; }
64593        fi
64594      fi
64595    fi
64596
64597  fi
64598
64599
64600
64601  if test "x$ICECC_CMD" = x; then
64602    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
64603  fi
64604
64605
64606    old_path="$PATH"
64607
64608    # Look for icecc-create-env in some known places
64609    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
64610
64611
64612
64613  # Publish this variable in the help.
64614
64615
64616  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
64617    # The variable is not set by user, try to locate tool using the code snippet
64618    for ac_prog in icecc-create-env
64619do
64620  # Extract the first word of "$ac_prog", so it can be a program name with args.
64621set dummy $ac_prog; ac_word=$2
64622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64623$as_echo_n "checking for $ac_word... " >&6; }
64624if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64625  $as_echo_n "(cached) " >&6
64626else
64627  case $ICECC_CREATE_ENV in
64628  [\\/]* | ?:[\\/]*)
64629  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64630  ;;
64631  *)
64632  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64633for as_dir in $PATH
64634do
64635  IFS=$as_save_IFS
64636  test -z "$as_dir" && as_dir=.
64637    for ac_exec_ext in '' $ac_executable_extensions; do
64638  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64639    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64640    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64641    break 2
64642  fi
64643done
64644  done
64645IFS=$as_save_IFS
64646
64647  ;;
64648esac
64649fi
64650ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64651if test -n "$ICECC_CREATE_ENV"; then
64652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64653$as_echo "$ICECC_CREATE_ENV" >&6; }
64654else
64655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64656$as_echo "no" >&6; }
64657fi
64658
64659
64660  test -n "$ICECC_CREATE_ENV" && break
64661done
64662
64663  else
64664    # The variable is set, but is it from the command line or the environment?
64665
64666    # Try to remove the string !ICECC_CREATE_ENV! from our list.
64667    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
64668    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64669      # If it failed, the variable was not from the command line. Ignore it,
64670      # but warn the user (except for BASH, which is always set by the calling BASH).
64671      if test "xICECC_CREATE_ENV" != xBASH; then
64672        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
64673$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
64674      fi
64675      # Try to locate tool using the code snippet
64676      for ac_prog in icecc-create-env
64677do
64678  # Extract the first word of "$ac_prog", so it can be a program name with args.
64679set dummy $ac_prog; ac_word=$2
64680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64681$as_echo_n "checking for $ac_word... " >&6; }
64682if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64683  $as_echo_n "(cached) " >&6
64684else
64685  case $ICECC_CREATE_ENV in
64686  [\\/]* | ?:[\\/]*)
64687  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64688  ;;
64689  *)
64690  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64691for as_dir in $PATH
64692do
64693  IFS=$as_save_IFS
64694  test -z "$as_dir" && as_dir=.
64695    for ac_exec_ext in '' $ac_executable_extensions; do
64696  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64697    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64698    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64699    break 2
64700  fi
64701done
64702  done
64703IFS=$as_save_IFS
64704
64705  ;;
64706esac
64707fi
64708ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64709if test -n "$ICECC_CREATE_ENV"; then
64710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64711$as_echo "$ICECC_CREATE_ENV" >&6; }
64712else
64713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64714$as_echo "no" >&6; }
64715fi
64716
64717
64718  test -n "$ICECC_CREATE_ENV" && break
64719done
64720
64721    else
64722      # If it succeeded, then it was overridden by the user. We will use it
64723      # for the tool.
64724
64725      # First remove it from the list of overridden variables, so we can test
64726      # for unknown variables in the end.
64727      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64728
64729      # Check if we try to supply an empty value
64730      if test "x$ICECC_CREATE_ENV" = x; then
64731        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
64732$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
64733        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
64734$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
64735        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64736$as_echo "disabled" >&6; }
64737      else
64738        # Check if the provided tool contains a complete path.
64739        tool_specified="$ICECC_CREATE_ENV"
64740        tool_basename="${tool_specified##*/}"
64741        if test "x$tool_basename" = "x$tool_specified"; then
64742          # A command without a complete path is provided, search $PATH.
64743          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
64744$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
64745          # Extract the first word of "$tool_basename", so it can be a program name with args.
64746set dummy $tool_basename; ac_word=$2
64747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64748$as_echo_n "checking for $ac_word... " >&6; }
64749if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64750  $as_echo_n "(cached) " >&6
64751else
64752  case $ICECC_CREATE_ENV in
64753  [\\/]* | ?:[\\/]*)
64754  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64755  ;;
64756  *)
64757  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64758for as_dir in $PATH
64759do
64760  IFS=$as_save_IFS
64761  test -z "$as_dir" && as_dir=.
64762    for ac_exec_ext in '' $ac_executable_extensions; do
64763  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64764    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64765    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64766    break 2
64767  fi
64768done
64769  done
64770IFS=$as_save_IFS
64771
64772  ;;
64773esac
64774fi
64775ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64776if test -n "$ICECC_CREATE_ENV"; then
64777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64778$as_echo "$ICECC_CREATE_ENV" >&6; }
64779else
64780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64781$as_echo "no" >&6; }
64782fi
64783
64784
64785          if test "x$ICECC_CREATE_ENV" = x; then
64786            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
64787          fi
64788        else
64789          # Otherwise we believe it is a complete path. Use it as it is.
64790          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
64791$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
64792          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
64793$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
64794          if test ! -x "$tool_specified"; then
64795            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
64796$as_echo "not found" >&6; }
64797            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
64798          fi
64799          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
64800$as_echo "$tool_specified" >&6; }
64801        fi
64802      fi
64803    fi
64804
64805  fi
64806
64807
64808
64809  if test "x$ICECC_CREATE_ENV" = x; then
64810    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
64811  fi
64812
64813
64814    # Use icecc-create-env to create a minimal compilation environment that can
64815    # be sent to the other hosts in the icecream cluster.
64816    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
64817    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
64818    # Older versions of icecc does not have the --gcc parameter
64819    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
64820      icecc_gcc_arg="--gcc"
64821    fi
64822    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
64823
64824  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
64825      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
64826          ${icecc_create_env_log} 2>&1 )
64827  if test "$?" != "0"; then
64828    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
64829$as_echo "$as_me: icecc-create-env output:" >&6;}
64830    cat \
64831          ${icecc_create_env_log}
64832    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
64833  fi
64834
64835    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
64836      # For clang, the icecc compilerwrapper is needed. It usually resides next
64837      # to icecc-create-env.
64838
64839
64840
64841  # Publish this variable in the help.
64842
64843
64844  if [ -z "${ICECC_WRAPPER+x}" ]; then
64845    # The variable is not set by user, try to locate tool using the code snippet
64846    for ac_prog in compilerwrapper
64847do
64848  # Extract the first word of "$ac_prog", so it can be a program name with args.
64849set dummy $ac_prog; ac_word=$2
64850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64851$as_echo_n "checking for $ac_word... " >&6; }
64852if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
64853  $as_echo_n "(cached) " >&6
64854else
64855  case $ICECC_WRAPPER in
64856  [\\/]* | ?:[\\/]*)
64857  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
64858  ;;
64859  *)
64860  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64861for as_dir in $PATH
64862do
64863  IFS=$as_save_IFS
64864  test -z "$as_dir" && as_dir=.
64865    for ac_exec_ext in '' $ac_executable_extensions; do
64866  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64867    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
64868    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64869    break 2
64870  fi
64871done
64872  done
64873IFS=$as_save_IFS
64874
64875  ;;
64876esac
64877fi
64878ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
64879if test -n "$ICECC_WRAPPER"; then
64880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
64881$as_echo "$ICECC_WRAPPER" >&6; }
64882else
64883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64884$as_echo "no" >&6; }
64885fi
64886
64887
64888  test -n "$ICECC_WRAPPER" && break
64889done
64890
64891  else
64892    # The variable is set, but is it from the command line or the environment?
64893
64894    # Try to remove the string !ICECC_WRAPPER! from our list.
64895    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
64896    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64897      # If it failed, the variable was not from the command line. Ignore it,
64898      # but warn the user (except for BASH, which is always set by the calling BASH).
64899      if test "xICECC_WRAPPER" != xBASH; then
64900        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
64901$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
64902      fi
64903      # Try to locate tool using the code snippet
64904      for ac_prog in compilerwrapper
64905do
64906  # Extract the first word of "$ac_prog", so it can be a program name with args.
64907set dummy $ac_prog; ac_word=$2
64908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64909$as_echo_n "checking for $ac_word... " >&6; }
64910if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
64911  $as_echo_n "(cached) " >&6
64912else
64913  case $ICECC_WRAPPER in
64914  [\\/]* | ?:[\\/]*)
64915  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
64916  ;;
64917  *)
64918  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64919for as_dir in $PATH
64920do
64921  IFS=$as_save_IFS
64922  test -z "$as_dir" && as_dir=.
64923    for ac_exec_ext in '' $ac_executable_extensions; do
64924  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64925    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
64926    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64927    break 2
64928  fi
64929done
64930  done
64931IFS=$as_save_IFS
64932
64933  ;;
64934esac
64935fi
64936ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
64937if test -n "$ICECC_WRAPPER"; then
64938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
64939$as_echo "$ICECC_WRAPPER" >&6; }
64940else
64941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64942$as_echo "no" >&6; }
64943fi
64944
64945
64946  test -n "$ICECC_WRAPPER" && break
64947done
64948
64949    else
64950      # If it succeeded, then it was overridden by the user. We will use it
64951      # for the tool.
64952
64953      # First remove it from the list of overridden variables, so we can test
64954      # for unknown variables in the end.
64955      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64956
64957      # Check if we try to supply an empty value
64958      if test "x$ICECC_WRAPPER" = x; then
64959        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
64960$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
64961        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
64962$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
64963        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64964$as_echo "disabled" >&6; }
64965      else
64966        # Check if the provided tool contains a complete path.
64967        tool_specified="$ICECC_WRAPPER"
64968        tool_basename="${tool_specified##*/}"
64969        if test "x$tool_basename" = "x$tool_specified"; then
64970          # A command without a complete path is provided, search $PATH.
64971          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
64972$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
64973          # Extract the first word of "$tool_basename", so it can be a program name with args.
64974set dummy $tool_basename; ac_word=$2
64975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64976$as_echo_n "checking for $ac_word... " >&6; }
64977if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
64978  $as_echo_n "(cached) " >&6
64979else
64980  case $ICECC_WRAPPER in
64981  [\\/]* | ?:[\\/]*)
64982  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
64983  ;;
64984  *)
64985  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64986for as_dir in $PATH
64987do
64988  IFS=$as_save_IFS
64989  test -z "$as_dir" && as_dir=.
64990    for ac_exec_ext in '' $ac_executable_extensions; do
64991  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64992    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
64993    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64994    break 2
64995  fi
64996done
64997  done
64998IFS=$as_save_IFS
64999
65000  ;;
65001esac
65002fi
65003ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65004if test -n "$ICECC_WRAPPER"; then
65005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65006$as_echo "$ICECC_WRAPPER" >&6; }
65007else
65008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65009$as_echo "no" >&6; }
65010fi
65011
65012
65013          if test "x$ICECC_WRAPPER" = x; then
65014            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65015          fi
65016        else
65017          # Otherwise we believe it is a complete path. Use it as it is.
65018          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
65019$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
65020          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65021$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65022          if test ! -x "$tool_specified"; then
65023            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65024$as_echo "not found" >&6; }
65025            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
65026          fi
65027          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65028$as_echo "$tool_specified" >&6; }
65029        fi
65030      fi
65031    fi
65032
65033  fi
65034
65035
65036
65037  if test "x$ICECC_WRAPPER" = x; then
65038    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
65039  fi
65040
65041
65042
65043  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65044      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
65045  if test "$?" != "0"; then
65046    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65047$as_echo "$as_me: icecc-create-env output:" >&6;}
65048    cat ${icecc_create_env_log}
65049    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65050  fi
65051
65052    else
65053      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
65054    fi
65055    PATH="$old_path"
65056    # The bundle with the compiler gets a name based on checksums. Parse log file
65057    # to find it.
65058    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
65059    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65060    if test ! -f ${ICECC_ENV_BUNDLE}; then
65061      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65062    fi
65063    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
65064$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
65065    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65066$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65067    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
65068
65069    if test "x${COMPILE_TYPE}" = "xcross"; then
65070      # If cross compiling, create a separate env package for the build compiler
65071      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
65072      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
65073      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
65074
65075  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65076      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
65077            ${icecc_create_env_log_build} 2>&1 )
65078  if test "$?" != "0"; then
65079    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65080$as_echo "$as_me: icecc-create-env output:" >&6;}
65081    cat \
65082            ${icecc_create_env_log_build}
65083    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65084  fi
65085
65086      elif test "x${BUILD_CC##*/}" = "xclang"; then
65087
65088  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65089      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
65090  if test "$?" != "0"; then
65091    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65092$as_echo "$as_me: icecc-create-env output:" >&6;}
65093    cat ${icecc_create_env_log_build}
65094    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65095  fi
65096
65097      else
65098        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
65099      fi
65100      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
65101      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65102      if test ! -f ${ICECC_ENV_BUNDLE}; then
65103        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65104      fi
65105      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
65106$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
65107      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65108$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65109      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
65110          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
65111    else
65112      BUILD_ICECC="${ICECC}"
65113    fi
65114
65115
65116  fi
65117
65118
65119# Can the C/C++ compiler use precompiled headers?
65120
65121
65122  ###############################################################################
65123  #
65124  # Can the C/C++ compiler use precompiled headers?
65125  #
65126  # Check whether --enable-precompiled-headers was given.
65127if test "${enable_precompiled_headers+set}" = set; then :
65128  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
65129else
65130  ENABLE_PRECOMPH=yes
65131fi
65132
65133
65134  USE_PRECOMPILED_HEADER=1
65135  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
65136$as_echo_n "checking If precompiled header is enabled... " >&6; }
65137  if test "x$ENABLE_PRECOMPH" = xno; then
65138    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65139$as_echo "no, forced" >&6; }
65140    USE_PRECOMPILED_HEADER=0
65141  elif test "x$ICECC" != "x"; then
65142    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
65143$as_echo "no, does not work effectively with icecc" >&6; }
65144    USE_PRECOMPILED_HEADER=0
65145  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
65146    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
65147$as_echo "no, does not work with Solaris Studio" >&6; }
65148    USE_PRECOMPILED_HEADER=0
65149  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
65150    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with xlc" >&5
65151$as_echo "no, does not work with xlc" >&6; }
65152    USE_PRECOMPILED_HEADER=0
65153  else
65154    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65155$as_echo "yes" >&6; }
65156  fi
65157
65158  if test "x$ENABLE_PRECOMPH" = xyes; then
65159    # Check that the compiler actually supports precomp headers.
65160    if test "x$TOOLCHAIN_TYPE" = xgcc; then
65161      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
65162$as_echo_n "checking that precompiled headers work... " >&6; }
65163      echo "int alfa();" > conftest.h
65164      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
65165      if test ! -f conftest.hpp.gch; then
65166        USE_PRECOMPILED_HEADER=0
65167        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65168$as_echo "no" >&6; }
65169      else
65170        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65171$as_echo "yes" >&6; }
65172      fi
65173      $RM conftest.h conftest.hpp.gch
65174    fi
65175  fi
65176
65177
65178
65179
65180# Setup use of ccache, if available
65181
65182  # Check whether --enable-ccache was given.
65183if test "${enable_ccache+set}" = set; then :
65184  enableval=$enable_ccache;
65185fi
65186
65187
65188  CCACHE_STATUS=
65189  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
65190$as_echo_n "checking is ccache enabled... " >&6; }
65191  if test "x$enable_ccache" = xyes; then
65192    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
65193      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65194$as_echo "yes" >&6; }
65195      OLD_PATH="$PATH"
65196      if test "x$TOOLCHAIN_PATH" != x; then
65197        PATH=$TOOLCHAIN_PATH:$PATH
65198      fi
65199
65200
65201
65202  # Publish this variable in the help.
65203
65204
65205  if [ -z "${CCACHE+x}" ]; then
65206    # The variable is not set by user, try to locate tool using the code snippet
65207    for ac_prog in ccache
65208do
65209  # Extract the first word of "$ac_prog", so it can be a program name with args.
65210set dummy $ac_prog; ac_word=$2
65211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65212$as_echo_n "checking for $ac_word... " >&6; }
65213if ${ac_cv_path_CCACHE+:} false; then :
65214  $as_echo_n "(cached) " >&6
65215else
65216  case $CCACHE in
65217  [\\/]* | ?:[\\/]*)
65218  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65219  ;;
65220  *)
65221  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65222for as_dir in $PATH
65223do
65224  IFS=$as_save_IFS
65225  test -z "$as_dir" && as_dir=.
65226    for ac_exec_ext in '' $ac_executable_extensions; do
65227  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65228    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65229    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65230    break 2
65231  fi
65232done
65233  done
65234IFS=$as_save_IFS
65235
65236  ;;
65237esac
65238fi
65239CCACHE=$ac_cv_path_CCACHE
65240if test -n "$CCACHE"; then
65241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65242$as_echo "$CCACHE" >&6; }
65243else
65244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65245$as_echo "no" >&6; }
65246fi
65247
65248
65249  test -n "$CCACHE" && break
65250done
65251
65252  else
65253    # The variable is set, but is it from the command line or the environment?
65254
65255    # Try to remove the string !CCACHE! from our list.
65256    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
65257    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65258      # If it failed, the variable was not from the command line. Ignore it,
65259      # but warn the user (except for BASH, which is always set by the calling BASH).
65260      if test "xCCACHE" != xBASH; then
65261        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
65262$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
65263      fi
65264      # Try to locate tool using the code snippet
65265      for ac_prog in ccache
65266do
65267  # Extract the first word of "$ac_prog", so it can be a program name with args.
65268set dummy $ac_prog; ac_word=$2
65269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65270$as_echo_n "checking for $ac_word... " >&6; }
65271if ${ac_cv_path_CCACHE+:} false; then :
65272  $as_echo_n "(cached) " >&6
65273else
65274  case $CCACHE in
65275  [\\/]* | ?:[\\/]*)
65276  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65277  ;;
65278  *)
65279  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65280for as_dir in $PATH
65281do
65282  IFS=$as_save_IFS
65283  test -z "$as_dir" && as_dir=.
65284    for ac_exec_ext in '' $ac_executable_extensions; do
65285  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65286    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65287    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65288    break 2
65289  fi
65290done
65291  done
65292IFS=$as_save_IFS
65293
65294  ;;
65295esac
65296fi
65297CCACHE=$ac_cv_path_CCACHE
65298if test -n "$CCACHE"; then
65299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65300$as_echo "$CCACHE" >&6; }
65301else
65302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65303$as_echo "no" >&6; }
65304fi
65305
65306
65307  test -n "$CCACHE" && break
65308done
65309
65310    else
65311      # If it succeeded, then it was overridden by the user. We will use it
65312      # for the tool.
65313
65314      # First remove it from the list of overridden variables, so we can test
65315      # for unknown variables in the end.
65316      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65317
65318      # Check if we try to supply an empty value
65319      if test "x$CCACHE" = x; then
65320        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
65321$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
65322        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65323$as_echo_n "checking for CCACHE... " >&6; }
65324        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65325$as_echo "disabled" >&6; }
65326      else
65327        # Check if the provided tool contains a complete path.
65328        tool_specified="$CCACHE"
65329        tool_basename="${tool_specified##*/}"
65330        if test "x$tool_basename" = "x$tool_specified"; then
65331          # A command without a complete path is provided, search $PATH.
65332          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
65333$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
65334          # Extract the first word of "$tool_basename", so it can be a program name with args.
65335set dummy $tool_basename; ac_word=$2
65336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65337$as_echo_n "checking for $ac_word... " >&6; }
65338if ${ac_cv_path_CCACHE+:} false; then :
65339  $as_echo_n "(cached) " >&6
65340else
65341  case $CCACHE in
65342  [\\/]* | ?:[\\/]*)
65343  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65344  ;;
65345  *)
65346  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65347for as_dir in $PATH
65348do
65349  IFS=$as_save_IFS
65350  test -z "$as_dir" && as_dir=.
65351    for ac_exec_ext in '' $ac_executable_extensions; do
65352  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65353    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65354    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65355    break 2
65356  fi
65357done
65358  done
65359IFS=$as_save_IFS
65360
65361  ;;
65362esac
65363fi
65364CCACHE=$ac_cv_path_CCACHE
65365if test -n "$CCACHE"; then
65366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65367$as_echo "$CCACHE" >&6; }
65368else
65369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65370$as_echo "no" >&6; }
65371fi
65372
65373
65374          if test "x$CCACHE" = x; then
65375            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65376          fi
65377        else
65378          # Otherwise we believe it is a complete path. Use it as it is.
65379          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
65380$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
65381          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65382$as_echo_n "checking for CCACHE... " >&6; }
65383          if test ! -x "$tool_specified"; then
65384            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65385$as_echo "not found" >&6; }
65386            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
65387          fi
65388          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65389$as_echo "$tool_specified" >&6; }
65390        fi
65391      fi
65392    fi
65393
65394  fi
65395
65396
65397
65398  if test "x$CCACHE" = x; then
65399    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
65400  fi
65401
65402
65403      PATH="$OLD_PATH"
65404      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
65405      CCACHE_STATUS="Active ($CCACHE_VERSION)"
65406    else
65407      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65408$as_echo "no" >&6; }
65409      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
65410$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
65411    fi
65412  elif test "x$enable_ccache" = xno; then
65413    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
65414$as_echo "no, explicitly disabled" >&6; }
65415    CCACHE_STATUS="Disabled"
65416  elif test "x$enable_ccache" = x; then
65417    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65418$as_echo "no" >&6; }
65419  else
65420    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
65421$as_echo "unknown" >&6; }
65422    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
65423  fi
65424
65425
65426
65427# Check whether --with-ccache-dir was given.
65428if test "${with_ccache_dir+set}" = set; then :
65429  withval=$with_ccache_dir;
65430fi
65431
65432
65433  if test "x$with_ccache_dir" != x; then
65434    # When using a non home ccache directory, assume the use is to share ccache files
65435    # with other users. Thus change the umask.
65436    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
65437    if test "x$CCACHE" = x; then
65438      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
65439$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
65440    fi
65441  fi
65442
65443  if test "x$CCACHE" != x; then
65444
65445  if test "x$CCACHE" != x; then
65446    if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
65447      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
65448          $GREP -e '^1\.' -e '^2\.' -e '^3\.0\.' -e '^3\.1\.'`
65449      if test "x$HAS_BAD_CCACHE" != "x"; then
65450        as_fn_error $? "On macosx, ccache 3.2 or later is required, found $CCACHE_VERSION" "$LINENO" 5
65451      fi
65452    fi
65453    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
65454      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
65455          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
65456      if test "x$HAS_BAD_CCACHE" != "x"; then
65457        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
65458      fi
65459      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
65460$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
65461      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
65462      PUSHED_FLAGS="$CXXFLAGS"
65463      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
65464      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65465/* end confdefs.h.  */
65466
65467int
65468main ()
65469{
65470
65471  ;
65472  return 0;
65473}
65474_ACEOF
65475if ac_fn_cxx_try_compile "$LINENO"; then :
65476  CC_KNOWS_CCACHE_TRICK=yes
65477else
65478  CC_KNOWS_CCACHE_TRICK=no
65479fi
65480rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
65481      CXXFLAGS="$PUSHED_FLAGS"
65482      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
65483        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65484$as_echo "yes" >&6; }
65485        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
65486
65487        CCACHE_SLOPPINESS=pch_defines,time_macros
65488      else
65489        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65490$as_echo "no" >&6; }
65491        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
65492      fi
65493    fi
65494
65495    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
65496        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
65497
65498    if test "x$SET_CCACHE_DIR" != x; then
65499      mkdir -p $CCACHE_DIR > /dev/null 2>&1
65500      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
65501    fi
65502  fi
65503
65504  fi
65505
65506
65507###############################################################################
65508#
65509# And now the finish...
65510#
65511###############################################################################
65512
65513# Check for some common pitfalls
65514
65515  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65516    file_to_test="$SRC_ROOT/LICENSE"
65517    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
65518      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
65519    fi
65520  fi
65521
65522
65523  # Did user specify any unknown variables?
65524
65525  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
65526    # Replace the separating ! with spaces before presenting for end user.
65527    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
65528    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
65529$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
65530  fi
65531
65532
65533  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
65534$as_echo_n "checking if build directory is on local disk... " >&6; }
65535
65536  # df -l lists only local disks; if the given directory is not found then
65537  # a non-zero exit code is given
65538  if test "x$DF" = x; then
65539    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65540      # msys does not have df; use Windows "net use" instead.
65541      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
65542      if test "x$IS_NETWORK_DISK" = x; then
65543        OUTPUT_DIR_IS_LOCAL="yes"
65544      else
65545        OUTPUT_DIR_IS_LOCAL="no"
65546      fi
65547    else
65548      # No df here, say it's local
65549      OUTPUT_DIR_IS_LOCAL="yes"
65550    fi
65551  else
65552    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
65553      OUTPUT_DIR_IS_LOCAL="yes"
65554    else
65555      OUTPUT_DIR_IS_LOCAL="no"
65556    fi
65557  fi
65558
65559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
65560$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
65561
65562
65563
65564  # Check if the user has any old-style ALT_ variables set.
65565  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
65566
65567  # Before generating output files, test if they exist. If they do, this is a reconfigure.
65568  # Since we can't properly handle the dependencies for this, warn the user about the situation
65569  if test -e $OUTPUT_ROOT/spec.gmk; then
65570    IS_RECONFIGURE=yes
65571  else
65572    IS_RECONFIGURE=no
65573  fi
65574
65575
65576# At the end, call the custom hook. (Dummy macro if no custom sources available)
65577
65578
65579# This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
65580
65581  # Keep feature lists sorted and free of duplicates
65582  JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
65583  JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
65584  JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
65585  JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
65586  JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
65587  JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
65588  JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
65589
65590  # Validate features
65591  for variant in $JVM_VARIANTS; do
65592    { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
65593$as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
65594    features_var_name=JVM_FEATURES_$variant
65595    JVM_FEATURES_TO_TEST=${!features_var_name}
65596    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
65597$as_echo "$JVM_FEATURES_TO_TEST" >&6; }
65598    NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
65599    STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
65600    INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
65601    if test "x$INVALID_FEATURES" != x; then
65602      as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
65603    fi
65604  done
65605
65606
65607# We're messing a bit with internal autoconf variables to put the config.status
65608# in the output directory instead of the current directory.
65609CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
65610
65611# Create the actual output files. Now the main work of configure is done.
65612cat >confcache <<\_ACEOF
65613# This file is a shell script that caches the results of configure
65614# tests run on this system so they can be shared between configure
65615# scripts and configure runs, see configure's option --config-cache.
65616# It is not useful on other systems.  If it contains results you don't
65617# want to keep, you may remove or edit it.
65618#
65619# config.status only pays attention to the cache file if you give it
65620# the --recheck option to rerun configure.
65621#
65622# `ac_cv_env_foo' variables (set or unset) will be overridden when
65623# loading this file, other *unset* `ac_cv_foo' will be assigned the
65624# following values.
65625
65626_ACEOF
65627
65628# The following way of writing the cache mishandles newlines in values,
65629# but we know of no workaround that is simple, portable, and efficient.
65630# So, we kill variables containing newlines.
65631# Ultrix sh set writes to stderr and can't be redirected directly,
65632# and sets the high bit in the cache file unless we assign to the vars.
65633(
65634  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
65635    eval ac_val=\$$ac_var
65636    case $ac_val in #(
65637    *${as_nl}*)
65638      case $ac_var in #(
65639      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
65640$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
65641      esac
65642      case $ac_var in #(
65643      _ | IFS | as_nl) ;; #(
65644      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
65645      *) { eval $ac_var=; unset $ac_var;} ;;
65646      esac ;;
65647    esac
65648  done
65649
65650  (set) 2>&1 |
65651    case $as_nl`(ac_space=' '; set) 2>&1` in #(
65652    *${as_nl}ac_space=\ *)
65653      # `set' does not quote correctly, so add quotes: double-quote
65654      # substitution turns \\\\ into \\, and sed turns \\ into \.
65655      sed -n \
65656	"s/'/'\\\\''/g;
65657	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
65658      ;; #(
65659    *)
65660      # `set' quotes correctly as required by POSIX, so do not add quotes.
65661      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
65662      ;;
65663    esac |
65664    sort
65665) |
65666  sed '
65667     /^ac_cv_env_/b end
65668     t clear
65669     :clear
65670     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
65671     t end
65672     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
65673     :end' >>confcache
65674if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
65675  if test -w "$cache_file"; then
65676    if test "x$cache_file" != "x/dev/null"; then
65677      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
65678$as_echo "$as_me: updating cache $cache_file" >&6;}
65679      if test ! -f "$cache_file" || test -h "$cache_file"; then
65680	cat confcache >"$cache_file"
65681      else
65682        case $cache_file in #(
65683        */* | ?:*)
65684	  mv -f confcache "$cache_file"$$ &&
65685	  mv -f "$cache_file"$$ "$cache_file" ;; #(
65686        *)
65687	  mv -f confcache "$cache_file" ;;
65688	esac
65689      fi
65690    fi
65691  else
65692    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
65693$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
65694  fi
65695fi
65696rm -f confcache
65697
65698test "x$prefix" = xNONE && prefix=$ac_default_prefix
65699# Let make expand exec_prefix.
65700test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
65701
65702# Transform confdefs.h into DEFS.
65703# Protect against shell expansion while executing Makefile rules.
65704# Protect against Makefile macro expansion.
65705#
65706# If the first sed substitution is executed (which looks for macros that
65707# take arguments), then branch to the quote section.  Otherwise,
65708# look for a macro that doesn't take arguments.
65709ac_script='
65710:mline
65711/\\$/{
65712 N
65713 s,\\\n,,
65714 b mline
65715}
65716t clear
65717:clear
65718s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
65719t quote
65720s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
65721t quote
65722b any
65723:quote
65724s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
65725s/\[/\\&/g
65726s/\]/\\&/g
65727s/\$/$$/g
65728H
65729:any
65730${
65731	g
65732	s/^\n//
65733	s/\n/ /g
65734	p
65735}
65736'
65737DEFS=`sed -n "$ac_script" confdefs.h`
65738
65739
65740ac_libobjs=
65741ac_ltlibobjs=
65742U=
65743for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
65744  # 1. Remove the extension, and $U if already installed.
65745  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
65746  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
65747  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
65748  #    will be set to the directory where LIBOBJS objects are built.
65749  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
65750  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
65751done
65752LIBOBJS=$ac_libobjs
65753
65754LTLIBOBJS=$ac_ltlibobjs
65755
65756
65757
65758: "${CONFIG_STATUS=./config.status}"
65759ac_write_fail=0
65760ac_clean_files_save=$ac_clean_files
65761ac_clean_files="$ac_clean_files $CONFIG_STATUS"
65762{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
65763$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
65764as_write_fail=0
65765cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
65766#! $SHELL
65767# Generated by $as_me.
65768# Run this file to recreate the current configuration.
65769# Compiler output produced by configure, useful for debugging
65770# configure, is in config.log if it exists.
65771
65772debug=false
65773ac_cs_recheck=false
65774ac_cs_silent=false
65775
65776SHELL=\${CONFIG_SHELL-$SHELL}
65777export SHELL
65778_ASEOF
65779cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
65780## -------------------- ##
65781## M4sh Initialization. ##
65782## -------------------- ##
65783
65784# Be more Bourne compatible
65785DUALCASE=1; export DUALCASE # for MKS sh
65786if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
65787  emulate sh
65788  NULLCMD=:
65789  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
65790  # is contrary to our usage.  Disable this feature.
65791  alias -g '${1+"$@"}'='"$@"'
65792  setopt NO_GLOB_SUBST
65793else
65794  case `(set -o) 2>/dev/null` in #(
65795  *posix*) :
65796    set -o posix ;; #(
65797  *) :
65798     ;;
65799esac
65800fi
65801
65802
65803as_nl='
65804'
65805export as_nl
65806# Printing a long string crashes Solaris 7 /usr/bin/printf.
65807as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
65808as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
65809as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
65810# Prefer a ksh shell builtin over an external printf program on Solaris,
65811# but without wasting forks for bash or zsh.
65812if test -z "$BASH_VERSION$ZSH_VERSION" \
65813    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
65814  as_echo='print -r --'
65815  as_echo_n='print -rn --'
65816elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
65817  as_echo='printf %s\n'
65818  as_echo_n='printf %s'
65819else
65820  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
65821    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
65822    as_echo_n='/usr/ucb/echo -n'
65823  else
65824    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
65825    as_echo_n_body='eval
65826      arg=$1;
65827      case $arg in #(
65828      *"$as_nl"*)
65829	expr "X$arg" : "X\\(.*\\)$as_nl";
65830	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
65831      esac;
65832      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
65833    '
65834    export as_echo_n_body
65835    as_echo_n='sh -c $as_echo_n_body as_echo'
65836  fi
65837  export as_echo_body
65838  as_echo='sh -c $as_echo_body as_echo'
65839fi
65840
65841# The user is always right.
65842if test "${PATH_SEPARATOR+set}" != set; then
65843  PATH_SEPARATOR=:
65844  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
65845    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
65846      PATH_SEPARATOR=';'
65847  }
65848fi
65849
65850
65851# IFS
65852# We need space, tab and new line, in precisely that order.  Quoting is
65853# there to prevent editors from complaining about space-tab.
65854# (If _AS_PATH_WALK were called with IFS unset, it would disable word
65855# splitting by setting IFS to empty value.)
65856IFS=" ""	$as_nl"
65857
65858# Find who we are.  Look in the path if we contain no directory separator.
65859as_myself=
65860case $0 in #((
65861  *[\\/]* ) as_myself=$0 ;;
65862  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65863for as_dir in $PATH
65864do
65865  IFS=$as_save_IFS
65866  test -z "$as_dir" && as_dir=.
65867    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
65868  done
65869IFS=$as_save_IFS
65870
65871     ;;
65872esac
65873# We did not find ourselves, most probably we were run as `sh COMMAND'
65874# in which case we are not to be found in the path.
65875if test "x$as_myself" = x; then
65876  as_myself=$0
65877fi
65878if test ! -f "$as_myself"; then
65879  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
65880  exit 1
65881fi
65882
65883# Unset variables that we do not need and which cause bugs (e.g. in
65884# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
65885# suppresses any "Segmentation fault" message there.  '((' could
65886# trigger a bug in pdksh 5.2.14.
65887for as_var in BASH_ENV ENV MAIL MAILPATH
65888do eval test x\${$as_var+set} = xset \
65889  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
65890done
65891PS1='$ '
65892PS2='> '
65893PS4='+ '
65894
65895# NLS nuisances.
65896LC_ALL=C
65897export LC_ALL
65898LANGUAGE=C
65899export LANGUAGE
65900
65901# CDPATH.
65902(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
65903
65904
65905# as_fn_error STATUS ERROR [LINENO LOG_FD]
65906# ----------------------------------------
65907# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
65908# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
65909# script with STATUS, using 1 if that was 0.
65910as_fn_error ()
65911{
65912  as_status=$1; test $as_status -eq 0 && as_status=1
65913  if test "$4"; then
65914    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
65915    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
65916  fi
65917  $as_echo "$as_me: error: $2" >&2
65918  as_fn_exit $as_status
65919} # as_fn_error
65920
65921
65922# as_fn_set_status STATUS
65923# -----------------------
65924# Set $? to STATUS, without forking.
65925as_fn_set_status ()
65926{
65927  return $1
65928} # as_fn_set_status
65929
65930# as_fn_exit STATUS
65931# -----------------
65932# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
65933as_fn_exit ()
65934{
65935  set +e
65936  as_fn_set_status $1
65937  exit $1
65938} # as_fn_exit
65939
65940# as_fn_unset VAR
65941# ---------------
65942# Portably unset VAR.
65943as_fn_unset ()
65944{
65945  { eval $1=; unset $1;}
65946}
65947as_unset=as_fn_unset
65948# as_fn_append VAR VALUE
65949# ----------------------
65950# Append the text in VALUE to the end of the definition contained in VAR. Take
65951# advantage of any shell optimizations that allow amortized linear growth over
65952# repeated appends, instead of the typical quadratic growth present in naive
65953# implementations.
65954if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
65955  eval 'as_fn_append ()
65956  {
65957    eval $1+=\$2
65958  }'
65959else
65960  as_fn_append ()
65961  {
65962    eval $1=\$$1\$2
65963  }
65964fi # as_fn_append
65965
65966# as_fn_arith ARG...
65967# ------------------
65968# Perform arithmetic evaluation on the ARGs, and store the result in the
65969# global $as_val. Take advantage of shells that can avoid forks. The arguments
65970# must be portable across $(()) and expr.
65971if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
65972  eval 'as_fn_arith ()
65973  {
65974    as_val=$(( $* ))
65975  }'
65976else
65977  as_fn_arith ()
65978  {
65979    as_val=`expr "$@" || test $? -eq 1`
65980  }
65981fi # as_fn_arith
65982
65983
65984if expr a : '\(a\)' >/dev/null 2>&1 &&
65985   test "X`expr 00001 : '.*\(...\)'`" = X001; then
65986  as_expr=expr
65987else
65988  as_expr=false
65989fi
65990
65991if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
65992  as_basename=basename
65993else
65994  as_basename=false
65995fi
65996
65997if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
65998  as_dirname=dirname
65999else
66000  as_dirname=false
66001fi
66002
66003as_me=`$as_basename -- "$0" ||
66004$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
66005	 X"$0" : 'X\(//\)$' \| \
66006	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
66007$as_echo X/"$0" |
66008    sed '/^.*\/\([^/][^/]*\)\/*$/{
66009	    s//\1/
66010	    q
66011	  }
66012	  /^X\/\(\/\/\)$/{
66013	    s//\1/
66014	    q
66015	  }
66016	  /^X\/\(\/\).*/{
66017	    s//\1/
66018	    q
66019	  }
66020	  s/.*/./; q'`
66021
66022# Avoid depending upon Character Ranges.
66023as_cr_letters='abcdefghijklmnopqrstuvwxyz'
66024as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
66025as_cr_Letters=$as_cr_letters$as_cr_LETTERS
66026as_cr_digits='0123456789'
66027as_cr_alnum=$as_cr_Letters$as_cr_digits
66028
66029ECHO_C= ECHO_N= ECHO_T=
66030case `echo -n x` in #(((((
66031-n*)
66032  case `echo 'xy\c'` in
66033  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
66034  xy)  ECHO_C='\c';;
66035  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
66036       ECHO_T='	';;
66037  esac;;
66038*)
66039  ECHO_N='-n';;
66040esac
66041
66042rm -f conf$$ conf$$.exe conf$$.file
66043if test -d conf$$.dir; then
66044  rm -f conf$$.dir/conf$$.file
66045else
66046  rm -f conf$$.dir
66047  mkdir conf$$.dir 2>/dev/null
66048fi
66049if (echo >conf$$.file) 2>/dev/null; then
66050  if ln -s conf$$.file conf$$ 2>/dev/null; then
66051    as_ln_s='ln -s'
66052    # ... but there are two gotchas:
66053    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
66054    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
66055    # In both cases, we have to default to `cp -pR'.
66056    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
66057      as_ln_s='cp -pR'
66058  elif ln conf$$.file conf$$ 2>/dev/null; then
66059    as_ln_s=ln
66060  else
66061    as_ln_s='cp -pR'
66062  fi
66063else
66064  as_ln_s='cp -pR'
66065fi
66066rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
66067rmdir conf$$.dir 2>/dev/null
66068
66069
66070# as_fn_mkdir_p
66071# -------------
66072# Create "$as_dir" as a directory, including parents if necessary.
66073as_fn_mkdir_p ()
66074{
66075
66076  case $as_dir in #(
66077  -*) as_dir=./$as_dir;;
66078  esac
66079  test -d "$as_dir" || eval $as_mkdir_p || {
66080    as_dirs=
66081    while :; do
66082      case $as_dir in #(
66083      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
66084      *) as_qdir=$as_dir;;
66085      esac
66086      as_dirs="'$as_qdir' $as_dirs"
66087      as_dir=`$as_dirname -- "$as_dir" ||
66088$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66089	 X"$as_dir" : 'X\(//\)[^/]' \| \
66090	 X"$as_dir" : 'X\(//\)$' \| \
66091	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
66092$as_echo X"$as_dir" |
66093    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66094	    s//\1/
66095	    q
66096	  }
66097	  /^X\(\/\/\)[^/].*/{
66098	    s//\1/
66099	    q
66100	  }
66101	  /^X\(\/\/\)$/{
66102	    s//\1/
66103	    q
66104	  }
66105	  /^X\(\/\).*/{
66106	    s//\1/
66107	    q
66108	  }
66109	  s/.*/./; q'`
66110      test -d "$as_dir" && break
66111    done
66112    test -z "$as_dirs" || eval "mkdir $as_dirs"
66113  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
66114
66115
66116} # as_fn_mkdir_p
66117if mkdir -p . 2>/dev/null; then
66118  as_mkdir_p='mkdir -p "$as_dir"'
66119else
66120  test -d ./-p && rmdir ./-p
66121  as_mkdir_p=false
66122fi
66123
66124
66125# as_fn_executable_p FILE
66126# -----------------------
66127# Test if FILE is an executable regular file.
66128as_fn_executable_p ()
66129{
66130  test -f "$1" && test -x "$1"
66131} # as_fn_executable_p
66132as_test_x='test -x'
66133as_executable_p=as_fn_executable_p
66134
66135# Sed expression to map a string onto a valid CPP name.
66136as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
66137
66138# Sed expression to map a string onto a valid variable name.
66139as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
66140
66141
66142exec 6>&1
66143## ----------------------------------- ##
66144## Main body of $CONFIG_STATUS script. ##
66145## ----------------------------------- ##
66146_ASEOF
66147test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
66148
66149cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66150# Save the log message, to keep $0 and so on meaningful, and to
66151# report actual input values of CONFIG_FILES etc. instead of their
66152# values after options handling.
66153ac_log="
66154This file was extended by OpenJDK $as_me jdk9, which was
66155generated by GNU Autoconf 2.69.  Invocation command line was
66156
66157  CONFIG_FILES    = $CONFIG_FILES
66158  CONFIG_HEADERS  = $CONFIG_HEADERS
66159  CONFIG_LINKS    = $CONFIG_LINKS
66160  CONFIG_COMMANDS = $CONFIG_COMMANDS
66161  $ $0 $@
66162
66163on `(hostname || uname -n) 2>/dev/null | sed 1q`
66164"
66165
66166_ACEOF
66167
66168case $ac_config_files in *"
66169"*) set x $ac_config_files; shift; ac_config_files=$*;;
66170esac
66171
66172
66173
66174cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66175# Files that config.status was made for.
66176config_files="$ac_config_files"
66177
66178_ACEOF
66179
66180cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66181ac_cs_usage="\
66182\`$as_me' instantiates files and other configuration actions
66183from templates according to the current configuration.  Unless the files
66184and actions are specified as TAGs, all are instantiated by default.
66185
66186Usage: $0 [OPTION]... [TAG]...
66187
66188  -h, --help       print this help, then exit
66189  -V, --version    print version number and configuration settings, then exit
66190      --config     print configuration, then exit
66191  -q, --quiet, --silent
66192                   do not print progress messages
66193  -d, --debug      don't remove temporary files
66194      --recheck    update $as_me by reconfiguring in the same conditions
66195      --file=FILE[:TEMPLATE]
66196                   instantiate the configuration file FILE
66197
66198Configuration files:
66199$config_files
66200
66201Report bugs to <build-dev@openjdk.java.net>.
66202OpenJDK home page: <http://openjdk.java.net>."
66203
66204_ACEOF
66205cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66206ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
66207ac_cs_version="\\
66208OpenJDK config.status jdk9
66209configured by $0, generated by GNU Autoconf 2.69,
66210  with options \\"\$ac_cs_config\\"
66211
66212Copyright (C) 2012 Free Software Foundation, Inc.
66213This config.status script is free software; the Free Software Foundation
66214gives unlimited permission to copy, distribute and modify it."
66215
66216ac_pwd='$ac_pwd'
66217srcdir='$srcdir'
66218AWK='$AWK'
66219test -n "\$AWK" || AWK=awk
66220_ACEOF
66221
66222cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66223# The default lists apply if the user does not specify any file.
66224ac_need_defaults=:
66225while test $# != 0
66226do
66227  case $1 in
66228  --*=?*)
66229    ac_option=`expr "X$1" : 'X\([^=]*\)='`
66230    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
66231    ac_shift=:
66232    ;;
66233  --*=)
66234    ac_option=`expr "X$1" : 'X\([^=]*\)='`
66235    ac_optarg=
66236    ac_shift=:
66237    ;;
66238  *)
66239    ac_option=$1
66240    ac_optarg=$2
66241    ac_shift=shift
66242    ;;
66243  esac
66244
66245  case $ac_option in
66246  # Handling of the options.
66247  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
66248    ac_cs_recheck=: ;;
66249  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
66250    $as_echo "$ac_cs_version"; exit ;;
66251  --config | --confi | --conf | --con | --co | --c )
66252    $as_echo "$ac_cs_config"; exit ;;
66253  --debug | --debu | --deb | --de | --d | -d )
66254    debug=: ;;
66255  --file | --fil | --fi | --f )
66256    $ac_shift
66257    case $ac_optarg in
66258    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
66259    '') as_fn_error $? "missing file argument" ;;
66260    esac
66261    as_fn_append CONFIG_FILES " '$ac_optarg'"
66262    ac_need_defaults=false;;
66263  --he | --h |  --help | --hel | -h )
66264    $as_echo "$ac_cs_usage"; exit ;;
66265  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
66266  | -silent | --silent | --silen | --sile | --sil | --si | --s)
66267    ac_cs_silent=: ;;
66268
66269  # This is an error.
66270  -*) as_fn_error $? "unrecognized option: \`$1'
66271Try \`$0 --help' for more information." ;;
66272
66273  *) as_fn_append ac_config_targets " $1"
66274     ac_need_defaults=false ;;
66275
66276  esac
66277  shift
66278done
66279
66280ac_configure_extra_args=
66281
66282if $ac_cs_silent; then
66283  exec 6>/dev/null
66284  ac_configure_extra_args="$ac_configure_extra_args --silent"
66285fi
66286
66287_ACEOF
66288cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66289if \$ac_cs_recheck; then
66290  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
66291  shift
66292  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
66293  CONFIG_SHELL='$SHELL'
66294  export CONFIG_SHELL
66295  exec "\$@"
66296fi
66297
66298_ACEOF
66299cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66300exec 5>>config.log
66301{
66302  echo
66303  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
66304## Running $as_me. ##
66305_ASBOX
66306  $as_echo "$ac_log"
66307} >&5
66308
66309_ACEOF
66310cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66311_ACEOF
66312
66313cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66314
66315# Handling of arguments.
66316for ac_config_target in $ac_config_targets
66317do
66318  case $ac_config_target in
66319    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
66320    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
66321    "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
66322    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
66323    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
66324
66325  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
66326  esac
66327done
66328
66329
66330# If the user did not use the arguments to specify the items to instantiate,
66331# then the envvar interface is used.  Set only those that are not.
66332# We use the long form for the default assignment because of an extremely
66333# bizarre bug on SunOS 4.1.3.
66334if $ac_need_defaults; then
66335  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
66336fi
66337
66338# Have a temporary directory for convenience.  Make it in the build tree
66339# simply because there is no reason against having it here, and in addition,
66340# creating and moving files from /tmp can sometimes cause problems.
66341# Hook for its removal unless debugging.
66342# Note that there is a small window in which the directory will not be cleaned:
66343# after its creation but before its name has been assigned to `$tmp'.
66344$debug ||
66345{
66346  tmp= ac_tmp=
66347  trap 'exit_status=$?
66348  : "${ac_tmp:=$tmp}"
66349  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
66350' 0
66351  trap 'as_fn_exit 1' 1 2 13 15
66352}
66353# Create a (secure) tmp directory for tmp files.
66354
66355{
66356  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
66357  test -d "$tmp"
66358}  ||
66359{
66360  tmp=./conf$$-$RANDOM
66361  (umask 077 && mkdir "$tmp")
66362} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
66363ac_tmp=$tmp
66364
66365# Set up the scripts for CONFIG_FILES section.
66366# No need to generate them if there are no CONFIG_FILES.
66367# This happens for instance with `./config.status config.h'.
66368if test -n "$CONFIG_FILES"; then
66369
66370
66371ac_cr=`echo X | tr X '\015'`
66372# On cygwin, bash can eat \r inside `` if the user requested igncr.
66373# But we know of no other shell where ac_cr would be empty at this
66374# point, so we can use a bashism as a fallback.
66375if test "x$ac_cr" = x; then
66376  eval ac_cr=\$\'\\r\'
66377fi
66378ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
66379if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
66380  ac_cs_awk_cr='\\r'
66381else
66382  ac_cs_awk_cr=$ac_cr
66383fi
66384
66385echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
66386_ACEOF
66387
66388
66389{
66390  echo "cat >conf$$subs.awk <<_ACEOF" &&
66391  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
66392  echo "_ACEOF"
66393} >conf$$subs.sh ||
66394  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66395ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
66396ac_delim='%!_!# '
66397for ac_last_try in false false false false false :; do
66398  . ./conf$$subs.sh ||
66399    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66400
66401  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
66402  if test $ac_delim_n = $ac_delim_num; then
66403    break
66404  elif $ac_last_try; then
66405    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66406  else
66407    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
66408  fi
66409done
66410rm -f conf$$subs.sh
66411
66412cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66413cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
66414_ACEOF
66415sed -n '
66416h
66417s/^/S["/; s/!.*/"]=/
66418p
66419g
66420s/^[^!]*!//
66421:repl
66422t repl
66423s/'"$ac_delim"'$//
66424t delim
66425:nl
66426h
66427s/\(.\{148\}\)..*/\1/
66428t more1
66429s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
66430p
66431n
66432b repl
66433:more1
66434s/["\\]/\\&/g; s/^/"/; s/$/"\\/
66435p
66436g
66437s/.\{148\}//
66438t nl
66439:delim
66440h
66441s/\(.\{148\}\)..*/\1/
66442t more2
66443s/["\\]/\\&/g; s/^/"/; s/$/"/
66444p
66445b
66446:more2
66447s/["\\]/\\&/g; s/^/"/; s/$/"\\/
66448p
66449g
66450s/.\{148\}//
66451t delim
66452' <conf$$subs.awk | sed '
66453/^[^""]/{
66454  N
66455  s/\n//
66456}
66457' >>$CONFIG_STATUS || ac_write_fail=1
66458rm -f conf$$subs.awk
66459cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66460_ACAWK
66461cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
66462  for (key in S) S_is_set[key] = 1
66463  FS = ""
66464
66465}
66466{
66467  line = $ 0
66468  nfields = split(line, field, "@")
66469  substed = 0
66470  len = length(field[1])
66471  for (i = 2; i < nfields; i++) {
66472    key = field[i]
66473    keylen = length(key)
66474    if (S_is_set[key]) {
66475      value = S[key]
66476      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
66477      len += length(value) + length(field[++i])
66478      substed = 1
66479    } else
66480      len += 1 + keylen
66481  }
66482
66483  print line
66484}
66485
66486_ACAWK
66487_ACEOF
66488cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66489if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
66490  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
66491else
66492  cat
66493fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
66494  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
66495_ACEOF
66496
66497# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
66498# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
66499# trailing colons and then remove the whole line if VPATH becomes empty
66500# (actually we leave an empty line to preserve line numbers).
66501if test "x$srcdir" = x.; then
66502  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
66503h
66504s///
66505s/^/:/
66506s/[	 ]*$/:/
66507s/:\$(srcdir):/:/g
66508s/:\${srcdir}:/:/g
66509s/:@srcdir@:/:/g
66510s/^:*//
66511s/:*$//
66512x
66513s/\(=[	 ]*\).*/\1/
66514G
66515s/\n//
66516s/^[^=]*=[	 ]*$//
66517}'
66518fi
66519
66520cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66521fi # test -n "$CONFIG_FILES"
66522
66523
66524eval set X "  :F $CONFIG_FILES      "
66525shift
66526for ac_tag
66527do
66528  case $ac_tag in
66529  :[FHLC]) ac_mode=$ac_tag; continue;;
66530  esac
66531  case $ac_mode$ac_tag in
66532  :[FHL]*:*);;
66533  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
66534  :[FH]-) ac_tag=-:-;;
66535  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
66536  esac
66537  ac_save_IFS=$IFS
66538  IFS=:
66539  set x $ac_tag
66540  IFS=$ac_save_IFS
66541  shift
66542  ac_file=$1
66543  shift
66544
66545  case $ac_mode in
66546  :L) ac_source=$1;;
66547  :[FH])
66548    ac_file_inputs=
66549    for ac_f
66550    do
66551      case $ac_f in
66552      -) ac_f="$ac_tmp/stdin";;
66553      *) # Look for the file first in the build tree, then in the source tree
66554	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
66555	 # because $ac_f cannot contain `:'.
66556	 test -f "$ac_f" ||
66557	   case $ac_f in
66558	   [\\/$]*) false;;
66559	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
66560	   esac ||
66561	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
66562      esac
66563      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
66564      as_fn_append ac_file_inputs " '$ac_f'"
66565    done
66566
66567    # Let's still pretend it is `configure' which instantiates (i.e., don't
66568    # use $as_me), people would be surprised to read:
66569    #    /* config.h.  Generated by config.status.  */
66570    configure_input='Generated from '`
66571	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
66572	`' by configure.'
66573    if test x"$ac_file" != x-; then
66574      configure_input="$ac_file.  $configure_input"
66575      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
66576$as_echo "$as_me: creating $ac_file" >&6;}
66577    fi
66578    # Neutralize special characters interpreted by sed in replacement strings.
66579    case $configure_input in #(
66580    *\&* | *\|* | *\\* )
66581       ac_sed_conf_input=`$as_echo "$configure_input" |
66582       sed 's/[\\\\&|]/\\\\&/g'`;; #(
66583    *) ac_sed_conf_input=$configure_input;;
66584    esac
66585
66586    case $ac_tag in
66587    *:-:* | *:-) cat >"$ac_tmp/stdin" \
66588      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
66589    esac
66590    ;;
66591  esac
66592
66593  ac_dir=`$as_dirname -- "$ac_file" ||
66594$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66595	 X"$ac_file" : 'X\(//\)[^/]' \| \
66596	 X"$ac_file" : 'X\(//\)$' \| \
66597	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
66598$as_echo X"$ac_file" |
66599    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66600	    s//\1/
66601	    q
66602	  }
66603	  /^X\(\/\/\)[^/].*/{
66604	    s//\1/
66605	    q
66606	  }
66607	  /^X\(\/\/\)$/{
66608	    s//\1/
66609	    q
66610	  }
66611	  /^X\(\/\).*/{
66612	    s//\1/
66613	    q
66614	  }
66615	  s/.*/./; q'`
66616  as_dir="$ac_dir"; as_fn_mkdir_p
66617  ac_builddir=.
66618
66619case "$ac_dir" in
66620.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
66621*)
66622  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
66623  # A ".." for each directory in $ac_dir_suffix.
66624  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
66625  case $ac_top_builddir_sub in
66626  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
66627  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
66628  esac ;;
66629esac
66630ac_abs_top_builddir=$ac_pwd
66631ac_abs_builddir=$ac_pwd$ac_dir_suffix
66632# for backward compatibility:
66633ac_top_builddir=$ac_top_build_prefix
66634
66635case $srcdir in
66636  .)  # We are building in place.
66637    ac_srcdir=.
66638    ac_top_srcdir=$ac_top_builddir_sub
66639    ac_abs_top_srcdir=$ac_pwd ;;
66640  [\\/]* | ?:[\\/]* )  # Absolute name.
66641    ac_srcdir=$srcdir$ac_dir_suffix;
66642    ac_top_srcdir=$srcdir
66643    ac_abs_top_srcdir=$srcdir ;;
66644  *) # Relative name.
66645    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
66646    ac_top_srcdir=$ac_top_build_prefix$srcdir
66647    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
66648esac
66649ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
66650
66651
66652  case $ac_mode in
66653  :F)
66654  #
66655  # CONFIG_FILE
66656  #
66657
66658_ACEOF
66659
66660cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66661# If the template does not know about datarootdir, expand it.
66662# FIXME: This hack should be removed a few years after 2.60.
66663ac_datarootdir_hack=; ac_datarootdir_seen=
66664ac_sed_dataroot='
66665/datarootdir/ {
66666  p
66667  q
66668}
66669/@datadir@/p
66670/@docdir@/p
66671/@infodir@/p
66672/@localedir@/p
66673/@mandir@/p'
66674case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
66675*datarootdir*) ac_datarootdir_seen=yes;;
66676*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
66677  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
66678$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
66679_ACEOF
66680cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66681  ac_datarootdir_hack='
66682  s&@datadir@&$datadir&g
66683  s&@docdir@&$docdir&g
66684  s&@infodir@&$infodir&g
66685  s&@localedir@&$localedir&g
66686  s&@mandir@&$mandir&g
66687  s&\\\${datarootdir}&$datarootdir&g' ;;
66688esac
66689_ACEOF
66690
66691# Neutralize VPATH when `$srcdir' = `.'.
66692# Shell code in configure.ac might set extrasub.
66693# FIXME: do we really want to maintain this feature?
66694cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66695ac_sed_extra="$ac_vpsub
66696$extrasub
66697_ACEOF
66698cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66699:t
66700/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
66701s|@configure_input@|$ac_sed_conf_input|;t t
66702s&@top_builddir@&$ac_top_builddir_sub&;t t
66703s&@top_build_prefix@&$ac_top_build_prefix&;t t
66704s&@srcdir@&$ac_srcdir&;t t
66705s&@abs_srcdir@&$ac_abs_srcdir&;t t
66706s&@top_srcdir@&$ac_top_srcdir&;t t
66707s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
66708s&@builddir@&$ac_builddir&;t t
66709s&@abs_builddir@&$ac_abs_builddir&;t t
66710s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
66711$ac_datarootdir_hack
66712"
66713eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
66714  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
66715
66716test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
66717  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
66718  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
66719      "$ac_tmp/out"`; test -z "$ac_out"; } &&
66720  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
66721which seems to be undefined.  Please make sure it is defined" >&5
66722$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
66723which seems to be undefined.  Please make sure it is defined" >&2;}
66724
66725  rm -f "$ac_tmp/stdin"
66726  case $ac_file in
66727  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
66728  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
66729  esac \
66730  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
66731 ;;
66732
66733
66734
66735  esac
66736
66737done # for ac_tag
66738
66739
66740as_fn_exit 0
66741_ACEOF
66742ac_clean_files=$ac_clean_files_save
66743
66744test $ac_write_fail = 0 ||
66745  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
66746
66747
66748# configure is writing to config.log, and then calls config.status.
66749# config.status does its own redirection, appending to config.log.
66750# Unfortunately, on DOS this fails, as config.log is still kept open
66751# by configure, so config.status won't be able to write to it; its
66752# output is simply discarded.  So we exec the FD to /dev/null,
66753# effectively closing config.log, so it can be properly (re)opened and
66754# appended to by config.status.  When coming back to configure, we
66755# need to make the FD available again.
66756if test "$no_create" != yes; then
66757  ac_cs_success=:
66758  ac_config_status_args=
66759  test "$silent" = yes &&
66760    ac_config_status_args="$ac_config_status_args --quiet"
66761  exec 5>/dev/null
66762  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
66763  exec 5>>config.log
66764  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
66765  # would make configure fail if this is the last instruction.
66766  $ac_cs_success || as_fn_exit 1
66767fi
66768if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
66769  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
66770$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
66771fi
66772
66773
66774# After AC_OUTPUT, we need to do final work
66775
66776
66777  # Try to move config.log (generated by autoconf) to the configure-support directory.
66778  if test -e ./config.log; then
66779    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
66780  fi
66781
66782  # Rotate our log file (configure.log)
66783  if test -e "$OUTPUT_ROOT/configure.log.old"; then
66784    $RM -f "$OUTPUT_ROOT/configure.log.old"
66785  fi
66786  if test -e "$OUTPUT_ROOT/configure.log"; then
66787    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
66788  fi
66789
66790  # Move configure.log from current directory to the build output root
66791  if test -e ./configure.log; then
66792    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
66793  fi
66794
66795  # Make the compare script executable
66796  $CHMOD +x $OUTPUT_ROOT/compare.sh
66797
66798
66799# Finally output some useful information to the user
66800
66801  # Finally output some useful information to the user
66802
66803  printf "\n"
66804  printf "====================================================\n"
66805  if test "x$no_create" != "xyes"; then
66806    if test "x$IS_RECONFIGURE" != "xyes"; then
66807      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
66808    else
66809      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
66810    fi
66811  else
66812    if test "x$IS_RECONFIGURE" != "xyes"; then
66813      printf "A configuration has been successfully checked but not created\n"
66814    else
66815      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
66816    fi
66817  fi
66818  if test "x$CONFIGURE_COMMAND_LINE" != x; then
66819    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
66820  else
66821    printf "using default settings.\n"
66822  fi
66823
66824  printf "\n"
66825  printf "Configuration summary:\n"
66826  printf "* Debug level:    $DEBUG_LEVEL\n"
66827  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
66828  printf "* JDK variant:    $JDK_VARIANT\n"
66829  printf "* JVM variants:   $JVM_VARIANTS\n"
66830  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
66831  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
66832
66833  printf "\n"
66834  printf "Tools summary:\n"
66835  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
66836    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
66837  fi
66838  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
66839  if test "x$TOOLCHAIN_VERSION" != "x"; then
66840    print_version=" $TOOLCHAIN_VERSION"
66841  fi
66842  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
66843  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
66844  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
66845
66846  printf "\n"
66847  printf "Build performance summary:\n"
66848  printf "* Cores to use:   $JOBS\n"
66849  printf "* Memory limit:   $MEMORY_SIZE MB\n"
66850  if test "x$CCACHE_STATUS" != "x"; then
66851    printf "* ccache status:  $CCACHE_STATUS\n"
66852  fi
66853  printf "\n"
66854
66855  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
66856    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
66857    printf "will result in longer build times.\n"
66858    printf "\n"
66859  fi
66860
66861  if test "x$FOUND_ALT_VARIABLES" != "x"; then
66862    printf "WARNING: You have old-style ALT_ environment variables set.\n"
66863    printf "These are not respected, and will be ignored. It is recommended\n"
66864    printf "that you clean your environment. The following variables are set:\n"
66865    printf "$FOUND_ALT_VARIABLES\n"
66866    printf "\n"
66867  fi
66868
66869  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
66870    printf "WARNING: Your build output directory is not on a local disk.\n"
66871    printf "This will severely degrade build performance!\n"
66872    printf "It is recommended that you create an output directory on a local disk,\n"
66873    printf "and run the configure script again from that directory.\n"
66874    printf "\n"
66875  fi
66876
66877  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
66878    printf "WARNING: The result of this configuration has overridden an older\n"
66879    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
66880    printf "proper build. Failure to do so might result in strange build problems.\n"
66881    printf "\n"
66882  fi
66883
66884  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
66885    printf "WARNING: The result of this configuration was not saved.\n"
66886    printf "You should run without '--no-create | -n' to create the configuration.\n"
66887    printf "\n"
66888  fi
66889
66890
66891
66892  # Locate config.log.
66893  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
66894    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
66895  elif test -e "./config.log"; then
66896    CONFIG_LOG_PATH="."
66897  fi
66898
66899  if test -e "$CONFIG_LOG_PATH/config.log"; then
66900    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
66901    if test $? -eq 0; then
66902      printf "The following warnings were produced. Repeated here for convenience:\n"
66903      # We must quote sed expression (using []) to stop m4 from eating the [].
66904      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
66905      printf "\n"
66906    fi
66907  fi
66908
66909